sunxi-6.6: megous patches: rebase to v6.6.54, fix and re-export

This commit is contained in:
The-going 2024-10-10 13:22:06 +03:00 committed by c0rnelius
parent 6795f859a7
commit 9c3c3edde0
5 changed files with 33 additions and 32 deletions

View File

@ -1,4 +1,4 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From 553f3addd1b814302432963da50a6d49acacba9e Mon Sep 17 00:00:00 2001
From: Ondrej Jirman <megi@xff.cz>
Date: Thu, 10 Nov 2022 20:05:58 +0100
Subject: power: supply: axp20x-battery: Add support for
@ -8,11 +8,11 @@ Report total battery capacity.
Signed-off-by: Ondrej Jirman <megi@xff.cz>
---
drivers/power/supply/axp20x_battery.c | 20 ++++++++--
drivers/power/supply/axp20x_battery.c | 20 ++++++++++++++++----
1 file changed, 16 insertions(+), 4 deletions(-)
diff --git a/drivers/power/supply/axp20x_battery.c b/drivers/power/supply/axp20x_battery.c
index 2c77a2b1da76..cc79c75a7ba5 100644
index ff88678e61ad..f60e75465431 100644
--- a/drivers/power/supply/axp20x_battery.c
+++ b/drivers/power/supply/axp20x_battery.c
@@ -85,6 +85,7 @@ struct axp20x_batt_ps {
@ -40,16 +40,16 @@ index 2c77a2b1da76..cc79c75a7ba5 100644
default:
return -EINVAL;
}
@@ -563,6 +574,8 @@ static enum power_supply_property axp20x_battery_props[] = {
POWER_SUPPLY_PROP_VOLTAGE_MAX_DESIGN,
POWER_SUPPLY_PROP_VOLTAGE_MIN_DESIGN,
@@ -564,6 +575,8 @@ static enum power_supply_property axp20x_battery_props[] = {
POWER_SUPPLY_PROP_VOLTAGE_MAX,
POWER_SUPPLY_PROP_VOLTAGE_MIN,
POWER_SUPPLY_PROP_CAPACITY,
+ POWER_SUPPLY_PROP_ENERGY_FULL_DESIGN,
+ POWER_SUPPLY_PROP_ENERGY_EMPTY_DESIGN,
};
static int axp20x_battery_prop_writeable(struct power_supply *psy,
@@ -703,7 +716,6 @@ static int axp20x_power_probe(struct platform_device *pdev)
@@ -704,7 +717,6 @@ static int axp20x_power_probe(struct platform_device *pdev)
struct axp20x_dev *axp20x = dev_get_drvdata(pdev->dev.parent);
struct axp20x_batt_ps *axp20x_batt;
struct power_supply_config psy_cfg = {};
@ -57,7 +57,7 @@ index 2c77a2b1da76..cc79c75a7ba5 100644
struct device *dev = &pdev->dev;
const struct axp_irq_data *irq_data;
int irq, ret;
@@ -760,9 +772,9 @@ static int axp20x_power_probe(struct platform_device *pdev)
@@ -761,9 +773,9 @@ static int axp20x_power_probe(struct platform_device *pdev)
axp20x_batt->health = POWER_SUPPLY_HEALTH_GOOD;
@ -71,5 +71,5 @@ index 2c77a2b1da76..cc79c75a7ba5 100644
if (vmin > 0 && axp20x_set_voltage_min_design(axp20x_batt,
vmin))
--
Armbian
2.35.3

View File

@ -1,4 +1,4 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From 4f3724e31da5ba29408cdbd893717c145f40af34 Mon Sep 17 00:00:00 2001
From: Ondrej Jirman <megi@xff.cz>
Date: Sat, 27 Aug 2022 20:50:43 +0200
Subject: power: supply: axp20x-battery: Enable poweron by RTC alarm
@ -15,10 +15,10 @@ Signed-off-by: Ondrej Jirman <megi@xff.cz>
1 file changed, 5 insertions(+)
diff --git a/drivers/power/supply/axp20x_battery.c b/drivers/power/supply/axp20x_battery.c
index 4e2d659651e7..2c77a2b1da76 100644
index 0b7002d6a35d..ff88678e61ad 100644
--- a/drivers/power/supply/axp20x_battery.c
+++ b/drivers/power/supply/axp20x_battery.c
@@ -855,6 +855,11 @@ static int axp20x_power_probe(struct platform_device *pdev)
@@ -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;
@ -31,5 +31,5 @@ index 4e2d659651e7..2c77a2b1da76 100644
return 0;
--
Armbian
2.35.3

View File

@ -1,4 +1,4 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From 23bf1ca9d11a1c0160eb3087ebc48d6ba77fe54c Mon Sep 17 00:00:00 2001
From: Ondrej Jirman <megi@xff.cz>
Date: Sat, 2 Apr 2022 02:50:14 +0200
Subject: power: supply: axp20x-battery: Support
@ -8,11 +8,11 @@ Support force disabling the charger in a more standardized way.
Signed-off-by: Ondrej Jirman <megi@xff.cz>
---
drivers/power/supply/axp20x_battery.c | 30 ++++++++++
1 file changed, 30 insertions(+)
drivers/power/supply/axp20x_battery.c | 31 +++++++++++++++++++++++++++
1 file changed, 31 insertions(+)
diff --git a/drivers/power/supply/axp20x_battery.c b/drivers/power/supply/axp20x_battery.c
index b7b3e6b945dd..4e2d659651e7 100644
index 3c705827af50..0b7002d6a35d 100644
--- a/drivers/power/supply/axp20x_battery.c
+++ b/drivers/power/supply/axp20x_battery.c
@@ -227,6 +227,19 @@ static int axp20x_battery_get_prop(struct power_supply *psy,
@ -35,10 +35,11 @@ index b7b3e6b945dd..4e2d659651e7 100644
case POWER_SUPPLY_PROP_STATUS:
ret = regmap_read(axp20x_batt->regmap, AXP20X_PWR_OP_MODE,
&reg);
@@ -504,6 +517,21 @@ static int axp20x_battery_set_prop(struct power_supply *psy,
@@ -504,6 +517,22 @@ static int axp20x_battery_set_prop(struct power_supply *psy,
case POWER_SUPPLY_PROP_CONSTANT_CHARGE_CURRENT_MAX:
return axp20x_set_max_constant_charge_current(axp20x_batt,
val->intval);
+
+ case POWER_SUPPLY_PROP_CHARGE_BEHAVIOUR:
+ switch (val->intval) {
+ case POWER_SUPPLY_CHARGE_BEHAVIOUR_AUTO:
@ -57,7 +58,7 @@ index b7b3e6b945dd..4e2d659651e7 100644
case POWER_SUPPLY_PROP_STATUS:
switch (val->intval) {
case POWER_SUPPLY_STATUS_CHARGING:
@@ -525,6 +553,7 @@ static enum power_supply_property axp20x_battery_props[] = {
@@ -525,6 +554,7 @@ static enum power_supply_property axp20x_battery_props[] = {
POWER_SUPPLY_PROP_PRESENT,
POWER_SUPPLY_PROP_ONLINE,
POWER_SUPPLY_PROP_STATUS,
@ -65,14 +66,14 @@ index b7b3e6b945dd..4e2d659651e7 100644
POWER_SUPPLY_PROP_VOLTAGE_NOW,
POWER_SUPPLY_PROP_CURRENT_NOW,
POWER_SUPPLY_PROP_CONSTANT_CHARGE_CURRENT,
@@ -540,6 +569,7 @@ static int axp20x_battery_prop_writeable(struct power_supply *psy,
@@ -540,6 +570,7 @@ static int axp20x_battery_prop_writeable(struct power_supply *psy,
enum power_supply_property psp)
{
return psp == POWER_SUPPLY_PROP_STATUS ||
+ psp == POWER_SUPPLY_PROP_CHARGE_BEHAVIOUR ||
psp == POWER_SUPPLY_PROP_VOLTAGE_MIN_DESIGN ||
psp == POWER_SUPPLY_PROP_VOLTAGE_MAX_DESIGN ||
psp == POWER_SUPPLY_PROP_VOLTAGE_MIN ||
psp == POWER_SUPPLY_PROP_VOLTAGE_MAX ||
psp == POWER_SUPPLY_PROP_CONSTANT_CHARGE_CURRENT ||
--
Armbian
2.35.3

View File

@ -1,4 +1,4 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From dc23bd741380f26533b0e21bcaf6081a2d2b4b4d Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Ond=C5=99ej=20Jirman?= <megi@xff.cz>
Date: Fri, 28 Feb 2020 19:16:46 +0100
Subject: power: supply: axp20x_battery: Add support for reporting OCV
@ -7,11 +7,11 @@ Export OCV reported by PMIC via sysfs.
Signed-off-by: Ondrej Jirman <megi@xff.cz>
---
drivers/power/supply/axp20x_battery.c | 23 ++++++++++
drivers/power/supply/axp20x_battery.c | 23 +++++++++++++++++++++++
1 file changed, 23 insertions(+)
diff --git a/drivers/power/supply/axp20x_battery.c b/drivers/power/supply/axp20x_battery.c
index f24520719a74..bad981c349ff 100644
index 30ad3409e865..408f23f0b10c 100644
--- a/drivers/power/supply/axp20x_battery.c
+++ b/drivers/power/supply/axp20x_battery.c
@@ -180,6 +180,25 @@ static int axp20x_get_constant_charge_current(struct axp20x_batt_ps *axp,
@ -55,9 +55,9 @@ index f24520719a74..bad981c349ff 100644
POWER_SUPPLY_PROP_CONSTANT_CHARGE_CURRENT_MAX,
POWER_SUPPLY_PROP_HEALTH,
+ POWER_SUPPLY_PROP_VOLTAGE_OCV,
POWER_SUPPLY_PROP_VOLTAGE_MAX_DESIGN,
POWER_SUPPLY_PROP_VOLTAGE_MIN_DESIGN,
POWER_SUPPLY_PROP_VOLTAGE_MAX,
POWER_SUPPLY_PROP_VOLTAGE_MIN,
POWER_SUPPLY_PROP_CAPACITY,
--
Armbian
2.35.3

View File

@ -1,4 +1,4 @@
From d73ef934b16a409b6e9ea83f270981f4c20526fb Mon Sep 17 00:00:00 2001
From 3cb45fa702ff5424d1ee744759a814ef844eeb97 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Ond=C5=99ej=20Jirman?= <megi@xff.cz>
Date: Thu, 18 Feb 2021 07:48:07 +0100
Subject: usb: quirks: Add USB_QUIRK_RESET for Quectel EG25G Modem
@ -11,10 +11,10 @@ Signed-off-by: Ondrej Jirman <megi@xff.cz>
1 file changed, 3 insertions(+)
diff --git a/drivers/usb/core/quirks.c b/drivers/usb/core/quirks.c
index b4783574b8e6..ecfd4b6ab602 100644
index 13171454f959..0494c8bb42a7 100644
--- a/drivers/usb/core/quirks.c
+++ b/drivers/usb/core/quirks.c
@@ -549,6 +549,9 @@ static const struct usb_device_id usb_quirk_list[] = {
@@ -552,6 +552,9 @@ static const struct usb_device_id usb_quirk_list[] = {
/* INTEL VALUE SSD */
{ USB_DEVICE(0x8086, 0xf1a5), .driver_info = USB_QUIRK_RESET_RESUME },