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


Groups > linux.kernel > #1499987

Re: [PATCH/RFT 07/12] USB: ohci-da8xx: Request gpios and handle interrupt in the driver

From David Lechner <david@lechnology.com>
Newsgroups linux.kernel
Subject Re: [PATCH/RFT 07/12] USB: ohci-da8xx: Request gpios and handle interrupt in the driver
Date 2016-10-13 02:50 +0200
Message-ID <srCnD-3SP-5@gated-at.bofh.it> (permalink)
References <spGvn-3aK-7@gated-at.bofh.it> <spGvn-3aK-15@gated-at.bofh.it> <sqS1r-7nE-1@gated-at.bofh.it> <srtkm-688-39@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On 10/12/2016 10:01 AM, Axel Haslam wrote:
> I  agree that we should use a regulator for the vbus power.
> i will make that change.  However, im not so sure about using the
> regulator for the overcurrent handling. There seems to be no other
> driver doing this, and as you mention, we would need to change the regulator
> framework, which might not be justifiable. I think there is not another way
> to handle the over current notification other than powering the port off.

The regulator framework has REGULATOR_EVENT_OVER_CURRENT already. 
Perhaps this could be of some use? For example you could extend the 
existing gpio-regulator driver with an optional overcurrent gpio pin.


>
> how about using regulator for vbus, but keeping gpio for overcurrent
> notifications?

See the suggestion above about extending the gpio-regulator driver.


> For the usersapce handling you describe above, maybe we should be able to
> listen for an usb overcurrent uevent in userspace? it seems this
> question was asked
> a couple of years back[1], but im not sure what the conclusion was. In any case,
> we could have DT and non-DT based ohci-da8xx working,
> And could work on a uevent notification for the scenario you describe
> above which
> i think is not specific to the ohci-da8xx.
>
> [1]http://linux-usb.vger.kernel.narkive.com/SjcUB5hk/how-best-to-get-over-current-notification-to-user-application

Thanks for the link. Too bad it seems nothing ever became of this. I 
guess it will be up to me to bring up the discussion again if I really 
want it.

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


Thread

[PATCH/RFT 07/12] USB: ohci-da8xx: Request gpios and handle interrupt in the driver ahaslam@baylibre.com - 2016-10-07 18:50 +0200
  Re: [PATCH/RFT 07/12] USB: ohci-da8xx: Request gpios and handle  interrupt in the driver David Lechner <david@lechnology.com> - 2016-10-11 01:20 +0200
    Re: [PATCH/RFT 07/12] USB: ohci-da8xx: Request gpios and handle  interrupt in the driver Axel Haslam <ahaslam@baylibre.com> - 2016-10-12 17:10 +0200
      Re: [PATCH/RFT 07/12] USB: ohci-da8xx: Request gpios and handle  interrupt in the driver David Lechner <david@lechnology.com> - 2016-10-13 02:50 +0200

csiph-web