Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1604604
| From | Thierry Reding <thierry.reding@gmail.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH 1/4] gpio: mvebu: Add limited PWM support |
| Date | 2017-03-20 15:00 +0100 |
| Message-ID | <tn60P-5sH-49@gated-at.bofh.it> (permalink) |
| References | <tlxot-2Mg-3@gated-at.bofh.it> <tlxot-2Mg-11@gated-at.bofh.it> <tlG8q-LZ-17@gated-at.bofh.it> <tmoCu-8nl-7@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
[Multipart message — attachments visible in raw view] - view raw
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);
> > > + unsigned long flags;
> > > +
> > > + spin_lock_irqsave(&pwm->lock, flags);
> > > + gpiod_free(desc);
> > > + pwm->used = false;
> > > + spin_unlock_irqrestore(&pwm->lock, flags);
> > > +}
> >
> > No need to set the output value to zero or something here?
> > And turn off blinking? Or is that done some other way?
>
> Hi Linus
>
> The disable op will turn of blinking. I've not checked, but i assume
> the PWM core will not allow you to free an enabled PWM?
Actually it will. It's probably a good idea to add a WARN_ON() to the
PWM core if that situation arises. I don't think going as far as
prohibiting it will do any good, though. It's not like drivers will
have much of a choice if pwm_put() fails. Typically they'd do that in
their ->remove() call, at which point failure is difficult to deal with.
> > I think both of these need to be tagged __maybe_unused to not give
> > noise in randconfig builds.
>
> I've not seen any 0-day patch emails giving warnings. So i suspect it
> is O.K.
Linus was probably referring to !PM configurations. I'm not sure how
often they'll get run, but as long as it doesn't make it into linux-next
the chances aren't very high (I don't think the 0-day builder executes
randconfig builds).
Thierry
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH 0/4] gpio: mvebu: Add PWM fan support Ralph Sennhauser <ralph.sennhauser@gmail.com> - 2017-03-16 07:50 +0100
[PATCH 3/4] ARM: mvebu: Enable SENSORS_PWM_FAN in defconfig Ralph Sennhauser <ralph.sennhauser@gmail.com> - 2017-03-16 07:50 +0100
[PATCH 1/4] gpio: mvebu: Add limited PWM support Ralph Sennhauser <ralph.sennhauser@gmail.com> - 2017-03-16 07:50 +0100
Re: [PATCH 1/4] gpio: mvebu: Add limited PWM support Linus Walleij <linus.walleij@linaro.org> - 2017-03-16 17:10 +0100
Re: [PATCH 1/4] gpio: mvebu: Add limited PWM support Ralph Sennhauser <ralph.sennhauser@gmail.com> - 2017-03-17 10:20 +0100
Re: [PATCH 1/4] gpio: mvebu: Add limited PWM support Thierry Reding <thierry.reding@gmail.com> - 2017-03-20 15:00 +0100
Re: [PATCH 1/4] gpio: mvebu: Add limited PWM support Ralph Sennhauser <ralph.sennhauser@gmail.com> - 2017-03-21 07:40 +0100
Re: [PATCH 1/4] gpio: mvebu: Add limited PWM support Linus Walleij <linus.walleij@linaro.org> - 2017-03-23 11:20 +0100
Re: [PATCH 1/4] gpio: mvebu: Add limited PWM support Ralph Sennhauser <ralph.sennhauser@gmail.com> - 2017-03-23 11:40 +0100
Re: [PATCH 1/4] gpio: mvebu: Add limited PWM support Andrew Lunn <andrew@lunn.ch> - 2017-03-18 16:40 +0100
Re: [PATCH 1/4] gpio: mvebu: Add limited PWM support Thierry Reding <thierry.reding@gmail.com> - 2017-03-20 15:00 +0100
Re: [PATCH 1/4] gpio: mvebu: Add limited PWM support Thierry Reding <thierry.reding@gmail.com> - 2017-03-20 15:50 +0100
Re: [PATCH 1/4] gpio: mvebu: Add limited PWM support Thierry Reding <thierry.reding@gmail.com> - 2017-03-20 14:50 +0100
Re: [PATCH 1/4] gpio: mvebu: Add limited PWM support Ralph Sennhauser <ralph.sennhauser@gmail.com> - 2017-03-21 07:40 +0100
Re: [PATCH 1/4] gpio: mvebu: Add limited PWM support Andrew Lunn <andrew@lunn.ch> - 2017-03-21 16:00 +0100
Re: [PATCH 0/4] gpio: mvebu: Add PWM fan support Linus Walleij <linus.walleij@linaro.org> - 2017-03-16 16:50 +0100
Re: [PATCH 0/4] gpio: mvebu: Add PWM fan support Andrew Lunn <andrew@lunn.ch> - 2017-03-18 16:40 +0100
Re: [PATCH 0/4] gpio: mvebu: Add PWM fan support Ralph Sennhauser <ralph.sennhauser@gmail.com> - 2017-03-18 17:20 +0100
csiph-web