summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEd Robbins <edd.robbins@googlemail.com>2024-10-18 07:07:30 +0100
committerSebastian Reichel <sebastian.reichel@collabora.com>2024-11-10 03:33:17 +0100
commit3287673c1d26f94845ef958090c583c46054b70d (patch)
treef3729bf751e271c28b014a91794721f9831b4c8e
parent83bce34420eaf91506957703bf9a31d8581ed6cb (diff)
downloadlinux-stable-3287673c1d26f94845ef958090c583c46054b70d.tar.gz
linux-stable-3287673c1d26f94845ef958090c583c46054b70d.tar.bz2
linux-stable-3287673c1d26f94845ef958090c583c46054b70d.zip
power: supply: pmu_battery: Set power supply type to BATTERY
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@gmail.com> Link: https://lore.kernel.org/r/IOFJLS.120OJ5KJG9R72@googlemail.com Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
-rw-r--r--drivers/power/supply/pmu_battery.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/power/supply/pmu_battery.c b/drivers/power/supply/pmu_battery.c
index eaab7500d99b..ed83c5e05ca3 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;