Skip to content

Commit

Permalink
sm8350: drivers: battery: sec_battery: Fix multiplication factor for …
Browse files Browse the repository at this point in the history
…input voltage

cat /sys/class/power_supply/usb/voltage_max
5000000

Change-Id: Ic3e9de3aee5c5fd47c68bd6ff8c8abd28e55dc83
  • Loading branch information
cryptomilk authored and retrozenith committed Nov 5, 2024
1 parent 532df45 commit 7ea398b
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions drivers/battery/common/sec_battery.c
Original file line number Diff line number Diff line change
Expand Up @@ -5189,8 +5189,8 @@ static int sec_usb_get_property(struct power_supply *psy,
case POWER_SUPPLY_PROP_ONLINE:
break;
case POWER_SUPPLY_PROP_VOLTAGE_MAX:
/* V -> uV */
val->intval = battery->input_voltage * 1000000;
/* mV -> uV */
val->intval = battery->input_voltage * 1000;
return 0;
case POWER_SUPPLY_PROP_CURRENT_MAX:
/* mA -> uA */
Expand Down Expand Up @@ -5292,8 +5292,8 @@ static int sec_ac_get_property(struct power_supply *psy,
}
break;
case POWER_SUPPLY_PROP_VOLTAGE_MAX:
/* V -> uV */
val->intval = battery->input_voltage * 1000000;
/* mV -> uV */
val->intval = battery->input_voltage * 1000;
return 0;
case POWER_SUPPLY_PROP_CURRENT_MAX:
/* mA -> uA */
Expand Down

0 comments on commit 7ea398b

Please sign in to comment.