From: Heiko Stuebner <heiko-4mtYJXux2i+zQB+pC5nmwQ@public.gmane.org>
To: "Uwe Kleine-König"
<u.kleine-koenig-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org>
Cc: linux-pwm-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
Maxime Ripard
<maxime.ripard-LDxbnhwyfcJBDgjK7y7TUQ@public.gmane.org>,
briannorris-F7+t8E8rja9g9hUCZPvPmw@public.gmane.org,
dianders-F7+t8E8rja9g9hUCZPvPmw@public.gmane.org,
linux-rockchip-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org,
Chen-Yu Tsai <wens-jdAy2FN1RRM@public.gmane.org>,
Thierry Reding
<thierry.reding-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>,
kernel-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org
Subject: Re: [PATCH v2 1/3] pwm: rockchip: Don't update the state for the caller of pwm_apply_state()
Date: Sat, 30 Mar 2019 10:17:42 +0100 [thread overview]
Message-ID: <1707507.TOMHpQGrZ7@phil> (raw)
In-Reply-To: <20190312214605.10223-2-u.kleine-koenig-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org>
Hi,
[adding two chromeos people, because veyron and gru are quite
heavy users of the rockchip pwm for both backlight and regulators]
Doug, Brian: patchwork patch is here:
https://patchwork.kernel.org/patch/10851001/
Am Dienstag, 12. März 2019, 22:46:03 CET schrieb Uwe Kleine-König:
> The pwm-rockchip driver is one of only two PWM drivers which updates the
> state for the caller of pwm_apply_state(). This might have surprising
> results if the caller reuses the values expecting them to still
> represent the same state. Also note that this feedback was incomplete as
> the matching struct pwm_device::state wasn't updated and so
> pwm_get_state still returned the originally requested state.
>
> Signed-off-by: Uwe Kleine-König <u.kleine-koenig-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org>
I've tested this on both veyron and gru with backlight and pwm regulator
and at least both still come up, so
Tested-by: Heiko Stuebner <heiko-4mtYJXux2i+zQB+pC5nmwQ@public.gmane.org>
But hopefully Doug or Brian could also provide another test-point.
Heiko
> ---
> drivers/pwm/pwm-rockchip.c | 6 ------
> 1 file changed, 6 deletions(-)
>
> diff --git a/drivers/pwm/pwm-rockchip.c b/drivers/pwm/pwm-rockchip.c
> index 4d99d468df09..16186bcd99e0 100644
> --- a/drivers/pwm/pwm-rockchip.c
> +++ b/drivers/pwm/pwm-rockchip.c
> @@ -215,12 +215,6 @@ static int rockchip_pwm_apply(struct pwm_chip *chip, struct pwm_device *pwm,
> goto out;
> }
>
> - /*
> - * Update the state with the real hardware, which can differ a bit
> - * because of period/duty_cycle approximation.
> - */
> - rockchip_pwm_get_state(chip, pwm, state);
> -
> out:
> clk_disable(pc->pclk);
>
>
next prev parent reply other threads:[~2019-03-30 9:17 UTC|newest]
Thread overview: 28+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-03-12 21:46 [PATCH v2 0/3] pwm: ensure pwm_apply_state() doesn't modify the state argument Uwe Kleine-König
[not found] ` <20190312214605.10223-1-u.kleine-koenig-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org>
2019-03-12 21:46 ` [PATCH v2 1/3] pwm: rockchip: Don't update the state for the caller of pwm_apply_state() Uwe Kleine-König
[not found] ` <20190312214605.10223-2-u.kleine-koenig-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org>
2019-03-30 9:17 ` Heiko Stuebner [this message]
2019-04-01 22:45 ` Doug Anderson
[not found] ` <CAD=FV=WZHouhGcxOgNG3006XajJQaAp0uq9WjeKRikQx1ru4TA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2019-04-08 14:39 ` Uwe Kleine-König
[not found] ` <20190408143914.uucb5dwafq3cnsmk-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org>
2019-04-19 0:27 ` Brian Norris
[not found] ` <CA+ASDXO=szekU97iTDK9vqWjT+JtAKeCNTyoY=8aSi5d+v4mkA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2019-04-29 6:56 ` Uwe Kleine-König
[not found] ` <20190429065613.n52uwgys5eugmssd-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org>
2019-04-29 11:18 ` Thierry Reding
2019-04-29 13:11 ` Uwe Kleine-König
[not found] ` <20190429131127.x535uhhtputb7zwl-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org>
2019-04-29 16:28 ` Thierry Reding
2019-04-30 9:14 ` Uwe Kleine-König
2019-04-29 18:04 ` Doug Anderson
[not found] ` <CAD=FV=U71u39ZHkBBfAXVAP=_hY-bAw3L7JdhC=36jkUVxPOmQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2019-04-30 9:28 ` Uwe Kleine-König
[not found] ` <20190430092824.ijtq3gfh6mqujvnk-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org>
2019-04-30 14:38 ` Doug Anderson
[not found] ` <CAD=FV=WUi0NbsRDJA_4WeC62QYXjLNH2OygU1FOCx==W0SyqpQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2019-05-02 6:48 ` Uwe Kleine-König
2019-05-02 7:16 ` Boris Brezillon
[not found] ` <20190502091638.0f5a40b0-ZGY8ohtN/8qB+jHODAdFcQ@public.gmane.org>
2019-05-02 7:33 ` Uwe Kleine-König
[not found] ` <20190502073326.sgqgkiexjkipvi27-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org>
2019-05-02 8:09 ` Boris Brezillon
[not found] ` <20190502100951.23ef9ed1-ZGY8ohtN/8qB+jHODAdFcQ@public.gmane.org>
2019-05-02 8:42 ` Uwe Kleine-König
[not found] ` <20190502084243.anz5myut63g4torn-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org>
2019-05-03 10:59 ` Thierry Reding
2019-05-03 19:59 ` Uwe Kleine-König
2019-04-29 11:03 ` Thierry Reding
2019-04-29 12:31 ` Uwe Kleine-König
[not found] ` <20190429123102.7wfcdqusn24g5rm7-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org>
2019-04-29 16:17 ` Thierry Reding
2019-04-29 21:08 ` Uwe Kleine-König
2019-04-29 10:49 ` Thierry Reding
2019-03-12 21:46 ` [PATCH v2 2/3] pwm: sun4i: " Uwe Kleine-König
2019-03-12 21:46 ` [PATCH v2 3/3] pwm: ensure pwm_apply_state() doesn't modify the state argument Uwe Kleine-König
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=1707507.TOMHpQGrZ7@phil \
--to=heiko-4mtyjxux2i+zqb+pc5nmwq@public.gmane.org \
--cc=briannorris-F7+t8E8rja9g9hUCZPvPmw@public.gmane.org \
--cc=dianders-F7+t8E8rja9g9hUCZPvPmw@public.gmane.org \
--cc=kernel-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org \
--cc=linux-pwm-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=linux-rockchip-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org \
--cc=maxime.ripard-LDxbnhwyfcJBDgjK7y7TUQ@public.gmane.org \
--cc=thierry.reding-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
--cc=u.kleine-koenig-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org \
--cc=wens-jdAy2FN1RRM@public.gmane.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.