On Mon, Oct 21, 2019 at 01:18:47PM +0200, Uwe Kleine-König wrote: > On Mon, Oct 21, 2019 at 12:58:30PM +0200, Thierry Reding wrote: > > It turns out that commit 01ccf903edd6 ("pwm: Let pwm_get_state() return > > the last implemented state") causes backlight failures on a number of > > boards. The reason is that some of the drivers do not write the full > > state through to the hardware registers, which means that ->get_state() > > subsequently does not return the correct state. Consumers which rely on > > pwm_get_state() returning the current state will therefore get confused > > and subsequently try to program a bad state. > > > > Before this change can be made, existing drivers need to be more > > carefully audited and fixed to behave as the framework expects. Until > > then, keep the original behaviour of returning the software state that > > was applied rather than reading the state back from hardware. > > I would really prefer to fix that in the framework instead. This is There's nothing to fix in the framework. The framework isn't broken, the drivers are. > something that affects several drivers (cros-ec, imx27, atmel, imx-tpm, > lpss, meson, sifive, sprd and stm32-lp). This is im my eyes really > sufficient to justify a framework wide solution instead of adapting > several drivers in a way that doesn't affect the values programmed to > hardware. Can you come up with a proposal for how to want to implement this in the framework? Thierry > > Signed-off-by: Thierry Reding > > Reviewed-by: Uwe Kleine-König > > Thanks > Uwe > > -- > Pengutronix e.K. | Uwe Kleine-König | > Industrial Linux Solutions | http://www.pengutronix.de/ |