diff mbox series

[v2,3/6] power: supply: ug3105_battery: Put FG in standby on remove and shutdown

Message ID 20250107113346.170612-4-hdegoede@redhat.com
State New
Headers show
Series [v2,1/6] power: supply: Add adc-battery-helper | expand

Commit Message

Hans de Goede Jan. 7, 2025, 11:33 a.m. UTC
Put the fuel-gauge in standby mode when the driver is unbound and on
system shutdown.

This avoids unnecessary battery drain when the system is off.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
---
 drivers/power/supply/ug3105_battery.c | 2 ++
 1 file changed, 2 insertions(+)
diff mbox series

Patch

diff --git a/drivers/power/supply/ug3105_battery.c b/drivers/power/supply/ug3105_battery.c
index 3cd0c6944750..8d4ee8c12db9 100644
--- a/drivers/power/supply/ug3105_battery.c
+++ b/drivers/power/supply/ug3105_battery.c
@@ -206,6 +206,8 @@  static struct i2c_driver ug3105_i2c_driver = {
 		.pm = &ug3105_pm_ops,
 	},
 	.probe = ug3105_probe,
+	.remove = ug3105_stop,
+	.shutdown = ug3105_stop,
 	.id_table = ug3105_id,
 };
 module_i2c_driver(ug3105_i2c_driver);