[PATCH] pmu_battery: Set power supply type to BATTERY
Ed Robbins
edd.robbins at googlemail.com
Fri Oct 18 17:07:30 AEDT 2024
If the power supply type is not set it defaults to "Unknown" and upower
does not recognise it. In turn battery monitor applications do not see a
battery. Setting to POWER_SUPPLY_TYPE_BATTERY fixes this.
Signed-off-by: Ed Robbins <edd.robbins at gmail.com>
---
drivers/power/supply/pmu_battery.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/power/supply/pmu_battery.c
b/drivers/power/supply/pmu_battery.c
index eaab7500d9..ed83c5e05c 100644
--- a/drivers/power/supply/pmu_battery.c
+++ b/drivers/power/supply/pmu_battery.c
@@ -170,6 +170,7 @@ static int __init pmu_bat_init(void)
pbat->bat_desc.properties = pmu_bat_props;
pbat->bat_desc.num_properties = ARRAY_SIZE(pmu_bat_props);
pbat->bat_desc.get_property = pmu_bat_get_property;
+ pbat->bat_desc.type = POWER_SUPPLY_TYPE_BATTERY;
pbat->pbi = &pmu_batteries[i];
psy_cfg.drv_data = pbat;
--
2.34.1
More information about the Linuxppc-dev
mailing list