Skip to content

regulator: edatec-panel-regulator: Fix backlight power state restoration#7457

Merged
pelwell merged 1 commit into
raspberrypi:rpi-6.18.yfrom
FrankLeeEDA:rpi-6.18.y
Jun 26, 2026
Merged

regulator: edatec-panel-regulator: Fix backlight power state restoration#7457
pelwell merged 1 commit into
raspberrypi:rpi-6.18.yfrom
FrankLeeEDA:rpi-6.18.y

Conversation

@FrankLeeEDA

Copy link
Copy Markdown
Contributor

The previous implementation only wrote to the REG_PWR register when bl_power was explicitly 1 or 4. This caused a bug where transitioning from a low-power state (1 or 4) back to the normal backlight state (0) would not trigger a register update, leaving the panel in an incorrect power state.
Introduce the 'bl_power_last' field in struct ed_regulator to cache the last written power state. Update the status only when the new power state differs from the cached one. This ensures that any change in the backlight power state is correctly propagated to the hardware.

The previous implementation only wrote to the REG_PWR register when
bl_power was explicitly 1 or 4. This caused a bug where transitioning
from a low-power state (1 or 4) back to the normal backlight state (0)
would not trigger a register update, leaving the panel in an incorrect
power state.

Signed-off-by: FrankLeeEDA <Fli@edatec.cn>
@pelwell

pelwell commented Jun 26, 2026

Copy link
Copy Markdown
Contributor

That looks OK to me, assuming it does what you want.

@pelwell pelwell merged commit ab086ca into raspberrypi:rpi-6.18.y Jun 26, 2026
12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants