[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAKXjFTOz=TGCiKic77JXdJMUoobLY4Ye9QnqajbG4JTh=VGUFg@mail.gmail.com>
Date: Tue, 25 Oct 2016 16:57:17 +0200
From: Axel Haslam <ahaslam@...libre.com>
To: Mark Brown <broonie@...nel.org>
Cc: Greg KH <gregkh@...uxfoundation.org>,
Johan Hovold <johan@...nel.org>, robh+dt@...nel.org,
Sekhar Nori <nsekhar@...com>,
Alan Stern <stern@...land.harvard.edu>,
Kevin Hilman <khilman@...libre.com>,
Sergei Shtylyov <sshtylyov@...mvista.com>,
David Lechner <david@...hnology.com>,
manjunath.goudar@...aro.org,
Alexandre Bailon <abailon@...libre.com>,
linux-usb@...r.kernel.org, devicetree@...r.kernel.org,
linux-kernel@...r.kernel.org, linux-arm-kernel@...ts.infradead.org
Subject: Re: [PATCH/RFT v2 09/17] regulator: fixed: Add over current event
On Tue, Oct 25, 2016 at 4:33 PM, Mark Brown <broonie@...nel.org> wrote:
> On Tue, Oct 25, 2016 at 02:55:48PM +0200, Axel Haslam wrote:
>
>> To be able to use regulator to handle the overcurrent pin, i need to be able
>> to somehow retrieve the over current pin state from the regulator driver.
>
> What makes you say that, none of the existing users need this?
>
>> As i was trying your suggestion, i remembered why i thought i should use
>> mode instead of status: Status seems to be for internal regulator driver use,
>> there is no regulator_get_status, function and REGULATOR_STATUS_* are defined
>> in driver.h and not in consumer.h as REGULATOR_MODE_*
>
>> Would you be ok if i allow consumers to get the status via a new
>> "regulator_get_status" call?
>
> What would they do with this information that they can't do with the
> existing error notification?
the usb core relies in two flags that need too be set properly, one is the
over-current indicator RH_PS_POCI , and the other is the over current
indicator "change" (RH_PS_OCIC).
The idea was to use the notification to set the over current indicator
"change" flag,
which will happen for both rising and falling edges. And to use
get_status or get_mode
to set the over-current indicator flag which should reflect the actual
pin status.
-Axel.
Powered by blists - more mailing lists