Re: [PATCH] ACPI / Battery: Return -ENODATA for unknown values in get_property()

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Sitsofe Wheeler
Date: Saturday, October 23, 2010 - 8:43 am

On Fri, Oct 22, 2010 at 01:31:28PM +0100, Richard Hughes wrote:

I can only guess that at some point in upower's past negative values for
current_rate were found to be valid so upower took the route of making
them absolute to work around that behaviour. If so, it would be good to
know whether there are still devices in this category running a stock
kernel.

If the latest patch to return -ENODEV goes in, then there's the
possibility for upower to detect the unknown state and report unknown
back to its users. Would the existing interfaces support outputting
unknown instead of a number? If not (and there are no plans to) I
suspect the best thing to do is to remove the test for 0xffff and
continue to return 0.

-- 
Sitsofe | http://sucs.org/~sits/
--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
Returning ACPI_BATTERY_VALUE_UNKNOWN to userspace, Sitsofe Wheeler, (Sat Oct 16, 7:13 am)
[PATCH] ACPI / Battery: Return -ENODATA for unknown values ..., Rafael J. Wysocki, (Sat Oct 16, 4:05 pm)
Re: [PATCH] ACPI / Battery: Return -ENODATA for unknown va ..., Henrique de Moraes H ..., (Sat Oct 16, 10:19 pm)
Re: [PATCH] ACPI / Battery: Return -ENODATA for unknown va ..., Henrique de Moraes H ..., (Sun Oct 17, 6:10 am)
Re: [PATCH] ACPI / Battery: Return -ENODATA for unknown va ..., Rafael J. Wysocki, (Sun Oct 17, 11:32 am)
Re: [PATCH] ACPI / Battery: Return -ENODATA for unknown va ..., Rafael J. Wysocki, (Thu Oct 21, 12:57 pm)
Re: [PATCH] ACPI / Battery: Return -ENODATA for unknown va ..., Rafael J. Wysocki, (Fri Oct 22, 3:19 pm)
Re: [PATCH] ACPI / Battery: Return -ENODATA for unknown va ..., Sitsofe Wheeler, (Sat Oct 23, 8:43 am)
Re: [PATCH] ACPI / Battery: Return -ENODATA for unknown va ..., Rafael J. Wysocki, (Sat Oct 23, 10:31 am)
Re: [PATCH] ACPI / Battery: Return -ENODATA for unknown va ..., Rafael J. Wysocki, (Mon Oct 25, 1:36 pm)