[PATCH] backlight: lm3630a: convert to atomic PWM API and check for errors
Uwe Kleine-König
u.kleine-koenig at pengutronix.de
Fri Jun 18 21:17:46 UTC 2021
On Fri, Jun 18, 2021 at 11:31:09AM +0100, Daniel Thompson wrote:
> On Fri, Jun 18, 2021 at 10:58:44AM +0200, Uwe Kleine-König wrote:
> > The practical upside here is that this only needs a single API call to
> > program the hardware which (depending on the underlaying hardware) can
> > be more effective and prevents glitches.
> >
> > Up to now the return value of the pwm functions was ignored. Fix this
> > and propagate the error to the caller.
> >
> > Signed-off-by: Uwe Kleine-König <u.kleine-koenig at pengutronix.de>
>
> New code looks OK but these changes reveal just how crazy the return codes
> from this driver's update_status() methods are since now the new (PWM) error path is
> structured completely differently to the existing (I2C) error path.
Indeed, while working on the patch I noticed that sometimes a positive
value is returned but failed to note that when I sent out the patch.
> Are you OK to add a patch *before* this one to fix the existing code
> paths before making the PWM changes?
I didn't do that because I was unsure what is the right thing to do. Now
that you confirmed the documentation I can add such a patch. Will add
this to my todo list.
Best regards
Uwe
--
Pengutronix e.K. | Uwe Kleine-König |
Industrial Linux Solutions | https://www.pengutronix.de/ |
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 488 bytes
Desc: not available
URL: <https://lists.freedesktop.org/archives/dri-devel/attachments/20210618/9add5a3b/attachment.sig>
More information about the dri-devel
mailing list