Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

Merge tag 'acpi-6.16-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm

Pull ACPI fix from Rafael Wysocki:
"Revert a problematic ACPI battery driver change merged recently"

* tag 'acpi-6.16-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm:
Revert "ACPI: battery: negate current when discharging"

+3 -16
+3 -16
drivers/acpi/battery.c
··· 243 243 break; 244 244 case POWER_SUPPLY_PROP_CURRENT_NOW: 245 245 case POWER_SUPPLY_PROP_POWER_NOW: 246 - if (battery->rate_now == ACPI_BATTERY_VALUE_UNKNOWN) { 246 + if (battery->rate_now == ACPI_BATTERY_VALUE_UNKNOWN) 247 247 ret = -ENODEV; 248 - break; 249 - } 250 - 251 - val->intval = battery->rate_now * 1000; 252 - /* 253 - * When discharging, the current should be reported as a 254 - * negative number as per the power supply class interface 255 - * definition. 256 - */ 257 - if (psp == POWER_SUPPLY_PROP_CURRENT_NOW && 258 - (battery->state & ACPI_BATTERY_STATE_DISCHARGING) && 259 - acpi_battery_handle_discharging(battery) 260 - == POWER_SUPPLY_STATUS_DISCHARGING) 261 - val->intval = -val->intval; 262 - 248 + else 249 + val->intval = battery->rate_now * 1000; 263 250 break; 264 251 case POWER_SUPPLY_PROP_CHARGE_FULL_DESIGN: 265 252 case POWER_SUPPLY_PROP_ENERGY_FULL_DESIGN: