Skip to contentSkip to conversation

Adding usb gadget support

PATCH David Lanzendörfer 2 participants 2 messages Jul 16, 2010 Arm Qualcomm mailing list

lore
Share & tools
lore
#0 lore raw

Also here we are using phy_reset
https://www.codeaurora.org/gitweb/quic/la/?p=kernel/msm.git;a=blob;f=drivers/usb/gadget/msm72k_udc.c;h=f3669507bcd929b043e573d08e600171cc0c87de;hb=refs/heads/aosp/android-msm-2.6.32

Its needed for cable plug/unplug event recognition as it looks like.
So we realy seem to need phy_reset.
In the android branch phy_reset() was declared inside a second devices.c file called devices_htc.c
I considered it a bit confusing, and I'm not sure, where to actually introduce it now. Could QuIC take a look please?
Thx. ^^

best regards
leviathan

#1 lore raw
Quoted 9 lines · David Lanzendörfer

Also here we are using phy_reset
https://www.codeaurora.org/gitweb/quic/la/?p=kernel/msm.git;a=blob;f=drivers/usb/gadget/msm72k_udc.c;h=f3669507bcd929b043e573d08e600171cc0c87de;hb=refs/heads/aosp/android-msm-2.6.32

Its needed for cable plug/unplug event recognition as it looks like.
So we realy seem to need phy_reset.
In the android branch phy_reset() was declared inside a second devices.c file called devices_htc.c
I considered it a bit confusing, and I'm not sure, where to actually introduce it now. Could QuIC take a look please?

Look at the file you mentioned for an example of how to connect the phy reset function:

https://www.codeaurora.org/gitweb/quic/la/?p=kernel/msm.git;a=blob;f=arch/arm/mach-msm/devices_htc.c;h=e5f65e720656db1e0349e2d981e50f514eac8f2f;hb=refs/heads/aosp/android-msm-2.6.32

You just need to:

1. Make an instance of the msm_hsusb_platform_data.
2. Assign the 'phy_reset' pointer to your added function.
3. Assign that msm_device_hsusb platform_data to your pdata struct.
4. Register the platform device.

Michael

Signature · 2 lines
Employee of Qualcomm Innovation Center, Inc.
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum