Re: [RFC 2/4] pwm: sifive: Add a driver for SiFive SoC PWM

2018-10-16 Thread Atish Patra
On 10/10/18 6:11 AM, Christoph Hellwig wrote: Thanks for getting these drivers submitted upstream! I don't really know anything about PWM, so just some random nitpicking below.. + iowrite32(frac, pwm->regs + REG_PWMCMP0 + (dev->hwpwm * SIZE_PWMCMP)); * already has a higher precedence

Re: [RFC 2/4] pwm: sifive: Add a driver for SiFive SoC PWM

2018-10-16 Thread Atish Patra
On 10/10/18 6:11 AM, Christoph Hellwig wrote: Thanks for getting these drivers submitted upstream! I don't really know anything about PWM, so just some random nitpicking below.. + iowrite32(frac, pwm->regs + REG_PWMCMP0 + (dev->hwpwm * SIZE_PWMCMP)); * already has a higher precedence

Re: [RFC 2/4] pwm: sifive: Add a driver for SiFive SoC PWM

2018-10-16 Thread Atish Patra
On 10/10/18 7:13 AM, Thierry Reding wrote: On Tue, Oct 09, 2018 at 11:51:23AM -0700, Atish Patra wrote: From: "Wesley W. Terpstra" 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]

Re: [RFC 2/4] pwm: sifive: Add a driver for SiFive SoC PWM

2018-10-16 Thread Atish Patra
On 10/10/18 7:13 AM, Thierry Reding wrote: On Tue, Oct 09, 2018 at 11:51:23AM -0700, Atish Patra wrote: From: "Wesley W. Terpstra" 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]

Re: [RFC 2/4] pwm: sifive: Add a driver for SiFive SoC PWM

2018-10-10 Thread Thierry Reding
On Tue, Oct 09, 2018 at 11:51:23AM -0700, Atish Patra wrote: > From: "Wesley W. Terpstra" > > 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 > --- >

Re: [RFC 2/4] pwm: sifive: Add a driver for SiFive SoC PWM

2018-10-10 Thread Thierry Reding
On Tue, Oct 09, 2018 at 11:51:23AM -0700, Atish Patra wrote: > From: "Wesley W. Terpstra" > > 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 > --- >

Re: [RFC 2/4] pwm: sifive: Add a driver for SiFive SoC PWM

2018-10-10 Thread Thierry Reding
On Wed, Oct 10, 2018 at 06:11:29AM -0700, Christoph Hellwig wrote: [...] > > +static struct platform_driver sifive_pwm_driver = { > > + .probe = sifive_pwm_probe, > > + .remove = sifive_pwm_remove, > > + .driver = { > > + .name = "pwm-sifivem", > > + .of_match_table =

Re: [RFC 2/4] pwm: sifive: Add a driver for SiFive SoC PWM

2018-10-10 Thread Thierry Reding
On Wed, Oct 10, 2018 at 06:11:29AM -0700, Christoph Hellwig wrote: [...] > > +static struct platform_driver sifive_pwm_driver = { > > + .probe = sifive_pwm_probe, > > + .remove = sifive_pwm_remove, > > + .driver = { > > + .name = "pwm-sifivem", > > + .of_match_table =

Re: [RFC 2/4] pwm: sifive: Add a driver for SiFive SoC PWM

2018-10-10 Thread Christoph Hellwig
Thanks for getting these drivers submitted upstream! I don't really know anything about PWM, so just some random nitpicking below.. > + iowrite32(frac, pwm->regs + REG_PWMCMP0 + (dev->hwpwm * SIZE_PWMCMP)); * already has a higher precedence than +, so no need for the inner braces. > +

Re: [RFC 2/4] pwm: sifive: Add a driver for SiFive SoC PWM

2018-10-10 Thread Christoph Hellwig
Thanks for getting these drivers submitted upstream! I don't really know anything about PWM, so just some random nitpicking below.. > + iowrite32(frac, pwm->regs + REG_PWMCMP0 + (dev->hwpwm * SIZE_PWMCMP)); * already has a higher precedence than +, so no need for the inner braces. > +

[RFC 2/4] pwm: sifive: Add a driver for SiFive SoC PWM

2018-10-09 Thread Atish Patra
From: "Wesley W. Terpstra" 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 --- drivers/pwm/Kconfig | 10 ++ drivers/pwm/Makefile | 1 +

[RFC 2/4] pwm: sifive: Add a driver for SiFive SoC PWM

2018-10-09 Thread Atish Patra
From: "Wesley W. Terpstra" 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 --- drivers/pwm/Kconfig | 10 ++ drivers/pwm/Makefile | 1 +