Skip to content

Commit 3287673

Browse files
Ed Robbinssre
authored andcommitted
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>
1 parent 83bce34 commit 3287673

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

drivers/power/supply/pmu_battery.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -170,6 +170,7 @@ static int __init pmu_bat_init(void)
170170
pbat->bat_desc.properties = pmu_bat_props;
171171
pbat->bat_desc.num_properties = ARRAY_SIZE(pmu_bat_props);
172172
pbat->bat_desc.get_property = pmu_bat_get_property;
173+
pbat->bat_desc.type = POWER_SUPPLY_TYPE_BATTERY;
173174
pbat->pbi = &pmu_batteries[i];
174175
psy_cfg.drv_data = pbat;
175176

0 commit comments

Comments
 (0)