Re: [RFC PATCH 2/2] usb: otg: support for multiple transceivers by a single controller

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

 



Hi,

On Tue, May 15, 2012 at 09:11:37AM +0000, Chen Peter-B29397 wrote:
> > I'm not sure I follow. What do you call OTG driver ? If it's all that
> > timer initialization that should be done on drivers/usb/core/ in a
> > generic manner, so everybody can use. Remember that OTG related to Host
> > and Device functionality and all those OTG timers should be managed by
> > the core framework.
> > 
> If the user has OTG driver, then OTG driver handles all resource management
> for that controller, like PHY, register mapping, clock.

You're abusing the OTG concept. OTG is nothing more than a few additions
to the USB standard in order to be able to dynamically switch between
Host and Device roles based on a) cable (id pin) or b) HNP.

OTG doesn't know anything about PHYs, clocks, registers, etc... That
should be done on each specific driver, meaning PHY will be completely
managed by the PHY driver, Link/UDC will be completely managed by Link
Driver.

The OTG layer will simply call hooks from those guys to put
PHY/UDC on the desired state (e.g. suspending bus so HNP can happen, or
kicking HNP polling and so on).

> At this OTG driver, it will call phy->init, phy->set_wakeup, phy->suspend
> and phy->resume, etc. The code routines at device and host is active mode,
> PHY is active and clocks are on.

this is ok, but there's not need a drivers/usb/otg just for that. Like I
said, it should be generic, small and sitting under drivers/core.
drivers/usb/otg gets renamed to drivers/usb/phy.

> If the user hasn't OTG driver, the host-only or device-only driver takes the
> same responsibilities like above OTG driver. 

This isn't entirelly correct either. We can have DRD devices which don't
comply with the OTG specifications. One such instance is the current
DWC3 implementation on OMAP5. Because OTG v3.0 isn't finalized, it's not
OTG v3.0 compliant, but we can still switch between Host and Device
roles through sysfs or cable (timings might be violated though).

> From my point, PHY is the resource, any users can use it.

sure.

-- 
balbi

Attachment: signature.asc
Description: Digital signature


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

  Powered by Linux