45 lines
1.9 KiB
Diff
45 lines
1.9 KiB
Diff
From 013eee7c0b9fa6008bcc3f6ab14f18f0968c6cf2 Mon Sep 17 00:00:00 2001
|
|
From: Ondrej Jirman <megous@megous.com>
|
|
Date: Sun, 14 Mar 2021 15:49:34 +0100
|
|
Subject: [PATCH 373/478] power: axp803: Add interrupts for low battery power
|
|
condition
|
|
|
|
These are necessary so that the device is woken up by interrupt
|
|
when low on battery, to handle the condition.
|
|
|
|
Signed-off-by: Ondrej Jirman <megous@megous.com>
|
|
---
|
|
drivers/mfd/axp20x.c | 2 ++
|
|
drivers/power/supply/axp20x_battery.c | 2 ++
|
|
2 files changed, 4 insertions(+)
|
|
|
|
diff --git a/drivers/mfd/axp20x.c b/drivers/mfd/axp20x.c
|
|
index 5b3cecac35ce..d08e6f31fcf6 100644
|
|
--- a/drivers/mfd/axp20x.c
|
|
+++ b/drivers/mfd/axp20x.c
|
|
@@ -245,6 +245,8 @@ static const struct resource axp803_battery_resources[] = {
|
|
DEFINE_RES_IRQ_NAMED(AXP803_IRQ_BATT_ACT_TEMP_HIGH_END, "BATT_ACT_TEMP_HIGH_END"),
|
|
DEFINE_RES_IRQ_NAMED(AXP803_IRQ_BATT_ACT_TEMP_LOW, "BATT_ACT_TEMP_LOW"),
|
|
DEFINE_RES_IRQ_NAMED(AXP803_IRQ_BATT_ACT_TEMP_LOW_END, "BATT_ACT_TEMP_LOW_END"),
|
|
+ DEFINE_RES_IRQ_NAMED(AXP803_IRQ_LOW_PWR_LVL1, "BATT_LOW_PWR_LVL1"),
|
|
+ DEFINE_RES_IRQ_NAMED(AXP803_IRQ_LOW_PWR_LVL2, "BATT_LOW_PWR_LVL2"),
|
|
};
|
|
|
|
static const struct resource axp803_pek_resources[] = {
|
|
diff --git a/drivers/power/supply/axp20x_battery.c b/drivers/power/supply/axp20x_battery.c
|
|
index 00804e5aa73a..86b6b51b8c90 100644
|
|
--- a/drivers/power/supply/axp20x_battery.c
|
|
+++ b/drivers/power/supply/axp20x_battery.c
|
|
@@ -617,6 +617,8 @@ static const struct axp_irq_data axp813_irqs[] = {
|
|
{ "BATT_HEALTH_GOOD", axp20x_battery_changed_irq },
|
|
{ "BATT_CHARGING", axp20x_battery_changed_irq },
|
|
{ "BATT_CHARGING_DONE", axp20x_battery_changed_irq },
|
|
+ { "BATT_LOW_PWR_LVL1", axp20x_battery_changed_irq },
|
|
+ { "BATT_LOW_PWR_LVL2", axp20x_battery_changed_irq },
|
|
{ "BATT_CHG_TEMP_HIGH", axp20x_battery_temp_hot_irq },
|
|
{ "BATT_CHG_TEMP_HIGH_END", axp20x_battery_temp_normal_irq },
|
|
{ "BATT_CHG_TEMP_LOW", axp20x_battery_temp_cold_irq },
|
|
--
|
|
2.35.3
|
|
|