[lkml]   [2016]   [Oct]   [31]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [RFC 1/3] regulator: core: Add over current changed event
On Sun, Oct 30, 2016 at 01:02:21PM +0100, Axel Haslam wrote:

> The event REGULATOR_EVENT_OVER_CURRENT allready exists.
> what is missing and what i would need form the usb driver, is a way for
> the consumer to know that the over current condition is over.
> since i cannot do this with get mode, and get status is not exported,

> We can do this adding a more generic event flag:

> that would be sent by the supply when all errors are over, and the
> regulator is back to normal operation.

That's a different thing and definitely not what you were saying in the
changelog. I don't think this is something that it makes sense to do
with events as it's not something that devices will tend to generate
interrupts for, anything that is going to rely on events for that is
going to be broken. Hardware is mostly designed with the idea that
errors are catastrophic.

If you really care about things clearing then you need to add a sensible
interface for exposting all the possible error conditions that users can
poll. The reason get_mode() got rejected was that error statuses and
modes are completely different things, get_status() is not going to work
for you since it is very common for multiple errors to happen at the
same time.
[unhandled content-type:application/pgp-signature]
 \ /
  Last update: 2016-10-31 17:23    [W:0.049 / U:1.252 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site