summaryrefslogtreecommitdiffstats
path: root/drivers/power/supply/rk817_charger.c
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-18 17:35:05 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-18 17:39:31 +0000
commit85c675d0d09a45a135bddd15d7b385f8758c32fb (patch)
tree76267dbc9b9a130337be3640948fe397b04ac629 /drivers/power/supply/rk817_charger.c
parentAdding upstream version 6.6.15. (diff)
downloadlinux-85c675d0d09a45a135bddd15d7b385f8758c32fb.tar.xz
linux-85c675d0d09a45a135bddd15d7b385f8758c32fb.zip
Adding upstream version 6.7.7.upstream/6.7.7
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'drivers/power/supply/rk817_charger.c')
-rw-r--r--drivers/power/supply/rk817_charger.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/drivers/power/supply/rk817_charger.c b/drivers/power/supply/rk817_charger.c
index f64daf5a41..7ca91739c6 100644
--- a/drivers/power/supply/rk817_charger.c
+++ b/drivers/power/supply/rk817_charger.c
@@ -1207,11 +1207,24 @@ static int rk817_charger_probe(struct platform_device *pdev)
return 0;
}
+static int __maybe_unused rk817_resume(struct device *dev)
+{
+
+ struct rk817_charger *charger = dev_get_drvdata(dev);
+
+ /* force an immediate update */
+ mod_delayed_work(system_wq, &charger->work, 0);
+
+ return 0;
+}
+
+static SIMPLE_DEV_PM_OPS(rk817_charger_pm, NULL, rk817_resume);
static struct platform_driver rk817_charger_driver = {
.probe = rk817_charger_probe,
.driver = {
.name = "rk817-charger",
+ .pm = &rk817_charger_pm,
},
};
module_platform_driver(rk817_charger_driver);