37 lines
1.1 KiB
Diff
37 lines
1.1 KiB
Diff
|
From b9371768ff49094ad74b66e5a76134e2cc071372 Mon Sep 17 00:00:00 2001
|
||
|
From: Ondrej Jirman <megi@xff.cz>
|
||
|
Date: Sat, 27 Aug 2022 20:50:43 +0200
|
||
|
Subject: [PATCH 233/469] power: supply: axp20x-battery: Enable poweron by RTC
|
||
|
alarm
|
||
|
|
||
|
For the Pinephone to be able to poweron on RTC alarm, some bits in
|
||
|
PMIC need to be enabled. This will cause PMIC to be wakeable by
|
||
|
SoC pulling the interrupt line low.
|
||
|
|
||
|
This may need some coordination from a bootloader.
|
||
|
|
||
|
Signed-off-by: Ondrej Jirman <megi@xff.cz>
|
||
|
---
|
||
|
drivers/power/supply/axp20x_battery.c | 5 +++++
|
||
|
1 file changed, 5 insertions(+)
|
||
|
|
||
|
diff --git a/drivers/power/supply/axp20x_battery.c b/drivers/power/supply/axp20x_battery.c
|
||
|
index e982f66f5f28..c7834aa73d6b 100644
|
||
|
--- a/drivers/power/supply/axp20x_battery.c
|
||
|
+++ b/drivers/power/supply/axp20x_battery.c
|
||
|
@@ -856,6 +856,11 @@ static int axp20x_power_probe(struct platform_device *pdev)
|
||
|
ret = regmap_update_bits(axp20x_batt->regmap, 0x84, 0x37, 0x31);
|
||
|
if (ret)
|
||
|
goto warn_bat;
|
||
|
+
|
||
|
+ // enable poweron by RTC
|
||
|
+ ret = regmap_update_bits(axp20x_batt->regmap, 0x8f, BIT(7), BIT(7));
|
||
|
+ if (ret)
|
||
|
+ goto warn_bat;
|
||
|
}
|
||
|
|
||
|
return 0;
|
||
|
--
|
||
|
2.34.1
|
||
|
|