Skip to content

Commit

Permalink
power: supply: pmu_battery: Set power supply type to BATTERY
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Ed Robbins authored and Sebastian Reichel committed Nov 10, 2024
1 parent 83bce34 commit 3287673
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions drivers/power/supply/pmu_battery.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down

0 comments on commit 3287673

Please sign in to comment.