Re: Supporting mutiple host drivers with different transceivers

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

 



On Wed, 9 Sep 2009, sai pavan wrote:

> Hi All,
> 
> Our embedded system has two ehci compliant controllers. Each
> controller has a different transceiver. Our requirement is to support
> OTG on one controller and use the other controller in only host mode.
> I can think of following approaches to implement this functionality.
> Can you please provide your inputs?
> 
> 1. implement one platform driver (ehci-abc.c) to support both
> instances. internally call different functions based on pdev->id.
> static int ehci_abc_drv_probe(struct platform_device *pdev)
> {
>       if (pdev->id == 1)
>              otg_host_probe(&pdev);
>       if (pdev->id == 2)
>              host_only_probe(&pdev);
> 
> }
> 2. As transceiver is different for each controller (and one uses otg
> framework and other doesn't), can we use a separate file for each
> driver? i.e ehci-abc.c and ehci-abc2.c in drivers/usb/host? But the
> existing ehci-hcd framework supports only one platform driver. Can we
> change ehci-hcd framework to allow multiple platform drivers?
> 3. The existing OTG framework supports only one OTG driver to be
> registered as transceiver. Can we change OTG framework to allow
> multiple otg drivers? i.e otg_get_transceiver should be called with an
> argument (may be a string like otg_get_transceiver("abc")). This way
> we can have two otg transceiver drivers in our system and two host
> controller driver uses different OTG transceiver drivers. The host
> driver will be same for both controllers as they differ in only
> transceiver.
> 4. As usb controllers are identical and only transceivers are
> different, can we make OTG transceiver driver  to support multiple
> instances of transceiver. Each host will get the same otg structure
> and otg driver should configure the corresponding transceiver (may be
> using some flags passed by host)

I'm far from an expert on this, but doesn't the OTG spec require 
devices to have no more than one OTG port?  That would rule out 3 and 
4.  2 has its own problems.  Which leaves only 1 -- and 1 seems like a 
perfectly reasonable approach.

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