Re: [PATCH 3/4] ACPI / battery: Add handling for devices which wrongly report discharging state

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Apr 10, 2018 at 2:55 PM, Hans de Goede <hdegoede@xxxxxxxxxx> wrote:
> This commit adds a helper for handling the ACPI_BATTERY_STATE_DISCHARGING
> state. This helper checks if we're an AC and the current going out of the
> battery is 0 and in that case reports a status of full to userspace rather
> then discharging.

power_supply_is_system_supplied() doesn't have any documentation, but
upon brief code inspection it seems to do as you describe (checks that
we are on mains power).

I'm not clear on the FULL vs NOT_CHARGING thing as I also don't see
documentation for those flags. But if NOT_CHARGING is the correct one
to return, should we not just return that here, and fix up userspace
at the same time? Users will need to upgrade their kernel to get this
bugfix, so it does not seem unreasonable for them to have to upgrade a
userspace component as well.

Thanks
Daniel
--
To unsubscribe from this list: send the line "unsubscribe linux-acpi" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux IBM ACPI]     [Linux Power Management]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]     [Linux Resources]

  Powered by Linux