From: Ed Robbins Date: Fri, 18 Oct 2024 06:07:30 +0000 (+0100) Subject: power: supply: pmu_battery: Set power supply type to BATTERY X-Git-Tag: v6.13-rc1~43^2~8 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=3287673c1d26f94845ef958090c583c46054b70d;p=thirdparty%2Fkernel%2Flinux.git 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 Link: https://lore.kernel.org/r/IOFJLS.120OJ5KJG9R72@googlemail.com Signed-off-by: Sebastian Reichel --- diff --git a/drivers/power/supply/pmu_battery.c b/drivers/power/supply/pmu_battery.c index eaab7500d99b5..ed83c5e05ca32 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;