[RFC PATCH] bq27000_battery. Retains old value in ETIME error

Michael Trimarchi trimarchi at gandalf.sssup.it
Thu Jul 30 19:14:18 CEST 2009

Mike Westerhof (mwester) wrote:
> Michael Trimarchi wrote:
>> Timo Lindfors wrote:
>>> Michael Trimarchi <trimarchi at gandalf.sssup.it> writes:
>>>> Fix a possible invalid update of the battery value. If the hdq goes
>>>> in timeout
>>>> the driver must manteins the old value.
>>> Is there a bug report about this? Did it previously just return bogus
>>> data as voltage or temperature?
>> Return bogus data and sometimes android switch off. For now is a fix of
>> invalid data
> Shouldn't user-space be alerted to the invalid data, and deal with it in
> a user-space-specific fashion?  It seems to me that this patch is really
> just having the kernel lie to user-space, since the truth of the matter
> is that if we get an ETIME error in the kernel, we don't know what the
> real values are.
I'm not agree because the error seems to be related to HDQ timeout that
just can't read the new value. Post the old one is not so bad I think
and give stable value. You can have a lot of good value and some wrong.
The problem here is the worker fill the data. Maybe the get_property
must take the value and then report the error.


More information about the openmoko-kernel mailing list