summaryrefslogtreecommitdiff
path: root/include/linux/usb/chipidea.h
diff options
context:
space:
mode:
authorLoic Poulain <loic.poulain@linaro.org>2018-09-04 18:18:55 +0300
committerPeter Chen <peter.chen@nxp.com>2018-09-20 12:04:21 +0300
commit16caf1fa37db4722d8d8c7bc26177279949d75a6 (patch)
treea787b234e6b11249bd2ca209cf3a5391cf6f72f9 /include/linux/usb/chipidea.h
parent1f06072cd22fbbd2e961b49c8e4fa9f7a0c120d6 (diff)
downloadlinux-16caf1fa37db4722d8d8c7bc26177279949d75a6.tar.xz
usb: chipidea: Add dynamic pinctrl selection
Some hardware implementations require to configure pins differently according to the USB role (host/device), this can be an update of the pins routing or a simple GPIO value change. This patch introduces new optional "host" and "device" pinctrls. If these pinctrls are defined by the device, they are respectively selected on host/device role start. If a default pinctrl exist, it is restored on host/device role stop. Signed-off-by: Loic Poulain <loic.poulain@linaro.org> Signed-off-by: Peter Chen <peter.chen@nxp.com>
Diffstat (limited to 'include/linux/usb/chipidea.h')
-rw-r--r--include/linux/usb/chipidea.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/include/linux/usb/chipidea.h b/include/linux/usb/chipidea.h
index 07f99362bc90..63758c399e4e 100644
--- a/include/linux/usb/chipidea.h
+++ b/include/linux/usb/chipidea.h
@@ -77,6 +77,12 @@ struct ci_hdrc_platform_data {
struct ci_hdrc_cable vbus_extcon;
struct ci_hdrc_cable id_extcon;
u32 phy_clkgate_delay_us;
+
+ /* pins */
+ struct pinctrl *pctl;
+ struct pinctrl_state *pins_default;
+ struct pinctrl_state *pins_host;
+ struct pinctrl_state *pins_device;
};
/* Default offset of capability registers */