public inbox for linux-arm-kernel@lists.infradead.org
 help / color / mirror / Atom feed
From: thierry.reding@gmail.com (Thierry Reding)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH] pwm: lpc18xx-sct: don't reconfigure PWM in .request and .free
Date: Fri, 16 Nov 2018 11:05:00 +0100	[thread overview]
Message-ID: <20181116100500.GC28631@ulmo> (raw)
In-Reply-To: <20181116065208.3920-1-u.kleine-koenig@pengutronix.de>

On Fri, Nov 16, 2018 at 07:52:08AM +0100, Uwe Kleine-K?nig wrote:
> Regarding the .request case: The consumer might be interested in taking
> over the configured state from the boot loader. So the initially
> configured state should be retained.
> 
> For the free case the PWM consumer is responsible to disable the PWM
> before calling pwm_release and there are three subcases to consider:
> 
>  a) The pwm is already off. Then there is no gain in disabling the PWM
>     once more.
>  b) The pwm is still running and there is a good reason for that. (Not
>     sure this is a valid case, I cannot imagine such a good reason.)
>     Then it is contra productive to disable the pwm.
>  c) The pwm is still running because the consumer failed to disable the
>     PWM. Then the consumer needs fixing and there is little incentive to
>     paper over the problem in the backend driver.
> 
> This aligns the lpc18xx-sct driver to the other PWM drivers that also
> don't reconfigure the hardware in .request and .free.
> 
> Signed-off-by: Uwe Kleine-K?nig <u.kleine-koenig@pengutronix.de>
> ---
>  drivers/pwm/pwm-lpc18xx-sct.c | 3 ---
>  1 file changed, 3 deletions(-)

Applied, with some minor fixes to the commit message (pwm -> PWM,
pwm_release -> pwm_put(), ...).

Thanks,
Thierry
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20181116/3730d634/attachment.sig>

  parent reply	other threads:[~2018-11-16 10:05 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20181114115025.GC2620@ulmo>
2018-11-16  6:52 ` [PATCH] pwm: lpc18xx-sct: don't reconfigure PWM in .request and .free Uwe Kleine-König
2018-11-16  7:02   ` Uwe Kleine-König
2018-11-16  9:22   ` Vladimir Zapolskiy
2018-11-16  9:48     ` Uwe Kleine-König
2018-11-16 10:01     ` Thierry Reding
2018-11-16 10:45       ` Uwe Kleine-König
2018-11-16 10:05   ` Thierry Reding [this message]
2018-11-19 19:55     ` Uwe Kleine-König
2018-11-20 15:42       ` Thierry Reding

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=20181116100500.GC28631@ulmo \
    --to=thierry.reding@gmail.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    /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