lkml.org 
[lkml]   [2016]   [Nov]   [1]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [RFC 1/3] regulator: core: Add over current changed event
Hi Mark,

On Mon, Oct 31, 2016 at 5:22 PM, Mark Brown <broonie@kernel.org> wrote:
> 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:
>> REGULATOR_EVENT_ERRORS_CLEARED
>
>> 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.

Ok, sorry if i was unclear in the change log.
ill add a new interface and lets see if it makes more sense in v2.

Regards
Axel.

\
 
 \ /
  Last update: 2016-11-01 16:48    [W:0.098 / U:0.528 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site