Commit dfcb264a authored by Marek Vasut's avatar Marek Vasut Committed by Sebastian Reichel
Browse files

power: supply: bq27xxx: Stop and start delayed work in suspend and resume



This driver uses delayed work to perform periodic battery state read out.
This delayed work is not stopped across suspend and resume cycle. The
read out can occur early in the resume cycle. In case of an I2C variant
of this hardware, that read out triggers I2C transfer. That I2C transfer
may happen while the I2C controller is still suspended, which produces a
WARNING in the kernel log.

Fix this by introducing trivial PM ops, which stop the delayed work before
the system enters suspend, and schedule the delayed work right after the
system resumes.

Signed-off-by: default avatarMarek Vasut <marex@denx.de>
Reviewed-by: default avatarHans de Goede <hdegoede@redhat.com>
Link: https://lore.kernel.org/r/20231104154920.68585-1-marex@denx.de


Signed-off-by: default avatarSebastian Reichel <sebastian.reichel@collabora.com>
parent 5739da3e
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment