Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider: - [Medium] qcom-wled: missing brightness sync toggle for WLED4 --
commit 80c30ca9ff45480f825b4f3ca26c694d9fa71acf Author: Dmitry Baryshkov <[email protected]> backlight: qcom-wled: fix string detection brightness on WLED5 This patch updates the auto string detection logic to properly latch new brightness values for WLED5. It introduces a helper function to set the brightness and apply the version-specific sync toggle. > diff --git a/drivers/video/backlight/qcom-wled.c > b/drivers/video/backlight/qcom-wled.c > index f2e0430cccbca..6fbac6a4c29b8 100644 > --- a/drivers/video/backlight/qcom-wled.c > +++ b/drivers/video/backlight/qcom-wled.c > @@ -577,6 +577,17 @@ static irqreturn_t wled_short_irq_handler(int irq, void > *_wled) > > #define AUTO_DETECT_BRIGHTNESS 200 > > +static int wled_auto_detect_set_brightness(struct wled *wled, u16 brightness) > +{ > + int rc; > + > + rc = wled->wled_set_brightness(wled, brightness); > + if (rc < 0 || wled->version < 5) > + return rc; [Severity: Medium] Does this code introduce a regression for WLED4 devices by missing the brightness sync toggle? During WLED4 auto string detection, the code updates the brightness to a low test value, but it appears to return without latching it. Looking at the standard brightness update path in wled_update_status(), WLED4 hardware requires a sync toggle to apply brightness changes: drivers/video/backlight/qcom-wled.c:wled_update_status() { ... if (wled->version < 5) { rc = wled->wled_sync_toggle(wled); ... } Without syncing the auto-detect test brightness, WLED4 might run the detection with stale, potentially high brightness. Could this trigger false over-voltage (OVP) faults and incorrectly mark valid LED strings as disconnected? > + > + return wled5_mod_sync_toggle(wled); > +} -- Sashiko AI review ยท https://sashiko.dev/#/patchset/[email protected]?part=2
