Re: [PATCH 1/2] USB: EHCI: add portpower callback and override

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, Sep 26, 2014 at 10:42:35AM -0400, Alan Stern wrote:
> On Fri, 26 Sep 2014, Michael Grzeschik wrote:
> 
> > The current EHCI implementation is prepared to toggle the
> > PORT_POWER bit to enable or disable a USB-Port. In some
> > cases this port power can not be toggled by the PORT_POWER
> > bit but instead i.e. by an external GPIO.
> > This patch adds an callback to be triggered as well.
> > The host needs to assign a capable portpower callback.
> 
> The idea is reasonable enough, I suppose (but where does this stop?  
> Before you know it, every function normally carried out by the host 
> controller will actually be handled by a platform-specific piece of 
> hardware!)

I will leave this to the hardware developers and hope reality
will not run down that path... :)

> The implementation leaves something to be desired.  Instead of keeping
> the current port-power code in ehci-hcd inline, as it is, you should
> define a default callback routine to do the work.  Then the override
> can replace the default callback.

Unfortunately this does not seem to work as expected. I moved the inline
codepath to the default handler. But when not changing the PORT_POWER
bit in the PORTSC the chipidea core will not work even when the device
is powered by the gpio regulator.

Thanks,
Michael

-- 
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux