aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/pwm
diff options
context:
space:
mode:
authorThierry Reding <thierry.reding@gmail.com>2019-03-04 12:10:29 +0100
committerThierry Reding <thierry.reding@gmail.com>2019-03-04 12:52:49 +0100
commitd7d96312fe108d0df50898d212770b0a5b2d491e (patch)
tree7373278a205d80ec3251cc3db5fdf3d106a2758c /drivers/pwm
parentpwm: bcm-kona: Update macros to remove braces around numbers (diff)
downloadlinux-dev-d7d96312fe108d0df50898d212770b0a5b2d491e.tar.xz
linux-dev-d7d96312fe108d0df50898d212770b0a5b2d491e.zip
pwm: atmel: Remove useless symbolic definitions
The values that these symbols define are only assigned to the per-SoC structure where the context is clear, so there's no need for the extra symbolic name. Acked-by: Claudiu Beznea <claudiu.beznea@microchip.com> Signed-off-by: Thierry Reding <thierry.reding@gmail.com>
Diffstat (limited to 'drivers/pwm')
-rw-r--r--drivers/pwm/pwm-atmel.c20
1 files changed, 6 insertions, 14 deletions
diff --git a/drivers/pwm/pwm-atmel.c b/drivers/pwm/pwm-atmel.c
index b1473ed55110..a9fd6f0d408c 100644
--- a/drivers/pwm/pwm-atmel.c
+++ b/drivers/pwm/pwm-atmel.c
@@ -48,14 +48,6 @@
#define PWMV2_CPRD 0x0C
#define PWMV2_CPRDUPD 0x10
-/* Max values for period and prescaler */
-
-/* Only the LSB 16 bits are significant. */
-#define PWM_MAXV1_PRD 0xFFFF
-/* All 32 bits are significant. */
-#define PWM_MAXV2_PRD 0xFFFFFFFF
-#define PRD_MAXV1_PRES 10
-
struct atmel_pwm_registers {
u8 period;
u8 period_upd;
@@ -294,8 +286,8 @@ static const struct atmel_pwm_data atmel_sam9rl_pwm_data = {
},
.cfg = {
/* 16 bits to keep period and duty. */
- .max_period = PWM_MAXV1_PRD,
- .max_pres = PRD_MAXV1_PRES,
+ .max_period = 0xffff,
+ .max_pres = 10,
},
};
@@ -308,8 +300,8 @@ static const struct atmel_pwm_data atmel_sama5_pwm_data = {
},
.cfg = {
/* 16 bits to keep period and duty. */
- .max_period = PWM_MAXV1_PRD,
- .max_pres = PRD_MAXV1_PRES,
+ .max_period = 0xffff,
+ .max_pres = 10,
},
};
@@ -322,8 +314,8 @@ static const struct atmel_pwm_data mchp_sam9x60_pwm_data = {
},
.cfg = {
/* 32 bits to keep period and duty. */
- .max_period = PWM_MAXV2_PRD,
- .max_pres = PRD_MAXV1_PRES,
+ .max_period = 0xffffffff,
+ .max_pres = 10,
},
};