Skip to content

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

Open
FrankLeeEDA wants to merge 1 commit into
raspberrypi:rpi-6.18.yfrom
FrankLeeEDA:rpi-6.18.y
Open

regulator: edatec-panel-regulator: Fix backlight power state restoration#7457
FrankLeeEDA wants to merge 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>
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.

1 participant