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:
quoted
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 <redacted>
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/ |