Re: [PATCH v7 0/9] leds: st1202: fix multiple bugs in pattern engine and brightness handling

Manuel Fombuena <[email protected]>
Newsgroups org.kernel.vger.linux-leds,org.kernel.vger.linux-kernel
Message-ID <GV1PR08MB8497CC42E6B4C8F7A5545209C5F42@GV1PR08MB8497.eurprd08.prod.outlook.com>
All Sashiko's comments on v7 are pre-existing issues outside the scope of 
this series, with the exception of one comment each on Patch 4 and Patch 
6. Unless there are any other reviewer comments, there will not be a v8.
The pre-existing issues will be addressed in a follow-up submission.

For the sake of clarity, these are the responses to the non-pre-existing
issues.

Patch 4 comment: after pattern_clear() sets all 8 PWM slots to FULL, a
shorter pattern programmed with len < 8 leaves the trailing slots at
100% duty cycle. If another channel runs an 8-step sequence, the
cleared channel flashes at maximum brightness during its unused steps.

Response: this is a consequence of the pre-existing issue where
st1202_led_pattern_set() does not zero trailing slots when
len < ST1202_MAX_PATTERNS. The root fix is outside the scope of this
series and will be addressed in a follow-up submission.

Patch 6 comment: the loop in st1202_brightness_set() ignores the
return value of st1202_pwm_pattern_write(), potentially continuing
writes after a bus failure.

Response: as noted in the response to the v6 review, this is
intentional. A transient I2C error on one slot does not guarantee
subsequent writes will also fail. Breaking early would leave remaining
PWM slots unwritten unnecessarily, putting the channel in a partially
updated state. brightness_set() is a void callback and cannot propagate
errors regardless, and st1202_write_reg() already logs each individual
failure via dev_err().

--
Manuel Fombuena
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.