From: Hans de Goede <hansg@kernel.org>
To: Sebastian Reichel <sre@kernel.org>,
Linus Walleij <linus.walleij@linaro.org>
Cc: Hans de Goede <hansg@kernel.org>, linux-pm@vger.kernel.org
Subject: [PATCH v4 3/5] power: supply: ug3105_battery: Put FG in standby on remove and shutdown
Date: Sun, 31 Aug 2025 14:29:39 +0200 [thread overview]
Message-ID: <20250831122942.47875-4-hansg@kernel.org> (raw)
In-Reply-To: <20250831122942.47875-1-hansg@kernel.org>
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.
Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Hans de Goede <hansg@kernel.org>
---
drivers/power/supply/ug3105_battery.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/power/supply/ug3105_battery.c b/drivers/power/supply/ug3105_battery.c
index 70dd58e121e3..c4d4ac859fa4 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);
--
2.51.0
next prev parent reply other threads:[~2025-08-31 12:29 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-08-31 12:29 [PATCH v4 0/5] power: supply: Add adc-battery-helper lib and Intel Dollar Cove TI CC battery driver Hans de Goede
2025-08-31 12:29 ` [PATCH v4 1/5] power: supply: Add adc-battery-helper Hans de Goede
2025-08-31 12:29 ` [PATCH v4 2/5] power: supply: ug3105_battery: Switch to adc-battery-helper Hans de Goede
2025-08-31 12:29 ` Hans de Goede [this message]
2025-08-31 12:29 ` [PATCH v4 4/5] power: supply: adc-battery-helper: Add support for optional charge_finished GPIO Hans de Goede
2025-08-31 12:29 ` [PATCH v4 5/5] power: supply: Add new Intel Dollar Cove TI battery driver Hans de Goede
2025-09-05 23:59 ` Sebastian Reichel
2025-09-10 14:07 ` Hans de Goede
2025-09-05 23:59 ` [PATCH v4 0/5] power: supply: Add adc-battery-helper lib and Intel Dollar Cove TI CC " Sebastian Reichel
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20250831122942.47875-4-hansg@kernel.org \
--to=hansg@kernel.org \
--cc=linus.walleij@linaro.org \
--cc=linux-pm@vger.kernel.org \
--cc=sre@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox