From: <Claudiu.Beznea@microchip.com>
To: u.kleine-koenig@pengutronix.de
Cc: thierry.reding@gmail.com, robh+dt@kernel.org,
mark.rutland@arm.com, Nicolas.Ferre@microchip.com,
alexandre.belloni@bootlin.com, Ludovic.Desroches@microchip.com,
linux-arm-kernel@lists.infradead.org, linux-pwm@vger.kernel.org,
devicetree@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 2/4] pwm: atmel: add support for controllers with 32 bit counters
Date: Tue, 19 Feb 2019 08:57:04 +0000 [thread overview]
Message-ID: <e08cbcb2-4e37-4a2e-ea79-021a2c7a25d6@microchip.com> (raw)
In-Reply-To: <20190219074246.kcdbd5nhf43yw5ax@pengutronix.de>
On 19.02.2019 09:42, Uwe Kleine-König wrote:
> Hello Claudiu,
>
> On Mon, Jan 21, 2019 at 12:30:53PM +0000, Claudiu.Beznea@microchip.com wrote:
>> From: Claudiu Beznea <claudiu.beznea@microchip.com>
>>
>> New SAM9X60's PWM controller use 32 bits counters thus it could generate
>> signals with higher period and duty cycles. Update the current driver
>> to work with old controller (that uses 16 bits counters) and with the
>> new SAM9X60's controller.
>>
>> Signed-off-by: Claudiu Beznea <claudiu.beznea@microchip.com>
>> ---
>> drivers/pwm/pwm-atmel.c | 38 +++++++++++++++++++++++++++-----------
>> 1 file changed, 27 insertions(+), 11 deletions(-)
>>
>> diff --git a/drivers/pwm/pwm-atmel.c b/drivers/pwm/pwm-atmel.c
>> index 7e86a5266eb6..44f4a1c9f60b 100644
>> --- a/drivers/pwm/pwm-atmel.c
>> +++ b/drivers/pwm/pwm-atmel.c
>> @@ -48,15 +48,15 @@
>> #define PWMV2_CPRD 0x0C
>> #define PWMV2_CPRDUPD 0x10
>>
>> -/*
>> - * Max value for duty and period
>> - *
>> - * Although the duty and period register is 32 bit,
>> - * however only the LSB 16 bits are significant.
>> - */
>> -#define PWM_MAX_DTY 0xFFFF
>> -#define PWM_MAX_PRD 0xFFFF
>> -#define PRD_MAX_PRES 10
>> +/* 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
>
> This symbol is unused, so I wonder if the patch really does what the
> commit log promises.
It is only of SAM9X60's PWM. Please check patch 3/4. Maybe I should have
been introduced it in there. If you consider it is better to be introduced
in patch 3/4 please let me know.
>
> Best regards
> Uwe
>
next prev parent reply other threads:[~2019-02-19 8:57 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-01-21 12:30 [PATCH 0/4] add support for the new SAM9X60's PWM controller Claudiu.Beznea
2019-01-21 12:30 ` [PATCH 1/4] pwm: atmel: add struct atmel_pwm_data Claudiu.Beznea
2019-01-21 12:30 ` [PATCH 2/4] pwm: atmel: add support for controllers with 32 bit counters Claudiu.Beznea
2019-02-19 7:42 ` Uwe Kleine-König
2019-02-19 8:57 ` Claudiu.Beznea [this message]
2019-02-19 9:15 ` Uwe Kleine-König
2019-01-21 12:30 ` [PATCH 3/4] pwm: atmel: add support for SAM9X60's PWM controller Claudiu.Beznea
2019-01-21 12:31 ` [PATCH 4/4] pwm: atmel: add PWM binding for SAM9X60 Claudiu.Beznea
2019-02-18 21:12 ` Rob Herring
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=e08cbcb2-4e37-4a2e-ea79-021a2c7a25d6@microchip.com \
--to=claudiu.beznea@microchip.com \
--cc=Ludovic.Desroches@microchip.com \
--cc=Nicolas.Ferre@microchip.com \
--cc=alexandre.belloni@bootlin.com \
--cc=devicetree@vger.kernel.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pwm@vger.kernel.org \
--cc=mark.rutland@arm.com \
--cc=robh+dt@kernel.org \
--cc=thierry.reding@gmail.com \
--cc=u.kleine-koenig@pengutronix.de \
/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).