From mboxrd@z Thu Jan 1 00:00:00 1970 From: Heiko Stuebner 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 Message-ID: <1707507.TOMHpQGrZ7@phil> References: <20190312214605.10223-1-u.kleine-koenig@pengutronix.de> <20190312214605.10223-2-u.kleine-koenig@pengutronix.de> Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Return-path: In-Reply-To: <20190312214605.10223-2-u.kleine-koenig-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "Linux-rockchip" Errors-To: linux-rockchip-bounces+glpar-linux-rockchip=m.gmane.org-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org To: Uwe =?ISO-8859-1?Q?Kleine=2DK=F6nig?= Cc: linux-pwm-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, Maxime Ripard , briannorris-F7+t8E8rja9g9hUCZPvPmw@public.gmane.org, dianders-F7+t8E8rja9g9hUCZPvPmw@public.gmane.org, linux-rockchip-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org, Chen-Yu Tsai , Thierry Reding , kernel-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org List-Id: linux-rockchip.vger.kernel.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=E4rz 2019, 22:46:03 CET schrieb Uwe Kleine-K=F6nig: > 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=F6nig 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 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); > = > =