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

Agree, but one more thing that I find the clear_port_feature(PORT_POWER)
for roothub doesn't be called when I remove the hcd, we hope
the portsc.pp and external gpio can be in single .portpower API.

-- 
Best Regards,
Peter Chen
--
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