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

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

 



On Mon, 6 Oct 2014, Michael Grzeschik wrote:

> > 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.

Okay, then try this approach:  Create two new functions in ehci-hub.c, 
one to turn port power on and one to turn it off.  Make the rest of the 
driver call these functions instead of doing the work inline.  Finally, 
make the new functions change the EHCI port-power flag _and_ invoke the 
callback routine (if there is one).

Alan Stern

--
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