From: Stricted Date: Tue, 8 May 2018 15:50:50 +0000 (+0200) Subject: drivers: power: report battery voltage in AOSP compatible format X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=557d9dfd7005a24215f98e70dfe7db0f6bb0916c;p=GitHub%2Fmt8127%2Fandroid_kernel_alcatel_ttab.git drivers: power: report battery voltage in AOSP compatible format --- diff --git a/drivers/power/power_supply_sysfs.c b/drivers/power/power_supply_sysfs.c index 0c687ea850dc..72e76c3488b4 100644 --- a/drivers/power/power_supply_sysfs.c +++ b/drivers/power/power_supply_sysfs.c @@ -109,6 +109,8 @@ static ssize_t power_supply_show_property(struct device *dev, if (off == POWER_SUPPLY_PROP_CHARGE_COUNTER_EXT) return sprintf(buf, "%lld\n", value.int64val); + else if (off == POWER_SUPPLY_PROP_batt_vol) + return sprintf(buf, "%d\n", (value.intval * 1000)); else return sprintf(buf, "%d\n", value.intval); }