Re: [PATCH v9 2/2] pwm: sifive: Add a driver for SiFive SoC PWM

2019-03-18 Thread Thierry Reding
On Tue, Mar 12, 2019 at 02:17:12PM +0100, Uwe Kleine-König wrote: > On Tue, Mar 12, 2019 at 01:12:18PM +0100, Thierry Reding wrote: > > On Tue, Mar 12, 2019 at 10:17:39AM +0100, Uwe Kleine-König wrote: [...] > > > There are a few other things that could be improved, but I think they > > > could be

Re: [PATCH v9 2/2] pwm: sifive: Add a driver for SiFive SoC PWM

2019-03-12 Thread Uwe Kleine-König
On Tue, Mar 12, 2019 at 01:12:18PM +0100, Thierry Reding wrote: > On Tue, Mar 12, 2019 at 10:17:39AM +0100, Uwe Kleine-König wrote: > > Hello, > > > > there are just a few minor things left I commented below. > > > > On Tue, Mar 12, 2019 at 01:41:29PM +0530, Yash Shah wrote: > > > +#define

Re: [PATCH v9 2/2] pwm: sifive: Add a driver for SiFive SoC PWM

2019-03-12 Thread Thierry Reding
On Tue, Mar 12, 2019 at 10:17:39AM +0100, Uwe Kleine-König wrote: > Hello, > > there are just a few minor things left I commented below. > > On Tue, Mar 12, 2019 at 01:41:29PM +0530, Yash Shah wrote: > > +#define div_u64_round(a, b) \ > > + ({typeof(b) __b = b; div_u64((a) + __b / 2, __b); })

Re: [PATCH v9 2/2] pwm: sifive: Add a driver for SiFive SoC PWM

2019-03-12 Thread Uwe Kleine-König
Hello, there are just a few minor things left I commented below. On Tue, Mar 12, 2019 at 01:41:29PM +0530, Yash Shah wrote: > +#define div_u64_round(a, b) \ > + ({typeof(b) __b = b; div_u64((a) + __b / 2, __b); }) Parenthesis around b please. I guess I didn't had them in my suggestion

[PATCH v9 2/2] pwm: sifive: Add a driver for SiFive SoC PWM

2019-03-12 Thread Yash Shah
Adds a PWM driver for PWM chip present in SiFive's HiFive Unleashed SoC. Signed-off-by: Wesley W. Terpstra [Atish: Various fixes and code cleanup] Signed-off-by: Atish Patra Signed-off-by: Yash Shah --- drivers/pwm/Kconfig | 11 ++ drivers/pwm/Makefile | 1 +