Re: [PATCH 1/4] gpio: mvebu: Add limited PWM support

2017-03-23 Thread Ralph Sennhauser
On Thu, 23 Mar 2017 11:11:09 +0100 Linus Walleij wrote: > On Mon, Mar 20, 2017 at 2:51 PM, Thierry Reding > wrote: > > On Fri, Mar 17, 2017 at 10:17:47AM +0100, Ralph Sennhauser wrote: > >> On Thu, 16 Mar 2017 17:03:05 +0100 > >> Linus Walleij wrote: > > [...] > >> > > +static void mvebu_

Re: [PATCH 1/4] gpio: mvebu: Add limited PWM support

2017-03-23 Thread Linus Walleij
On Mon, Mar 20, 2017 at 2:51 PM, Thierry Reding wrote: > On Fri, Mar 17, 2017 at 10:17:47AM +0100, Ralph Sennhauser wrote: >> On Thu, 16 Mar 2017 17:03:05 +0100 >> Linus Walleij wrote: > [...] >> > > +static void mvebu_pwm_suspend(struct mvebu_gpio_chip *mvchip) >> > > +static void mvebu_pwm_resu

Re: [PATCH 1/4] gpio: mvebu: Add limited PWM support

2017-03-21 Thread Andrew Lunn
> > > *mvebu_gpioreg_blink(struct mvebu_gpio_chip *mvchip) return > > > mvchip->membase + GPIO_BLINK_EN_OFF; } > > > > > > +static void __iomem *mvebu_gpioreg_blink_select(struct > > > mvebu_gpio_chip *mvchip) +{ > > > + return mvchip->membase + GPIO_BLINK_CNT_SELECT_OFF; > > > +} > > > > That

Re: [PATCH 1/4] gpio: mvebu: Add limited PWM support

2017-03-20 Thread Ralph Sennhauser
On Mon, 20 Mar 2017 14:42:52 +0100 Thierry Reding wrote: > > diff --git a/Documentation/devicetree/bindings/gpio/gpio-mvebu.txt > > b/Documentation/devicetree/bindings/gpio/gpio-mvebu.txt index > > a6f3bec..86932e3 100644 --- > > a/Documentation/devicetree/bindings/gpio/gpio-mvebu.txt +++ > > b/D

Re: [PATCH 1/4] gpio: mvebu: Add limited PWM support

2017-03-20 Thread Ralph Sennhauser
On Mon, 20 Mar 2017 14:51:31 +0100 Thierry Reding wrote: > On Fri, Mar 17, 2017 at 10:17:47AM +0100, Ralph Sennhauser wrote: > > On Thu, 16 Mar 2017 17:03:05 +0100 > > Linus Walleij wrote: > [...] > > > > +static void mvebu_pwm_suspend(struct mvebu_gpio_chip *mvchip) > > > > +static void mvebu

Re: [PATCH 1/4] gpio: mvebu: Add limited PWM support

2017-03-20 Thread Thierry Reding
On Thu, Mar 16, 2017 at 05:03:05PM +0100, Linus Walleij wrote: > On Thu, Mar 16, 2017 at 7:42 AM, Ralph Sennhauser > wrote: > > > From: Andrew Lunn > > > > Armada 370/XP devices can 'blink' gpio lines with a configurable on > > and off period. This can be modelled as a PWM. > > > > However, ther

Re: [PATCH 1/4] gpio: mvebu: Add limited PWM support

2017-03-20 Thread Thierry Reding
On Fri, Mar 17, 2017 at 10:17:47AM +0100, Ralph Sennhauser wrote: > On Thu, 16 Mar 2017 17:03:05 +0100 > Linus Walleij wrote: [...] > > > +static void mvebu_pwm_suspend(struct mvebu_gpio_chip *mvchip) > > > +static void mvebu_pwm_resume(struct mvebu_gpio_chip *mvchip) > > > > I think both of thes

Re: [PATCH 1/4] gpio: mvebu: Add limited PWM support

2017-03-20 Thread Thierry Reding
On Sat, Mar 18, 2017 at 04:37:53PM +0100, Andrew Lunn wrote: > > > +static void mvebu_pwm_free(struct pwm_chip *chip, struct pwm_device > > > *pwmd) > > > +{ > > > + struct mvebu_pwm *pwm = to_mvebu_pwm(chip); > > > + struct gpio_desc *desc = gpio_to_desc(pwmd->pwm); > > > + unsi

Re: [PATCH 1/4] gpio: mvebu: Add limited PWM support

2017-03-20 Thread Thierry Reding
On Thu, Mar 16, 2017 at 07:42:15AM +0100, Ralph Sennhauser wrote: > From: Andrew Lunn > > Armada 370/XP devices can 'blink' gpio lines with a configurable on > and off period. This can be modelled as a PWM. > > However, there are only two sets of PWM configuration registers for > all the gpio li

Re: [PATCH 1/4] gpio: mvebu: Add limited PWM support

2017-03-18 Thread Andrew Lunn
> > +static void mvebu_pwm_free(struct pwm_chip *chip, struct pwm_device *pwmd) > > +{ > > + struct mvebu_pwm *pwm = to_mvebu_pwm(chip); > > + struct gpio_desc *desc = gpio_to_desc(pwmd->pwm); > > + unsigned long flags; > > + > > + spin_lock_irqsave(&pwm->lock, flags); > > +

Re: [PATCH 1/4] gpio: mvebu: Add limited PWM support

2017-03-17 Thread Ralph Sennhauser
On Thu, 16 Mar 2017 17:03:05 +0100 Linus Walleij wrote: > > In essence I am very positive of this patch set and happy to merge > it as a PWM driver inside of GPIO if Thierry is OK with it. Hi Linus, thanks for merging the cleanup patches. > > > +static void mvebu_pwm_free(struct pwm_chip *

Re: [PATCH 1/4] gpio: mvebu: Add limited PWM support

2017-03-16 Thread Linus Walleij
On Thu, Mar 16, 2017 at 7:42 AM, Ralph Sennhauser wrote: > From: Andrew Lunn > > Armada 370/XP devices can 'blink' gpio lines with a configurable on > and off period. This can be modelled as a PWM. > > However, there are only two sets of PWM configuration registers for > all the gpio lines. This