Re: USB_OTG unmet direct dependencies

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

 



On Wed, Nov 25, 2015 at 03:04:18PM +0100, Mason wrote:
> Hello,
> 
> I was about to post this, and I noticed it has been discussed recently.
> 
> http://thread.gmane.org/gmane.linux.kernel/2087677/
> [PATCH] USB: USB_OTG does not depend on PM
> 
> My SoC provides a Chipidea dual-port OTG USB 2.0 controller.
> 
> My .config contains:
> 
> CONFIG_USB_SUPPORT=y
> CONFIG_USB_COMMON=y
> CONFIG_USB_ARCH_HAS_HCD=y
> CONFIG_USB=y
> CONFIG_USB_ANNOUNCE_NEW_DEVICES=y
> ...
> CONFIG_USB_OTG=y
> # CONFIG_USB_OTG_WHITELIST is not set
> # CONFIG_USB_OTG_BLACKLIST_HUB is not set
> CONFIG_USB_OTG_FSM=y
> CONFIG_USB_EHCI_HCD=y
> CONFIG_USB_EHCI_ROOT_HUB_TT=y
> CONFIG_USB_EHCI_TT_NEWSCHED=y
> CONFIG_USB_OHCI_HCD=y
> CONFIG_USB_CHIPIDEA=y
> CONFIG_USB_CHIPIDEA_OF=y
> CONFIG_USB_CHIPIDEA_UDC=y
> CONFIG_USB_CHIPIDEA_HOST=y
> CONFIG_USB_CHIPIDEA_DEBUG=y
> 
> When I build, I get this warning twice:
> 
>   (USB_OTG_FSM && FSL_USB2_OTG && USB_MV_OTG) selects USB_OTG
>   which has unmet direct dependencies (USB_SUPPORT && USB && PM)
> 

The above warning should be fixed with the patch you listed.

> I have a few questions:
> 
> Is PM required for correct OTG functionality?

In fact, some of the OTG functionalities require PM. There are
two OTG use cases currently (Type-C connector is not considered):

- Swap role using Micro-AB cable, you can see this use case at
Tablet, Phone, TV-box, etc, and this is the most common use case
in current market. PM is optional for this use case.
- Swap role without disconnecting cable, the software will decide
when to swap role, it follows usb.org USB OTG compliance, some
special use case need it. PM is mandatory this use case.

> 
> Is USB_OTG_FSM required for correct OTG functionality?

Problem is a little complicated, I talked two use cases above, the
first use case does not need USB_OTG_FSM, and if the timing for
USB OTG compliance protocol does not be guaranteed by softeare, it
does not need USB_OTG_FSM either.

Only using state machines described at USB OTG specification needs
USB_OTG_FSM.

> If so, shouldn't USB_CHIPIDEA_UDC depend on it? or select it?
> 

No, the device function is not related with any OTG features.

> Also I'm confused by the help message for USB_CHIPIDEA:
> 
> 	help
> 	  Say Y here if your system has a dual role high speed USB
> 	  controller based on ChipIdea silicon IP. Currently, only the
> 	  peripheral mode is supported.
> 

Oops, it is out-dated, I will change it.

> If I set the dr_mode to "host", the OS correctly sees a mass storage device.
> (Which I took to mean host mode is supported.)
> 
> Does it fail to work in "otg" mode? (I've ordered OTG cables to test this.)
> 

I am supposed you would like to swap role using Micro-AB cable, if your
controller supports both roles, the dr_mode is OTG default at the
code.

-- 

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