Message ID | 20250128-patch-qcomm-bat-uint-power-v1-1-54a63d8ada92@mailbox.org |
---|---|
State | New |
Headers | show |
Series | power: supply: qcom_battmgr: abs() on POWER_NOW property | expand |
diff --git a/drivers/power/supply/qcom_battmgr.c b/drivers/power/supply/qcom_battmgr.c index 47d29271ddf400b76dd5b0a1b8d1ba86c017afc0..3e2e0c5af2814df0eb0bfc408d4b3d26399ab4e4 100644 --- a/drivers/power/supply/qcom_battmgr.c +++ b/drivers/power/supply/qcom_battmgr.c @@ -530,7 +530,7 @@ static int qcom_battmgr_bat_get_property(struct power_supply *psy, val->intval = battmgr->status.current_now; break; case POWER_SUPPLY_PROP_POWER_NOW: - val->intval = battmgr->status.power_now; + val->intval = abs(battmgr->status.power_now); break; case POWER_SUPPLY_PROP_CHARGE_FULL_DESIGN: if (unit != QCOM_BATTMGR_UNIT_mAh)