aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2014-12-14 17:57:16 -0500
committerLinus Torvalds <torvalds@linux-foundation.org>2014-12-14 17:57:16 -0500
commite7cf773d431a63a2417902696fcc9e0ebdc83bbe (patch)
tree86dbdceb7d91226507a3af0d57e03b0ca664b22e /include
parent7a02d089695a1217992434f03a78aa32bad85b5c (diff)
parent81e1dadfb5b2d47aa513ad60b1c9cf0ea17b6514 (diff)
Merge tag 'usb-3.19-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb
Pull USB updates from Greg KH: "Here's the big set of USB and PHY patches for 3.19-rc1. The normal churn in the USB gadget area is in here, as well as xhci and other individual USB driver updates. The PHY tree is also in here, as there were dependancies on the USB tree. All of these have been in linux-next" * tag 'usb-3.19-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb: (351 commits) arm: omap3: twl: remove usb phy init data usbip: fix error handling in stub_probe() usb: gadget: udc: missing curly braces USB: mos7720: delete some unneeded code wusb: replace memset by memzero_explicit usbip: remove unneeded structure usb: xhci: fix comment for PORT_DEV_REMOVE xhci: don't use the same variable for stopped and halted rings current TD xhci: clear extra bits from slot context when setting max exit latency xhci: cleanup finish_td function USB: adutux: NULL dereferences on disconnect usb: chipidea: fix platform_no_drv_owner.cocci warnings usb: chipidea: Fixed a few typos in comments Documentation: bindings: add doc for the USB2 ChipIdea USB driver usb: chipidea: add a usb2 driver for ci13xxx usb: chipidea: fix phy handling usb: chipidea: remove duplicate dev_set_drvdata for host_start usb: chipidea: parameter 'mode' isn't needed for hw_device_reset usb: chipidea: add controller reset API usb: chipidea: remove flag CI_HDRC_REQUIRE_TRANSCEIVER ...
Diffstat (limited to 'include')
-rw-r--r--include/dt-bindings/phy/phy.h19
-rw-r--r--include/linux/i2c/twl.h2
-rw-r--r--include/linux/pci_ids.h1
-rw-r--r--include/linux/phy/phy.h52
-rw-r--r--include/linux/platform_data/dwc3-exynos.h24
-rw-r--r--include/linux/usb/chipidea.h5
-rw-r--r--include/linux/usb/composite.h7
-rw-r--r--include/linux/usb/ehci-dbgp.h83
-rw-r--r--include/linux/usb/ehci_def.h65
-rw-r--r--include/linux/usb/gadget.h5
-rw-r--r--include/linux/usb/hcd.h3
-rw-r--r--include/linux/usb/otg.h7
-rw-r--r--include/linux/usb/phy.h6
-rw-r--r--include/linux/usb/renesas_usbhs.h4
14 files changed, 154 insertions, 129 deletions
diff --git a/include/dt-bindings/phy/phy.h b/include/dt-bindings/phy/phy.h
new file mode 100644
index 000000000000..6c901930eb3e
--- /dev/null
+++ b/include/dt-bindings/phy/phy.h
@@ -0,0 +1,19 @@
1/*
2 *
3 * This header provides constants for the phy framework
4 *
5 * Copyright (C) 2014 STMicroelectronics
6 * Author: Gabriel Fernandez <gabriel.fernandez@st.com>
7 * License terms: GNU General Public License (GPL), version 2
8 */
9
10#ifndef _DT_BINDINGS_PHY
11#define _DT_BINDINGS_PHY
12
13#define PHY_NONE 0
14#define PHY_TYPE_SATA 1
15#define PHY_TYPE_PCIE 2
16#define PHY_TYPE_USB2 3
17#define PHY_TYPE_USB3 4
18
19#endif /* _DT_BINDINGS_PHY */
diff --git a/include/linux/i2c/twl.h b/include/linux/i2c/twl.h
index 8cfb50f38529..0bc03f100d04 100644
--- a/include/linux/i2c/twl.h
+++ b/include/linux/i2c/twl.h
@@ -26,7 +26,6 @@
26#define __TWL_H_ 26#define __TWL_H_
27 27
28#include <linux/types.h> 28#include <linux/types.h>
29#include <linux/phy/phy.h>
30#include <linux/input/matrix_keypad.h> 29#include <linux/input/matrix_keypad.h>
31 30
32/* 31/*
@@ -634,7 +633,6 @@ enum twl4030_usb_mode {
634struct twl4030_usb_data { 633struct twl4030_usb_data {
635 enum twl4030_usb_mode usb_mode; 634 enum twl4030_usb_mode usb_mode;
636 unsigned long features; 635 unsigned long features;
637 struct phy_init_data *init_data;
638 636
639 int (*phy_init)(struct device *dev); 637 int (*phy_init)(struct device *dev);
640 int (*phy_exit)(struct device *dev); 638 int (*phy_exit)(struct device *dev);
diff --git a/include/linux/pci_ids.h b/include/linux/pci_ids.h
index 97fb9f69aaed..e63c02a93f6b 100644
--- a/include/linux/pci_ids.h
+++ b/include/linux/pci_ids.h
@@ -564,6 +564,7 @@
564#define PCI_DEVICE_ID_AMD_8131_BRIDGE 0x7450 564#define PCI_DEVICE_ID_AMD_8131_BRIDGE 0x7450
565#define PCI_DEVICE_ID_AMD_8131_APIC 0x7451 565#define PCI_DEVICE_ID_AMD_8131_APIC 0x7451
566#define PCI_DEVICE_ID_AMD_8132_BRIDGE 0x7458 566#define PCI_DEVICE_ID_AMD_8132_BRIDGE 0x7458
567#define PCI_DEVICE_ID_AMD_NL_USB 0x7912
567#define PCI_DEVICE_ID_AMD_CS5535_IDE 0x208F 568#define PCI_DEVICE_ID_AMD_CS5535_IDE 0x208F
568#define PCI_DEVICE_ID_AMD_CS5536_ISA 0x2090 569#define PCI_DEVICE_ID_AMD_CS5536_ISA 0x2090
569#define PCI_DEVICE_ID_AMD_CS5536_FLASH 0x2091 570#define PCI_DEVICE_ID_AMD_CS5536_FLASH 0x2091
diff --git a/include/linux/phy/phy.h b/include/linux/phy/phy.h
index 8cb6f815475b..a0197fa1b116 100644
--- a/include/linux/phy/phy.h
+++ b/include/linux/phy/phy.h
@@ -61,7 +61,6 @@ struct phy {
61 struct device dev; 61 struct device dev;
62 int id; 62 int id;
63 const struct phy_ops *ops; 63 const struct phy_ops *ops;
64 struct phy_init_data *init_data;
65 struct mutex mutex; 64 struct mutex mutex;
66 int init_count; 65 int init_count;
67 int power_count; 66 int power_count;
@@ -84,33 +83,14 @@ struct phy_provider {
84 struct of_phandle_args *args); 83 struct of_phandle_args *args);
85}; 84};
86 85
87/** 86struct phy_lookup {
88 * struct phy_consumer - represents the phy consumer 87 struct list_head node;
89 * @dev_name: the device name of the controller that will use this PHY device 88 const char *dev_id;
90 * @port: name given to the consumer port 89 const char *con_id;
91 */ 90 struct phy *phy;
92struct phy_consumer {
93 const char *dev_name;
94 const char *port;
95};
96
97/**
98 * struct phy_init_data - contains the list of PHY consumers
99 * @num_consumers: number of consumers for this PHY device
100 * @consumers: list of PHY consumers
101 */
102struct phy_init_data {
103 unsigned int num_consumers;
104 struct phy_consumer *consumers;
105}; 91};
106 92
107#define PHY_CONSUMER(_dev_name, _port) \ 93#define to_phy(a) (container_of((a), struct phy, dev))
108{ \
109 .dev_name = _dev_name, \
110 .port = _port, \
111}
112
113#define to_phy(dev) (container_of((dev), struct phy, dev))
114 94
115#define of_phy_provider_register(dev, xlate) \ 95#define of_phy_provider_register(dev, xlate) \
116 __of_phy_provider_register((dev), THIS_MODULE, (xlate)) 96 __of_phy_provider_register((dev), THIS_MODULE, (xlate))
@@ -159,10 +139,9 @@ struct phy *of_phy_get(struct device_node *np, const char *con_id);
159struct phy *of_phy_simple_xlate(struct device *dev, 139struct phy *of_phy_simple_xlate(struct device *dev,
160 struct of_phandle_args *args); 140 struct of_phandle_args *args);
161struct phy *phy_create(struct device *dev, struct device_node *node, 141struct phy *phy_create(struct device *dev, struct device_node *node,
162 const struct phy_ops *ops, 142 const struct phy_ops *ops);
163 struct phy_init_data *init_data);
164struct phy *devm_phy_create(struct device *dev, struct device_node *node, 143struct phy *devm_phy_create(struct device *dev, struct device_node *node,
165 const struct phy_ops *ops, struct phy_init_data *init_data); 144 const struct phy_ops *ops);
166void phy_destroy(struct phy *phy); 145void phy_destroy(struct phy *phy);
167void devm_phy_destroy(struct device *dev, struct phy *phy); 146void devm_phy_destroy(struct device *dev, struct phy *phy);
168struct phy_provider *__of_phy_provider_register(struct device *dev, 147struct phy_provider *__of_phy_provider_register(struct device *dev,
@@ -174,6 +153,8 @@ struct phy_provider *__devm_of_phy_provider_register(struct device *dev,
174void of_phy_provider_unregister(struct phy_provider *phy_provider); 153void of_phy_provider_unregister(struct phy_provider *phy_provider);
175void devm_of_phy_provider_unregister(struct device *dev, 154void devm_of_phy_provider_unregister(struct device *dev,
176 struct phy_provider *phy_provider); 155 struct phy_provider *phy_provider);
156int phy_create_lookup(struct phy *phy, const char *con_id, const char *dev_id);
157void phy_remove_lookup(struct phy *phy, const char *con_id, const char *dev_id);
177#else 158#else
178static inline int phy_pm_runtime_get(struct phy *phy) 159static inline int phy_pm_runtime_get(struct phy *phy)
179{ 160{
@@ -301,16 +282,14 @@ static inline struct phy *of_phy_simple_xlate(struct device *dev,
301 282
302static inline struct phy *phy_create(struct device *dev, 283static inline struct phy *phy_create(struct device *dev,
303 struct device_node *node, 284 struct device_node *node,
304 const struct phy_ops *ops, 285 const struct phy_ops *ops)
305 struct phy_init_data *init_data)
306{ 286{
307 return ERR_PTR(-ENOSYS); 287 return ERR_PTR(-ENOSYS);
308} 288}
309 289
310static inline struct phy *devm_phy_create(struct device *dev, 290static inline struct phy *devm_phy_create(struct device *dev,
311 struct device_node *node, 291 struct device_node *node,
312 const struct phy_ops *ops, 292 const struct phy_ops *ops)
313 struct phy_init_data *init_data)
314{ 293{
315 return ERR_PTR(-ENOSYS); 294 return ERR_PTR(-ENOSYS);
316} 295}
@@ -345,6 +324,13 @@ static inline void devm_of_phy_provider_unregister(struct device *dev,
345 struct phy_provider *phy_provider) 324 struct phy_provider *phy_provider)
346{ 325{
347} 326}
327static inline int
328phy_create_lookup(struct phy *phy, const char *con_id, const char *dev_id)
329{
330 return 0;
331}
332static inline void phy_remove_lookup(struct phy *phy, const char *con_id,
333 const char *dev_id) { }
348#endif 334#endif
349 335
350#endif /* __DRIVERS_PHY_H */ 336#endif /* __DRIVERS_PHY_H */
diff --git a/include/linux/platform_data/dwc3-exynos.h b/include/linux/platform_data/dwc3-exynos.h
deleted file mode 100644
index 5eb7da9b3772..000000000000
--- a/include/linux/platform_data/dwc3-exynos.h
+++ /dev/null
@@ -1,24 +0,0 @@
1/**
2 * dwc3-exynos.h - Samsung EXYNOS DWC3 Specific Glue layer, header.
3 *
4 * Copyright (c) 2012 Samsung Electronics Co., Ltd.
5 * http://www.samsung.com
6 *
7 * Author: Anton Tikhomirov <av.tikhomirov@samsung.com>
8 *
9 * This program is free software; you can redistribute it and/or modify
10 * it under the terms of the GNU General Public License as published by
11 * the Free Software Foundation; either version 2 of the License, or
12 * (at your option) any later version.
13 */
14
15#ifndef _DWC3_EXYNOS_H_
16#define _DWC3_EXYNOS_H_
17
18struct dwc3_exynos_data {
19 int phy_type;
20 int (*phy_init)(struct platform_device *pdev, int type);
21 int (*phy_exit)(struct platform_device *pdev, int type);
22};
23
24#endif /* _DWC3_EXYNOS_H_ */
diff --git a/include/linux/usb/chipidea.h b/include/linux/usb/chipidea.h
index e14c09a45c5a..535997a6681b 100644
--- a/include/linux/usb/chipidea.h
+++ b/include/linux/usb/chipidea.h
@@ -13,11 +13,12 @@ struct ci_hdrc_platform_data {
13 /* offset of the capability registers */ 13 /* offset of the capability registers */
14 uintptr_t capoffset; 14 uintptr_t capoffset;
15 unsigned power_budget; 15 unsigned power_budget;
16 struct usb_phy *phy; 16 struct phy *phy;
17 /* old usb_phy interface */
18 struct usb_phy *usb_phy;
17 enum usb_phy_interface phy_mode; 19 enum usb_phy_interface phy_mode;
18 unsigned long flags; 20 unsigned long flags;
19#define CI_HDRC_REGS_SHARED BIT(0) 21#define CI_HDRC_REGS_SHARED BIT(0)
20#define CI_HDRC_REQUIRE_TRANSCEIVER BIT(1)
21#define CI_HDRC_DISABLE_STREAMING BIT(3) 22#define CI_HDRC_DISABLE_STREAMING BIT(3)
22 /* 23 /*
23 * Only set it when DCCPARAMS.DC==1 and DCCPARAMS.HC==1, 24 * Only set it when DCCPARAMS.DC==1 and DCCPARAMS.HC==1,
diff --git a/include/linux/usb/composite.h b/include/linux/usb/composite.h
index c330f5ef42cf..3d87defcc527 100644
--- a/include/linux/usb/composite.h
+++ b/include/linux/usb/composite.h
@@ -427,6 +427,8 @@ static inline struct usb_composite_driver *to_cdriver(
427 * @b_vendor_code: bMS_VendorCode part of the OS string 427 * @b_vendor_code: bMS_VendorCode part of the OS string
428 * @use_os_string: false by default, interested gadgets set it 428 * @use_os_string: false by default, interested gadgets set it
429 * @os_desc_config: the configuration to be used with OS descriptors 429 * @os_desc_config: the configuration to be used with OS descriptors
430 * @setup_pending: true when setup request is queued but not completed
431 * @os_desc_pending: true when os_desc request is queued but not completed
430 * 432 *
431 * One of these devices is allocated and initialized before the 433 * One of these devices is allocated and initialized before the
432 * associated device driver's bind() is called. 434 * associated device driver's bind() is called.
@@ -488,6 +490,9 @@ struct usb_composite_dev {
488 490
489 /* protects deactivations and delayed_status counts*/ 491 /* protects deactivations and delayed_status counts*/
490 spinlock_t lock; 492 spinlock_t lock;
493
494 unsigned setup_pending:1;
495 unsigned os_desc_pending:1;
491}; 496};
492 497
493extern int usb_string_id(struct usb_composite_dev *c); 498extern int usb_string_id(struct usb_composite_dev *c);
@@ -501,6 +506,8 @@ extern int usb_string_ids_n(struct usb_composite_dev *c, unsigned n);
501extern void composite_disconnect(struct usb_gadget *gadget); 506extern void composite_disconnect(struct usb_gadget *gadget);
502extern int composite_setup(struct usb_gadget *gadget, 507extern int composite_setup(struct usb_gadget *gadget,
503 const struct usb_ctrlrequest *ctrl); 508 const struct usb_ctrlrequest *ctrl);
509extern void composite_suspend(struct usb_gadget *gadget);
510extern void composite_resume(struct usb_gadget *gadget);
504 511
505/* 512/*
506 * Some systems will need runtime overrides for the product identifiers 513 * Some systems will need runtime overrides for the product identifiers
diff --git a/include/linux/usb/ehci-dbgp.h b/include/linux/usb/ehci-dbgp.h
new file mode 100644
index 000000000000..7344d9e591cc
--- /dev/null
+++ b/include/linux/usb/ehci-dbgp.h
@@ -0,0 +1,83 @@
1/*
2 * Standalone EHCI usb debug driver
3 *
4 * Originally written by:
5 * Eric W. Biederman" <ebiederm@xmission.com> and
6 * Yinghai Lu <yhlu.kernel@gmail.com>
7 *
8 * Changes for early/late printk and HW errata:
9 * Jason Wessel <jason.wessel@windriver.com>
10 * Copyright (C) 2009 Wind River Systems, Inc.
11 *
12 */
13
14#ifndef __LINUX_USB_EHCI_DBGP_H
15#define __LINUX_USB_EHCI_DBGP_H
16
17#include <linux/console.h>
18#include <linux/types.h>
19
20/* Appendix C, Debug port ... intended for use with special "debug devices"
21 * that can help if there's no serial console. (nonstandard enumeration.)
22 */
23struct ehci_dbg_port {
24 u32 control;
25#define DBGP_OWNER (1<<30)
26#define DBGP_ENABLED (1<<28)
27#define DBGP_DONE (1<<16)
28#define DBGP_INUSE (1<<10)
29#define DBGP_ERRCODE(x) (((x)>>7)&0x07)
30# define DBGP_ERR_BAD 1
31# define DBGP_ERR_SIGNAL 2
32#define DBGP_ERROR (1<<6)
33#define DBGP_GO (1<<5)
34#define DBGP_OUT (1<<4)
35#define DBGP_LEN(x) (((x)>>0)&0x0f)
36 u32 pids;
37#define DBGP_PID_GET(x) (((x)>>16)&0xff)
38#define DBGP_PID_SET(data, tok) (((data)<<8)|(tok))
39 u32 data03;
40 u32 data47;
41 u32 address;
42#define DBGP_EPADDR(dev, ep) (((dev)<<8)|(ep))
43};
44
45#ifdef CONFIG_EARLY_PRINTK_DBGP
46extern int early_dbgp_init(char *s);
47extern struct console early_dbgp_console;
48#endif /* CONFIG_EARLY_PRINTK_DBGP */
49
50struct usb_hcd;
51
52#ifdef CONFIG_XEN_DOM0
53extern int xen_dbgp_reset_prep(struct usb_hcd *);
54extern int xen_dbgp_external_startup(struct usb_hcd *);
55#else
56static inline int xen_dbgp_reset_prep(struct usb_hcd *hcd)
57{
58 return 1; /* Shouldn't this be 0? */
59}
60
61static inline int xen_dbgp_external_startup(struct usb_hcd *hcd)
62{
63 return -1;
64}
65#endif
66
67#ifdef CONFIG_EARLY_PRINTK_DBGP
68/* Call backs from ehci host driver to ehci debug driver */
69extern int dbgp_external_startup(struct usb_hcd *);
70extern int dbgp_reset_prep(struct usb_hcd *);
71#else
72static inline int dbgp_reset_prep(struct usb_hcd *hcd)
73{
74 return xen_dbgp_reset_prep(hcd);
75}
76
77static inline int dbgp_external_startup(struct usb_hcd *hcd)
78{
79 return xen_dbgp_external_startup(hcd);
80}
81#endif
82
83#endif /* __LINUX_USB_EHCI_DBGP_H */
diff --git a/include/linux/usb/ehci_def.h b/include/linux/usb/ehci_def.h
index daec99af5d54..966889a20ea3 100644
--- a/include/linux/usb/ehci_def.h
+++ b/include/linux/usb/ehci_def.h
@@ -19,6 +19,8 @@
19#ifndef __LINUX_USB_EHCI_DEF_H 19#ifndef __LINUX_USB_EHCI_DEF_H
20#define __LINUX_USB_EHCI_DEF_H 20#define __LINUX_USB_EHCI_DEF_H
21 21
22#include <linux/usb/ehci-dbgp.h>
23
22/* EHCI register interface, corresponds to EHCI Revision 0.95 specification */ 24/* EHCI register interface, corresponds to EHCI Revision 0.95 specification */
23 25
24/* Section 2.2 Host Controller Capability Registers */ 26/* Section 2.2 Host Controller Capability Registers */
@@ -190,67 +192,4 @@ struct ehci_regs {
190#define USBMODE_EX_HC (3<<0) /* host controller mode */ 192#define USBMODE_EX_HC (3<<0) /* host controller mode */
191}; 193};
192 194
193/* Appendix C, Debug port ... intended for use with special "debug devices"
194 * that can help if there's no serial console. (nonstandard enumeration.)
195 */
196struct ehci_dbg_port {
197 u32 control;
198#define DBGP_OWNER (1<<30)
199#define DBGP_ENABLED (1<<28)
200#define DBGP_DONE (1<<16)
201#define DBGP_INUSE (1<<10)
202#define DBGP_ERRCODE(x) (((x)>>7)&0x07)
203# define DBGP_ERR_BAD 1
204# define DBGP_ERR_SIGNAL 2
205#define DBGP_ERROR (1<<6)
206#define DBGP_GO (1<<5)
207#define DBGP_OUT (1<<4)
208#define DBGP_LEN(x) (((x)>>0)&0x0f)
209 u32 pids;
210#define DBGP_PID_GET(x) (((x)>>16)&0xff)
211#define DBGP_PID_SET(data, tok) (((data)<<8)|(tok))
212 u32 data03;
213 u32 data47;
214 u32 address;
215#define DBGP_EPADDR(dev, ep) (((dev)<<8)|(ep))
216};
217
218#ifdef CONFIG_EARLY_PRINTK_DBGP
219#include <linux/init.h>
220extern int __init early_dbgp_init(char *s);
221extern struct console early_dbgp_console;
222#endif /* CONFIG_EARLY_PRINTK_DBGP */
223
224struct usb_hcd;
225
226#ifdef CONFIG_XEN_DOM0
227extern int xen_dbgp_reset_prep(struct usb_hcd *);
228extern int xen_dbgp_external_startup(struct usb_hcd *);
229#else
230static inline int xen_dbgp_reset_prep(struct usb_hcd *hcd)
231{
232 return 1; /* Shouldn't this be 0? */
233}
234
235static inline int xen_dbgp_external_startup(struct usb_hcd *hcd)
236{
237 return -1;
238}
239#endif
240
241#ifdef CONFIG_EARLY_PRINTK_DBGP
242/* Call backs from ehci host driver to ehci debug driver */
243extern int dbgp_external_startup(struct usb_hcd *);
244extern int dbgp_reset_prep(struct usb_hcd *hcd);
245#else
246static inline int dbgp_reset_prep(struct usb_hcd *hcd)
247{
248 return xen_dbgp_reset_prep(hcd);
249}
250static inline int dbgp_external_startup(struct usb_hcd *hcd)
251{
252 return xen_dbgp_external_startup(hcd);
253}
254#endif
255
256#endif /* __LINUX_USB_EHCI_DEF_H */ 195#endif /* __LINUX_USB_EHCI_DEF_H */
diff --git a/include/linux/usb/gadget.h b/include/linux/usb/gadget.h
index 522cafe26790..70ddb3943b62 100644
--- a/include/linux/usb/gadget.h
+++ b/include/linux/usb/gadget.h
@@ -490,8 +490,7 @@ struct usb_gadget_ops {
490 void (*get_config_params)(struct usb_dcd_config_params *); 490 void (*get_config_params)(struct usb_dcd_config_params *);
491 int (*udc_start)(struct usb_gadget *, 491 int (*udc_start)(struct usb_gadget *,
492 struct usb_gadget_driver *); 492 struct usb_gadget_driver *);
493 int (*udc_stop)(struct usb_gadget *, 493 int (*udc_stop)(struct usb_gadget *);
494 struct usb_gadget_driver *);
495}; 494};
496 495
497/** 496/**
@@ -925,7 +924,7 @@ extern int usb_add_gadget_udc_release(struct device *parent,
925 struct usb_gadget *gadget, void (*release)(struct device *dev)); 924 struct usb_gadget *gadget, void (*release)(struct device *dev));
926extern int usb_add_gadget_udc(struct device *parent, struct usb_gadget *gadget); 925extern int usb_add_gadget_udc(struct device *parent, struct usb_gadget *gadget);
927extern void usb_del_gadget_udc(struct usb_gadget *gadget); 926extern void usb_del_gadget_udc(struct usb_gadget *gadget);
928extern int udc_attach_driver(const char *name, 927extern int usb_udc_attach_driver(const char *name,
929 struct usb_gadget_driver *driver); 928 struct usb_gadget_driver *driver);
930 929
931/*-------------------------------------------------------------------------*/ 930/*-------------------------------------------------------------------------*/
diff --git a/include/linux/usb/hcd.h b/include/linux/usb/hcd.h
index 668898e29d0e..086bf13307e6 100644
--- a/include/linux/usb/hcd.h
+++ b/include/linux/usb/hcd.h
@@ -379,6 +379,9 @@ struct hc_driver {
379 int (*disable_usb3_lpm_timeout)(struct usb_hcd *, 379 int (*disable_usb3_lpm_timeout)(struct usb_hcd *,
380 struct usb_device *, enum usb3_link_state state); 380 struct usb_device *, enum usb3_link_state state);
381 int (*find_raw_port_number)(struct usb_hcd *, int); 381 int (*find_raw_port_number)(struct usb_hcd *, int);
382 /* Call for power on/off the port if necessary */
383 int (*port_power)(struct usb_hcd *hcd, int portnum, bool enable);
384
382}; 385};
383 386
384static inline int hcd_giveback_urb_in_bh(struct usb_hcd *hcd) 387static inline int hcd_giveback_urb_in_bh(struct usb_hcd *hcd)
diff --git a/include/linux/usb/otg.h b/include/linux/usb/otg.h
index 154332b7c8c0..52661c5da690 100644
--- a/include/linux/usb/otg.h
+++ b/include/linux/usb/otg.h
@@ -9,15 +9,20 @@
9#ifndef __LINUX_USB_OTG_H 9#ifndef __LINUX_USB_OTG_H
10#define __LINUX_USB_OTG_H 10#define __LINUX_USB_OTG_H
11 11
12#include <linux/phy/phy.h>
12#include <linux/usb/phy.h> 13#include <linux/usb/phy.h>
13 14
14struct usb_otg { 15struct usb_otg {
15 u8 default_a; 16 u8 default_a;
16 17
17 struct usb_phy *phy; 18 struct phy *phy;
19 /* old usb_phy interface */
20 struct usb_phy *usb_phy;
18 struct usb_bus *host; 21 struct usb_bus *host;
19 struct usb_gadget *gadget; 22 struct usb_gadget *gadget;
20 23
24 enum usb_otg_state state;
25
21 /* bind/unbind the host controller */ 26 /* bind/unbind the host controller */
22 int (*set_host)(struct usb_otg *otg, struct usb_bus *host); 27 int (*set_host)(struct usb_otg *otg, struct usb_bus *host);
23 28
diff --git a/include/linux/usb/phy.h b/include/linux/usb/phy.h
index 353053a33f21..f499c23e6342 100644
--- a/include/linux/usb/phy.h
+++ b/include/linux/usb/phy.h
@@ -77,7 +77,6 @@ struct usb_phy {
77 unsigned int flags; 77 unsigned int flags;
78 78
79 enum usb_phy_type type; 79 enum usb_phy_type type;
80 enum usb_otg_state state;
81 enum usb_phy_events last_event; 80 enum usb_phy_events last_event;
82 81
83 struct usb_otg *otg; 82 struct usb_otg *otg;
@@ -210,6 +209,7 @@ extern void usb_put_phy(struct usb_phy *);
210extern void devm_usb_put_phy(struct device *dev, struct usb_phy *x); 209extern void devm_usb_put_phy(struct device *dev, struct usb_phy *x);
211extern int usb_bind_phy(const char *dev_name, u8 index, 210extern int usb_bind_phy(const char *dev_name, u8 index,
212 const char *phy_dev_name); 211 const char *phy_dev_name);
212extern void usb_phy_set_event(struct usb_phy *x, unsigned long event);
213#else 213#else
214static inline struct usb_phy *usb_get_phy(enum usb_phy_type type) 214static inline struct usb_phy *usb_get_phy(enum usb_phy_type type)
215{ 215{
@@ -251,6 +251,10 @@ static inline int usb_bind_phy(const char *dev_name, u8 index,
251{ 251{
252 return -EOPNOTSUPP; 252 return -EOPNOTSUPP;
253} 253}
254
255static inline void usb_phy_set_event(struct usb_phy *x, unsigned long event)
256{
257}
254#endif 258#endif
255 259
256static inline int 260static inline int
diff --git a/include/linux/usb/renesas_usbhs.h b/include/linux/usb/renesas_usbhs.h
index d5952bb66752..9fd9e481ea98 100644
--- a/include/linux/usb/renesas_usbhs.h
+++ b/include/linux/usb/renesas_usbhs.h
@@ -145,6 +145,10 @@ struct renesas_usbhs_driver_param {
145 int d0_rx_id; 145 int d0_rx_id;
146 int d1_tx_id; 146 int d1_tx_id;
147 int d1_rx_id; 147 int d1_rx_id;
148 int d2_tx_id;
149 int d2_rx_id;
150 int d3_tx_id;
151 int d3_rx_id;
148 152
149 /* 153 /*
150 * option: 154 * option: