linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Boris Brezillon <boris.brezillon@free-electrons.com>
To: Thierry Reding <thierry.reding@gmail.com>, linux-pwm@vger.kernel.org
Cc: "Yoshihiro Shimoda" <yoshihiro.shimoda.uh@renesas.com>,
	"Doug Anderson" <dianders@google.com>,
	linux-arm-kernel@lists.infradead.org,
	linux-kernel@vger.kernel.org,
	"Uwe Kleine-König" <u.kleine-koenig@pengutronix.de>
Subject: Re: [PATCH v3 pre-03/12] pwm: rcar: make use of pwm_is_enabled()
Date: Sat, 10 Oct 2015 17:14:20 +0200	[thread overview]
Message-ID: <20151010171420.6c41f2b5@bbrezillon> (raw)
In-Reply-To: <1444489838-13953-1-git-send-email-boris.brezillon@free-electrons.com>

On Sat, 10 Oct 2015 17:10:38 +0200
Boris Brezillon <boris.brezillon@free-electrons.com> wrote:

> Commit 5c31252c4a86 ("pwm: Add the pwm_is_enabled() helper") introduced a
> new function to test whether a PWM device is enabled or not without
> manipulating PWM internal fields.
> Hiding this is necessary if we want to smoothly move to the atomic PWM
> config approach without impacting PWM drivers.
> Fix this driver to use pwm_is_enabled() instead of directly accessing the
> ->flags field.
> 
> Signed-off-by: Boris Brezillon <boris.brezillon@free-electrons.com>
> ---
> Hi Thierry,

Please ignore this patch: it was meant to be sent in reply to the
pwm-atomic series.

> 
> I noticed you applied a few patches adding new PWM drivers in your
> pwm-next tree, and one of them is directly testing the PWMF_ENABLED
> flag which is removed by patch 3 of this series, which means you have to
> apply this patch before patch 3.
> 
> I can resend the whole series if you want, but, unless you have a strong
> reason to refuse it, I'd really like to get those changes in, so that I
> don't have to rebase and fix the series each time a new driver is added.
> 
> Best Regards,
> 
> Boris
> 
>  drivers/pwm/pwm-rcar.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/pwm/pwm-rcar.c b/drivers/pwm/pwm-rcar.c
> index 6e99a63..70899c9 100644
> --- a/drivers/pwm/pwm-rcar.c
> +++ b/drivers/pwm/pwm-rcar.c
> @@ -157,7 +157,7 @@ static int rcar_pwm_config(struct pwm_chip *chip, struct pwm_device *pwm,
>  		return div;
>  
>  	/* Let the core driver set pwm->period if disabled and duty_ns == 0 */
> -	if (!test_bit(PWMF_ENABLED, &pwm->flags) && !duty_ns)
> +	if (!pwm_is_enabled(pwm) && !duty_ns)
>  		return 0;
>  
>  	rcar_pwm_update(rp, RCAR_PWMCR_SYNC, RCAR_PWMCR_SYNC, RCAR_PWMCR);



-- 
Boris Brezillon, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com

  reply	other threads:[~2015-10-10 15:14 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-10-10 15:10 [PATCH v3 pre-03/12] pwm: rcar: make use of pwm_is_enabled() Boris Brezillon
2015-10-10 15:14 ` Boris Brezillon [this message]
  -- strict thread matches above, loose matches on Subject: below --
2015-09-21  9:33 [PATCH v3 00/12] pwm: add support for atomic update Boris Brezillon
2015-10-10 15:11 ` [PATCH v3 pre-03/12] pwm: rcar: make use of pwm_is_enabled() Boris Brezillon

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=20151010171420.6c41f2b5@bbrezillon \
    --to=boris.brezillon@free-electrons.com \
    --cc=dianders@google.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pwm@vger.kernel.org \
    --cc=thierry.reding@gmail.com \
    --cc=u.kleine-koenig@pengutronix.de \
    --cc=yoshihiro.shimoda.uh@renesas.com \
    /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;
as well as URLs for NNTP newsgroup(s).