diff options
| author | Andy Shevchenko <[email protected]> | 2022-09-27 16:24:20 +0000 |
|---|---|---|
| committer | Thierry Reding <[email protected]> | 2022-09-28 14:19:43 +0000 |
| commit | 4fdb3281bb8479ea0c41e6be0af5dcab669f9eb9 (patch) | |
| tree | ea42a26104e7f58f83efb405f5f839287840dc37 /drivers/pwm/pwm-lpss.c | |
| parent | pwm: lpss: Use DEFINE_RUNTIME_DEV_PM_OPS() and pm_ptr() macros (diff) | |
| download | kernel-4fdb3281bb8479ea0c41e6be0af5dcab669f9eb9.tar.gz kernel-4fdb3281bb8479ea0c41e6be0af5dcab669f9eb9.zip | |
pwm: lpss: Make use of bits.h macros for all masks
Make use of the GENMASK() (far less error-prone, far more concise).
Signed-off-by: Andy Shevchenko <[email protected]>
Reviewed-by: Hans de Goede <[email protected]>
Acked-by: Uwe Kleine-König <[email protected]>
Signed-off-by: Thierry Reding <[email protected]>
Diffstat (limited to 'drivers/pwm/pwm-lpss.c')
| -rw-r--r-- | drivers/pwm/pwm-lpss.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/pwm/pwm-lpss.c b/drivers/pwm/pwm-lpss.c index a20915459809..accdef5dd58e 100644 --- a/drivers/pwm/pwm-lpss.c +++ b/drivers/pwm/pwm-lpss.c @@ -10,6 +10,7 @@ * Author: Alan Cox <[email protected]> */ +#include <linux/bits.h> #include <linux/delay.h> #include <linux/io.h> #include <linux/iopoll.h> @@ -26,7 +27,7 @@ #define PWM_ENABLE BIT(31) #define PWM_SW_UPDATE BIT(30) #define PWM_BASE_UNIT_SHIFT 8 -#define PWM_ON_TIME_DIV_MASK 0x000000ff +#define PWM_ON_TIME_DIV_MASK GENMASK(7, 0) /* Size of each PWM register space if multiple */ #define PWM_SIZE 0x400 |
