Supporting mutiple host drivers with different transceivers

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

 



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)

Thanks in Advance,
Sai
--
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