mirror of
https://github.com/armbian/build.git
synced 2025-08-15 15:46:58 +02:00
60 lines
2.1 KiB
Diff
60 lines
2.1 KiB
Diff
From e1e31f369025b7686026b7471ba1c37b53d12918 Mon Sep 17 00:00:00 2001
|
|
From: Ondrej Jirman <megi@xff.cz>
|
|
Date: Fri, 15 Mar 2024 21:48:34 +0100
|
|
Subject: power: supply: axp20x-usb-power: Add missing interrupts
|
|
|
|
Notify power_supply_change on BC detection interrupts for the consumers
|
|
to get BC results ASAP.
|
|
|
|
Signed-off-by: Ondrej Jirman <megi@xff.cz>
|
|
---
|
|
drivers/mfd/axp20x.c | 2 ++
|
|
drivers/power/supply/axp20x_usb_power.c | 11 +++++++++--
|
|
2 files changed, 11 insertions(+), 2 deletions(-)
|
|
|
|
diff --git a/drivers/mfd/axp20x.c b/drivers/mfd/axp20x.c
|
|
index b8c889b99f59..9be321c8aeae 100644
|
|
--- a/drivers/mfd/axp20x.c
|
|
+++ b/drivers/mfd/axp20x.c
|
|
@@ -347,6 +347,8 @@ static const struct resource axp717_usb_power_supply_resources[] = {
|
|
static const struct resource axp803_usb_power_supply_resources[] = {
|
|
DEFINE_RES_IRQ_NAMED(AXP803_IRQ_VBUS_PLUGIN, "VBUS_PLUGIN"),
|
|
DEFINE_RES_IRQ_NAMED(AXP803_IRQ_VBUS_REMOVAL, "VBUS_REMOVAL"),
|
|
+ DEFINE_RES_IRQ_NAMED(AXP803_IRQ_BC_USB_CHNG, "BC_USB_CHNG"),
|
|
+ DEFINE_RES_IRQ_NAMED(AXP803_IRQ_MV_CHNG, "MV_CHNG"),
|
|
};
|
|
|
|
static const struct resource axp22x_pek_resources[] = {
|
|
diff --git a/drivers/power/supply/axp20x_usb_power.c b/drivers/power/supply/axp20x_usb_power.c
|
|
index b555ba9bf6ad..44cbd429cb91 100644
|
|
--- a/drivers/power/supply/axp20x_usb_power.c
|
|
+++ b/drivers/power/supply/axp20x_usb_power.c
|
|
@@ -728,6 +728,13 @@ static const char * const axp717_irq_names[] = {
|
|
"VBUS_OVER_V",
|
|
};
|
|
|
|
+static const char * const axp813_irq_names[] = {
|
|
+ "VBUS_PLUGIN",
|
|
+ "VBUS_REMOVAL",
|
|
+ "BC_USB_CHNG",
|
|
+ "MV_CHNG",
|
|
+};
|
|
+
|
|
static int axp192_usb_curr_lim_table[] = {
|
|
-1,
|
|
-1,
|
|
@@ -831,8 +838,8 @@ static const struct axp_data axp717_data = {
|
|
|
|
static const struct axp_data axp813_data = {
|
|
.power_desc = &axp813_usb_power_desc,
|
|
- .irq_names = axp22x_irq_names,
|
|
- .num_irq_names = ARRAY_SIZE(axp22x_irq_names),
|
|
+ .irq_names = axp813_irq_names,
|
|
+ .num_irq_names = ARRAY_SIZE(axp813_irq_names),
|
|
.curr_lim_table = axp813_usb_curr_lim_table,
|
|
.curr_lim_table_size = ARRAY_SIZE(axp813_usb_curr_lim_table),
|
|
.curr_lim_fld = REG_FIELD(AXP22X_CHRG_CTRL3, 4, 7),
|
|
--
|
|
2.35.3
|
|
|