From: Thierry Reding <thierry.reding@gmail.com>
To: Thierry Reding <thierry.reding@gmail.com>,
Claudiu Beznea <claudiu.beznea@microchip.com>
Cc: linux-pwm@vger.kernel.org
Subject: [PATCH] pwm: atmel: Remove useless symbolic definitions
Date: Mon, 4 Mar 2019 12:12:42 +0100 [thread overview]
Message-ID: <20190304111242.6545-1-thierry.reding@gmail.com> (raw)
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.
Signed-off-by: Thierry Reding <thierry.reding@gmail.com>
---
drivers/pwm/pwm-atmel.c | 20 ++++++--------------
1 file 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,
},
};
--
2.20.1
next reply other threads:[~2019-03-04 11:12 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-03-04 11:12 Thierry Reding [this message]
2019-03-04 11:46 ` [PATCH] pwm: atmel: Remove useless symbolic definitions Claudiu.Beznea
2019-03-04 11:57 ` Thierry Reding
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20190304111242.6545-1-thierry.reding@gmail.com \
--to=thierry.reding@gmail.com \
--cc=claudiu.beznea@microchip.com \
--cc=linux-pwm@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).