Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1513319

Re: [RFC 1/3] regulator: core: Add over current changed event

From Axel Haslam <ahaslam@baylibre.com>
Newsgroups linux.kernel
Subject Re: [RFC 1/3] regulator: core: Add over current changed event
Date 2016-11-01 16:50 +0100
Message-ID <syJu2-26a-23@gated-at.bofh.it> (permalink)
References (2 earlier) <sxkem-3uE-19@gated-at.bofh.it> <sxlk5-46E-9@gated-at.bofh.it> <sxGRA-1Nn-3@gated-at.bofh.it> <sxX62-4sU-15@gated-at.bofh.it> <synDb-4Pf-7@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


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.

Back to linux.kernel | Previous | NextPrevious in thread | Find similar | Unroll thread


Thread

Re: [RFC 1/3] regulator: core: Add over current changed event Mark Brown <broonie@kernel.org> - 2016-10-28 20:40 +0200
  Re: [RFC 1/3] regulator: core: Add over current changed event Axel Haslam <ahaslam@baylibre.com> - 2016-10-28 21:50 +0200
    Re: [RFC 1/3] regulator: core: Add over current changed event Axel Haslam <ahaslam@baylibre.com> - 2016-10-29 11:00 +0200
    Re: [RFC 1/3] regulator: core: Add over current changed event Mark Brown <broonie@kernel.org> - 2016-10-29 20:50 +0200
      Re: [RFC 1/3] regulator: core: Add over current changed event Axel Haslam <ahaslam@baylibre.com> - 2016-10-30 13:10 +0100
        Re: [RFC 1/3] regulator: core: Add over current changed event Mark Brown <broonie@kernel.org> - 2016-10-31 17:30 +0100
          Re: [RFC 1/3] regulator: core: Add over current changed event Axel Haslam <ahaslam@baylibre.com> - 2016-11-01 16:50 +0100

csiph-web