Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1511604
| From | Axel Haslam <ahaslam@baylibre.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [RFC 1/3] regulator: core: Add over current changed event |
| Date | 2016-10-29 11:00 +0200 |
| Message-ID | <sxxEB-3Ue-1@gated-at.bofh.it> (permalink) |
| References | <swBKh-809-5@gated-at.bofh.it> <swBKh-809-3@gated-at.bofh.it> <sxkem-3uE-19@gated-at.bofh.it> <sxlk5-46E-9@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
Hi Mark, On Fri, Oct 28, 2016 at 9:41 PM, Axel Haslam <ahaslam@baylibre.com> wrote: > Hi Mark, > > On Fri, Oct 28, 2016 at 8:22 PM, Mark Brown <broonie@kernel.org> wrote: >> On Wed, Oct 26, 2016 at 09:00:52PM +0200, ahaslam@baylibre.com wrote: >>> From: Axel Haslam <ahaslam@baylibre.com> >>> >>> Regulator consumers may be interested to know when the >>> over current condition is over. >>> >>> Add an over currerent "changed" event. The registered useres >>> for this event can then check the over current flag to know >>> the status of the over current condition. >> >> Would a more general event for error conditions work as well? Thinking >> about this I'm unclear how interested consumers are going to be in the >> specific error condition as opposed to the fact that the regulator ran >> into trouble, and I can imagine that some regulators will report the >> same root cause differently - another regulator might detect an >> excessive current draw by seeing the output voltage collapse and the >> regulator go out of regulation for example. > After some more thought, I can change the logic a bit, and send an event named something like: REGULATOR_EVENT_ERRORS_CLEARED would that make more sense? -Axel. > Sorry if i misunderstood, but if we make the name generic, > i think it might change a bit the definition of the flags, > The flags will not represent events, but states. > > i think today each time an event occurs a notification is sent with the > corresponding flag(s) set. > > if we use a generic name, It means that each time the regulator driver > sends an event, it should check which "other" error conditons tied to the > generic flag are present and set the corresponding bits too. > > illustrative example: > today over current and over temp are two different events > we send one notification for each with only the bits tied to the > event that is happening set. > > if we add a generic error flag, it would mean that if over current happens > and we set the generic error flag, we would also have to check > if over temp is present to set or not that flag. similarly, when the over > temp event happens the regulator driver would have to check if over > current is present too. >
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll 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