Skip to content

Commit d7d9631

Browse files
committed
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>
1 parent 6571d13 commit d7d9631

File tree

1 file changed

+6
-14
lines changed

1 file changed

+6
-14
lines changed

drivers/pwm/pwm-atmel.c

Lines changed: 6 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -48,14 +48,6 @@
4848
#define PWMV2_CPRD 0x0C
4949
#define PWMV2_CPRDUPD 0x10
5050

51-
/* Max values for period and prescaler */
52-
53-
/* Only the LSB 16 bits are significant. */
54-
#define PWM_MAXV1_PRD 0xFFFF
55-
/* All 32 bits are significant. */
56-
#define PWM_MAXV2_PRD 0xFFFFFFFF
57-
#define PRD_MAXV1_PRES 10
58-
5951
struct atmel_pwm_registers {
6052
u8 period;
6153
u8 period_upd;
@@ -294,8 +286,8 @@ static const struct atmel_pwm_data atmel_sam9rl_pwm_data = {
294286
},
295287
.cfg = {
296288
/* 16 bits to keep period and duty. */
297-
.max_period = PWM_MAXV1_PRD,
298-
.max_pres = PRD_MAXV1_PRES,
289+
.max_period = 0xffff,
290+
.max_pres = 10,
299291
},
300292
};
301293

@@ -308,8 +300,8 @@ static const struct atmel_pwm_data atmel_sama5_pwm_data = {
308300
},
309301
.cfg = {
310302
/* 16 bits to keep period and duty. */
311-
.max_period = PWM_MAXV1_PRD,
312-
.max_pres = PRD_MAXV1_PRES,
303+
.max_period = 0xffff,
304+
.max_pres = 10,
313305
},
314306
};
315307

@@ -322,8 +314,8 @@ static const struct atmel_pwm_data mchp_sam9x60_pwm_data = {
322314
},
323315
.cfg = {
324316
/* 32 bits to keep period and duty. */
325-
.max_period = PWM_MAXV2_PRD,
326-
.max_pres = PRD_MAXV1_PRES,
317+
.max_period = 0xffffffff,
318+
.max_pres = 10,
327319
},
328320
};
329321

0 commit comments

Comments
 (0)