diff options
Diffstat (limited to 'include/linux')
| -rw-r--r-- | include/linux/platform_data/dwc3-omap.h | 4 | ||||
| -rw-r--r-- | include/linux/platform_data/mv_usb.h | 2 | ||||
| -rw-r--r-- | include/linux/usb/ch9.h | 9 | ||||
| -rw-r--r-- | include/linux/usb/composite.h | 3 | ||||
| -rw-r--r-- | include/linux/usb/dwc3-omap.h | 6 | ||||
| -rw-r--r-- | include/linux/usb/gadget.h | 11 | ||||
| -rw-r--r-- | include/linux/usb/gadget_configfs.h | 110 | ||||
| -rw-r--r-- | include/linux/usb/musb-ux500.h | 31 | ||||
| -rw-r--r-- | include/linux/usb/nop-usb-xceiv.h | 5 | ||||
| -rw-r--r-- | include/linux/usb/otg.h | 9 | ||||
| -rw-r--r-- | include/linux/usb/phy.h | 33 | ||||
| -rw-r--r-- | include/linux/usb/renesas_usbhs.h | 6 |
12 files changed, 203 insertions, 26 deletions
diff --git a/include/linux/platform_data/dwc3-omap.h b/include/linux/platform_data/dwc3-omap.h index ada401244e0b..1d36ca874cc8 100644 --- a/include/linux/platform_data/dwc3-omap.h +++ b/include/linux/platform_data/dwc3-omap.h | |||
| @@ -41,7 +41,3 @@ enum dwc3_omap_utmi_mode { | |||
| 41 | DWC3_OMAP_UTMI_MODE_HW, | 41 | DWC3_OMAP_UTMI_MODE_HW, |
| 42 | DWC3_OMAP_UTMI_MODE_SW, | 42 | DWC3_OMAP_UTMI_MODE_SW, |
| 43 | }; | 43 | }; |
| 44 | |||
| 45 | struct dwc3_omap_data { | ||
| 46 | enum dwc3_omap_utmi_mode utmi_mode; | ||
| 47 | }; | ||
diff --git a/include/linux/platform_data/mv_usb.h b/include/linux/platform_data/mv_usb.h index 944b01dd103e..98b7925f1a2d 100644 --- a/include/linux/platform_data/mv_usb.h +++ b/include/linux/platform_data/mv_usb.h | |||
| @@ -34,8 +34,6 @@ struct mv_usb_addon_irq { | |||
| 34 | }; | 34 | }; |
| 35 | 35 | ||
| 36 | struct mv_usb_platform_data { | 36 | struct mv_usb_platform_data { |
| 37 | unsigned int clknum; | ||
| 38 | char **clkname; | ||
| 39 | struct mv_usb_addon_irq *id; /* Only valid for OTG. ID pin change*/ | 37 | struct mv_usb_addon_irq *id; /* Only valid for OTG. ID pin change*/ |
| 40 | struct mv_usb_addon_irq *vbus; /* valid for OTG/UDC. VBUS change*/ | 38 | struct mv_usb_addon_irq *vbus; /* valid for OTG/UDC. VBUS change*/ |
| 41 | 39 | ||
diff --git a/include/linux/usb/ch9.h b/include/linux/usb/ch9.h index 9c210f2283df..27603bcbb9b9 100644 --- a/include/linux/usb/ch9.h +++ b/include/linux/usb/ch9.h | |||
| @@ -43,4 +43,13 @@ | |||
| 43 | */ | 43 | */ |
| 44 | extern const char *usb_speed_string(enum usb_device_speed speed); | 44 | extern const char *usb_speed_string(enum usb_device_speed speed); |
| 45 | 45 | ||
| 46 | |||
| 47 | /** | ||
| 48 | * usb_state_string - Returns human readable name for the state. | ||
| 49 | * @state: The state to return a human-readable name for. If it's not | ||
| 50 | * any of the states devices in usb_device_state_string enum, | ||
| 51 | * the string UNKNOWN will be returned. | ||
| 52 | */ | ||
| 53 | extern const char *usb_state_string(enum usb_device_state state); | ||
| 54 | |||
| 46 | #endif /* __LINUX_USB_CH9_H */ | 55 | #endif /* __LINUX_USB_CH9_H */ |
diff --git a/include/linux/usb/composite.h b/include/linux/usb/composite.h index 8860594d6364..5e61589fc166 100644 --- a/include/linux/usb/composite.h +++ b/include/linux/usb/composite.h | |||
| @@ -39,6 +39,7 @@ | |||
| 39 | #include <linux/usb/ch9.h> | 39 | #include <linux/usb/ch9.h> |
| 40 | #include <linux/usb/gadget.h> | 40 | #include <linux/usb/gadget.h> |
| 41 | #include <linux/log2.h> | 41 | #include <linux/log2.h> |
| 42 | #include <linux/configfs.h> | ||
| 42 | 43 | ||
| 43 | /* | 44 | /* |
| 44 | * USB function drivers should return USB_GADGET_DELAYED_STATUS if they | 45 | * USB function drivers should return USB_GADGET_DELAYED_STATUS if they |
| @@ -464,6 +465,8 @@ struct usb_function_driver { | |||
| 464 | }; | 465 | }; |
| 465 | 466 | ||
| 466 | struct usb_function_instance { | 467 | struct usb_function_instance { |
| 468 | struct config_group group; | ||
| 469 | struct list_head cfs_list; | ||
| 467 | struct usb_function_driver *fd; | 470 | struct usb_function_driver *fd; |
| 468 | void (*free_func_inst)(struct usb_function_instance *inst); | 471 | void (*free_func_inst)(struct usb_function_instance *inst); |
| 469 | }; | 472 | }; |
diff --git a/include/linux/usb/dwc3-omap.h b/include/linux/usb/dwc3-omap.h index 51eae14477f7..5615f4d82724 100644 --- a/include/linux/usb/dwc3-omap.h +++ b/include/linux/usb/dwc3-omap.h | |||
| @@ -19,11 +19,11 @@ enum omap_dwc3_vbus_id_status { | |||
| 19 | }; | 19 | }; |
| 20 | 20 | ||
| 21 | #if (defined(CONFIG_USB_DWC3) || defined(CONFIG_USB_DWC3_MODULE)) | 21 | #if (defined(CONFIG_USB_DWC3) || defined(CONFIG_USB_DWC3_MODULE)) |
| 22 | extern void dwc3_omap_mailbox(enum omap_dwc3_vbus_id_status status); | 22 | extern int dwc3_omap_mailbox(enum omap_dwc3_vbus_id_status status); |
| 23 | #else | 23 | #else |
| 24 | static inline void dwc3_omap_mailbox(enum omap_dwc3_vbus_id_status status) | 24 | static inline int dwc3_omap_mailbox(enum omap_dwc3_vbus_id_status status) |
| 25 | { | 25 | { |
| 26 | return; | 26 | return -ENODEV; |
| 27 | } | 27 | } |
| 28 | #endif | 28 | #endif |
| 29 | 29 | ||
diff --git a/include/linux/usb/gadget.h b/include/linux/usb/gadget.h index 2e297e80d59a..c454a88abf2e 100644 --- a/include/linux/usb/gadget.h +++ b/include/linux/usb/gadget.h | |||
| @@ -482,6 +482,7 @@ struct usb_gadget_ops { | |||
| 482 | * @speed: Speed of current connection to USB host. | 482 | * @speed: Speed of current connection to USB host. |
| 483 | * @max_speed: Maximal speed the UDC can handle. UDC must support this | 483 | * @max_speed: Maximal speed the UDC can handle. UDC must support this |
| 484 | * and all slower speeds. | 484 | * and all slower speeds. |
| 485 | * @state: the state we are now (attached, suspended, configured, etc) | ||
| 485 | * @sg_supported: true if we can handle scatter-gather | 486 | * @sg_supported: true if we can handle scatter-gather |
| 486 | * @is_otg: True if the USB device port uses a Mini-AB jack, so that the | 487 | * @is_otg: True if the USB device port uses a Mini-AB jack, so that the |
| 487 | * gadget driver must provide a USB OTG descriptor. | 488 | * gadget driver must provide a USB OTG descriptor. |
| @@ -525,6 +526,7 @@ struct usb_gadget { | |||
| 525 | struct list_head ep_list; /* of usb_ep */ | 526 | struct list_head ep_list; /* of usb_ep */ |
| 526 | enum usb_device_speed speed; | 527 | enum usb_device_speed speed; |
| 527 | enum usb_device_speed max_speed; | 528 | enum usb_device_speed max_speed; |
| 529 | enum usb_device_state state; | ||
| 528 | unsigned sg_supported:1; | 530 | unsigned sg_supported:1; |
| 529 | unsigned is_otg:1; | 531 | unsigned is_otg:1; |
| 530 | unsigned is_a_peripheral:1; | 532 | unsigned is_a_peripheral:1; |
| @@ -872,6 +874,8 @@ int usb_gadget_probe_driver(struct usb_gadget_driver *driver); | |||
| 872 | */ | 874 | */ |
| 873 | int usb_gadget_unregister_driver(struct usb_gadget_driver *driver); | 875 | int usb_gadget_unregister_driver(struct usb_gadget_driver *driver); |
| 874 | 876 | ||
| 877 | extern int usb_add_gadget_udc_release(struct device *parent, | ||
| 878 | struct usb_gadget *gadget, void (*release)(struct device *dev)); | ||
| 875 | extern int usb_add_gadget_udc(struct device *parent, struct usb_gadget *gadget); | 879 | extern int usb_add_gadget_udc(struct device *parent, struct usb_gadget *gadget); |
| 876 | extern void usb_del_gadget_udc(struct usb_gadget *gadget); | 880 | extern void usb_del_gadget_udc(struct usb_gadget *gadget); |
| 877 | extern int udc_attach_driver(const char *name, | 881 | extern int udc_attach_driver(const char *name, |
| @@ -959,6 +963,13 @@ extern void usb_gadget_unmap_request(struct usb_gadget *gadget, | |||
| 959 | 963 | ||
| 960 | /*-------------------------------------------------------------------------*/ | 964 | /*-------------------------------------------------------------------------*/ |
| 961 | 965 | ||
| 966 | /* utility to set gadget state properly */ | ||
| 967 | |||
| 968 | extern void usb_gadget_set_state(struct usb_gadget *gadget, | ||
| 969 | enum usb_device_state state); | ||
| 970 | |||
| 971 | /*-------------------------------------------------------------------------*/ | ||
| 972 | |||
| 962 | /* utility wrapping a simple endpoint selection policy */ | 973 | /* utility wrapping a simple endpoint selection policy */ |
| 963 | 974 | ||
| 964 | extern struct usb_ep *usb_ep_autoconfig(struct usb_gadget *, | 975 | extern struct usb_ep *usb_ep_autoconfig(struct usb_gadget *, |
diff --git a/include/linux/usb/gadget_configfs.h b/include/linux/usb/gadget_configfs.h new file mode 100644 index 000000000000..d74c0ae989d5 --- /dev/null +++ b/include/linux/usb/gadget_configfs.h | |||
| @@ -0,0 +1,110 @@ | |||
| 1 | #ifndef __GADGET_CONFIGFS__ | ||
| 2 | #define __GADGET_CONFIGFS__ | ||
| 3 | |||
| 4 | #include <linux/configfs.h> | ||
| 5 | |||
| 6 | int check_user_usb_string(const char *name, | ||
| 7 | struct usb_gadget_strings *stringtab_dev); | ||
| 8 | |||
| 9 | #define GS_STRINGS_W(__struct, __name) \ | ||
| 10 | static ssize_t __struct##_##__name##_store(struct __struct *gs, \ | ||
| 11 | const char *page, size_t len) \ | ||
| 12 | { \ | ||
| 13 | int ret; \ | ||
| 14 | \ | ||
| 15 | ret = usb_string_copy(page, &gs->__name); \ | ||
| 16 | if (ret) \ | ||
| 17 | return ret; \ | ||
| 18 | return len; \ | ||
| 19 | } | ||
| 20 | |||
| 21 | #define GS_STRINGS_R(__struct, __name) \ | ||
| 22 | static ssize_t __struct##_##__name##_show(struct __struct *gs, \ | ||
| 23 | char *page) \ | ||
| 24 | { \ | ||
| 25 | return sprintf(page, "%s\n", gs->__name ?: ""); \ | ||
| 26 | } | ||
| 27 | |||
| 28 | #define GS_STRING_ITEM_ATTR(struct_name, name) \ | ||
| 29 | static struct struct_name##_attribute struct_name##_##name = \ | ||
| 30 | __CONFIGFS_ATTR(name, S_IRUGO | S_IWUSR, \ | ||
| 31 | struct_name##_##name##_show, \ | ||
| 32 | struct_name##_##name##_store) | ||
| 33 | |||
| 34 | #define GS_STRINGS_RW(struct_name, _name) \ | ||
| 35 | GS_STRINGS_R(struct_name, _name) \ | ||
| 36 | GS_STRINGS_W(struct_name, _name) \ | ||
| 37 | GS_STRING_ITEM_ATTR(struct_name, _name) | ||
| 38 | |||
| 39 | #define USB_CONFIG_STRING_RW_OPS(struct_in) \ | ||
| 40 | CONFIGFS_ATTR_OPS(struct_in); \ | ||
| 41 | \ | ||
| 42 | static struct configfs_item_operations struct_in##_langid_item_ops = { \ | ||
| 43 | .release = struct_in##_attr_release, \ | ||
| 44 | .show_attribute = struct_in##_attr_show, \ | ||
| 45 | .store_attribute = struct_in##_attr_store, \ | ||
| 46 | }; \ | ||
| 47 | \ | ||
| 48 | static struct config_item_type struct_in##_langid_type = { \ | ||
| 49 | .ct_item_ops = &struct_in##_langid_item_ops, \ | ||
| 50 | .ct_attrs = struct_in##_langid_attrs, \ | ||
| 51 | .ct_owner = THIS_MODULE, \ | ||
| 52 | } | ||
| 53 | |||
| 54 | #define USB_CONFIG_STRINGS_LANG(struct_in, struct_member) \ | ||
| 55 | static struct config_group *struct_in##_strings_make( \ | ||
| 56 | struct config_group *group, \ | ||
| 57 | const char *name) \ | ||
| 58 | { \ | ||
| 59 | struct struct_member *gi; \ | ||
| 60 | struct struct_in *gs; \ | ||
| 61 | struct struct_in *new; \ | ||
| 62 | int langs = 0; \ | ||
| 63 | int ret; \ | ||
| 64 | \ | ||
| 65 | new = kzalloc(sizeof(*new), GFP_KERNEL); \ | ||
| 66 | if (!new) \ | ||
| 67 | return ERR_PTR(-ENOMEM); \ | ||
| 68 | \ | ||
| 69 | ret = check_user_usb_string(name, &new->stringtab_dev); \ | ||
| 70 | if (ret) \ | ||
| 71 | goto err; \ | ||
| 72 | config_group_init_type_name(&new->group, name, \ | ||
| 73 | &struct_in##_langid_type); \ | ||
| 74 | \ | ||
| 75 | gi = container_of(group, struct struct_member, strings_group); \ | ||
| 76 | ret = -EEXIST; \ | ||
| 77 | list_for_each_entry(gs, &gi->string_list, list) { \ | ||
| 78 | if (gs->stringtab_dev.language == new->stringtab_dev.language) \ | ||
| 79 | goto err; \ | ||
| 80 | langs++; \ | ||
| 81 | } \ | ||
| 82 | ret = -EOVERFLOW; \ | ||
| 83 | if (langs >= MAX_USB_STRING_LANGS) \ | ||
| 84 | goto err; \ | ||
| 85 | \ | ||
| 86 | list_add_tail(&new->list, &gi->string_list); \ | ||
| 87 | return &new->group; \ | ||
| 88 | err: \ | ||
| 89 | kfree(new); \ | ||
| 90 | return ERR_PTR(ret); \ | ||
| 91 | } \ | ||
| 92 | \ | ||
| 93 | static void struct_in##_strings_drop( \ | ||
| 94 | struct config_group *group, \ | ||
| 95 | struct config_item *item) \ | ||
| 96 | { \ | ||
| 97 | config_item_put(item); \ | ||
| 98 | } \ | ||
| 99 | \ | ||
| 100 | static struct configfs_group_operations struct_in##_strings_ops = { \ | ||
| 101 | .make_group = &struct_in##_strings_make, \ | ||
| 102 | .drop_item = &struct_in##_strings_drop, \ | ||
| 103 | }; \ | ||
| 104 | \ | ||
| 105 | static struct config_item_type struct_in##_strings_type = { \ | ||
| 106 | .ct_group_ops = &struct_in##_strings_ops, \ | ||
| 107 | .ct_owner = THIS_MODULE, \ | ||
| 108 | } | ||
| 109 | |||
| 110 | #endif | ||
diff --git a/include/linux/usb/musb-ux500.h b/include/linux/usb/musb-ux500.h new file mode 100644 index 000000000000..1e2c7130f6e1 --- /dev/null +++ b/include/linux/usb/musb-ux500.h | |||
| @@ -0,0 +1,31 @@ | |||
| 1 | /* | ||
| 2 | * Copyright (C) 2013 ST-Ericsson AB | ||
| 3 | * | ||
| 4 | * This program is free software; you can redistribute it and/or modify | ||
| 5 | * it under the terms of the GNU General Public License as published by | ||
| 6 | * the Free Software Foundation; either version 2 of the License, or | ||
| 7 | * (at your option) any later version. | ||
| 8 | * | ||
| 9 | * This program is distributed in the hope that it will be useful, | ||
| 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
| 12 | * GNU General Public License for more details. | ||
| 13 | */ | ||
| 14 | |||
| 15 | #ifndef __MUSB_UX500_H__ | ||
| 16 | #define __MUSB_UX500_H__ | ||
| 17 | |||
| 18 | enum ux500_musb_vbus_id_status { | ||
| 19 | UX500_MUSB_NONE = 0, | ||
| 20 | UX500_MUSB_VBUS, | ||
| 21 | UX500_MUSB_ID, | ||
| 22 | UX500_MUSB_CHARGER, | ||
| 23 | UX500_MUSB_ENUMERATED, | ||
| 24 | UX500_MUSB_RIDA, | ||
| 25 | UX500_MUSB_RIDB, | ||
| 26 | UX500_MUSB_RIDC, | ||
| 27 | UX500_MUSB_PREPARE, | ||
| 28 | UX500_MUSB_CLEAN, | ||
| 29 | }; | ||
| 30 | |||
| 31 | #endif /* __MUSB_UX500_H__ */ | ||
diff --git a/include/linux/usb/nop-usb-xceiv.h b/include/linux/usb/nop-usb-xceiv.h index 28884c717411..148d35171aac 100644 --- a/include/linux/usb/nop-usb-xceiv.h +++ b/include/linux/usb/nop-usb-xceiv.h | |||
| @@ -5,6 +5,11 @@ | |||
| 5 | 5 | ||
| 6 | struct nop_usb_xceiv_platform_data { | 6 | struct nop_usb_xceiv_platform_data { |
| 7 | enum usb_phy_type type; | 7 | enum usb_phy_type type; |
| 8 | unsigned long clk_rate; | ||
| 9 | |||
| 10 | /* if set fails with -EPROBE_DEFER if can't get regulator */ | ||
| 11 | unsigned int needs_vcc:1; | ||
| 12 | unsigned int needs_reset:1; | ||
| 8 | }; | 13 | }; |
| 9 | 14 | ||
| 10 | #if defined(CONFIG_NOP_USB_XCEIV) || (defined(CONFIG_NOP_USB_XCEIV_MODULE) && defined(MODULE)) | 15 | #if defined(CONFIG_NOP_USB_XCEIV) || (defined(CONFIG_NOP_USB_XCEIV_MODULE) && defined(MODULE)) |
diff --git a/include/linux/usb/otg.h b/include/linux/usb/otg.h index e8a5fe87c6bd..291e01ba32e5 100644 --- a/include/linux/usb/otg.h +++ b/include/linux/usb/otg.h | |||
| @@ -36,14 +36,7 @@ struct usb_otg { | |||
| 36 | 36 | ||
| 37 | }; | 37 | }; |
| 38 | 38 | ||
| 39 | #ifdef CONFIG_USB_OTG_UTILS | 39 | extern const char *usb_otg_state_string(enum usb_otg_state state); |
| 40 | extern const char *otg_state_string(enum usb_otg_state state); | ||
| 41 | #else | ||
| 42 | static inline const char *otg_state_string(enum usb_otg_state state) | ||
| 43 | { | ||
| 44 | return NULL; | ||
| 45 | } | ||
| 46 | #endif | ||
| 47 | 40 | ||
| 48 | /* Context: can sleep */ | 41 | /* Context: can sleep */ |
| 49 | static inline int | 42 | static inline int |
diff --git a/include/linux/usb/phy.h b/include/linux/usb/phy.h index 15847cbdb512..6b5978f57633 100644 --- a/include/linux/usb/phy.h +++ b/include/linux/usb/phy.h | |||
| @@ -91,6 +91,9 @@ struct usb_phy { | |||
| 91 | int (*init)(struct usb_phy *x); | 91 | int (*init)(struct usb_phy *x); |
| 92 | void (*shutdown)(struct usb_phy *x); | 92 | void (*shutdown)(struct usb_phy *x); |
| 93 | 93 | ||
| 94 | /* enable/disable VBUS */ | ||
| 95 | int (*set_vbus)(struct usb_phy *x, int on); | ||
| 96 | |||
| 94 | /* effective for B devices, ignored for A-peripheral */ | 97 | /* effective for B devices, ignored for A-peripheral */ |
| 95 | int (*set_power)(struct usb_phy *x, | 98 | int (*set_power)(struct usb_phy *x, |
| 96 | unsigned mA); | 99 | unsigned mA); |
| @@ -160,8 +163,26 @@ usb_phy_shutdown(struct usb_phy *x) | |||
| 160 | x->shutdown(x); | 163 | x->shutdown(x); |
| 161 | } | 164 | } |
| 162 | 165 | ||
| 166 | static inline int | ||
| 167 | usb_phy_vbus_on(struct usb_phy *x) | ||
| 168 | { | ||
| 169 | if (!x->set_vbus) | ||
| 170 | return 0; | ||
| 171 | |||
| 172 | return x->set_vbus(x, true); | ||
| 173 | } | ||
| 174 | |||
| 175 | static inline int | ||
| 176 | usb_phy_vbus_off(struct usb_phy *x) | ||
| 177 | { | ||
| 178 | if (!x->set_vbus) | ||
| 179 | return 0; | ||
| 180 | |||
| 181 | return x->set_vbus(x, false); | ||
| 182 | } | ||
| 183 | |||
| 163 | /* for usb host and peripheral controller drivers */ | 184 | /* for usb host and peripheral controller drivers */ |
| 164 | #ifdef CONFIG_USB_OTG_UTILS | 185 | #if IS_ENABLED(CONFIG_USB_PHY) |
| 165 | extern struct usb_phy *usb_get_phy(enum usb_phy_type type); | 186 | extern struct usb_phy *usb_get_phy(enum usb_phy_type type); |
| 166 | extern struct usb_phy *devm_usb_get_phy(struct device *dev, | 187 | extern struct usb_phy *devm_usb_get_phy(struct device *dev, |
| 167 | enum usb_phy_type type); | 188 | enum usb_phy_type type); |
| @@ -176,29 +197,29 @@ extern int usb_bind_phy(const char *dev_name, u8 index, | |||
| 176 | #else | 197 | #else |
| 177 | static inline struct usb_phy *usb_get_phy(enum usb_phy_type type) | 198 | static inline struct usb_phy *usb_get_phy(enum usb_phy_type type) |
| 178 | { | 199 | { |
| 179 | return NULL; | 200 | return ERR_PTR(-ENXIO); |
| 180 | } | 201 | } |
| 181 | 202 | ||
| 182 | static inline struct usb_phy *devm_usb_get_phy(struct device *dev, | 203 | static inline struct usb_phy *devm_usb_get_phy(struct device *dev, |
| 183 | enum usb_phy_type type) | 204 | enum usb_phy_type type) |
| 184 | { | 205 | { |
| 185 | return NULL; | 206 | return ERR_PTR(-ENXIO); |
| 186 | } | 207 | } |
| 187 | 208 | ||
| 188 | static inline struct usb_phy *usb_get_phy_dev(struct device *dev, u8 index) | 209 | static inline struct usb_phy *usb_get_phy_dev(struct device *dev, u8 index) |
| 189 | { | 210 | { |
| 190 | return NULL; | 211 | return ERR_PTR(-ENXIO); |
| 191 | } | 212 | } |
| 192 | 213 | ||
| 193 | static inline struct usb_phy *devm_usb_get_phy_dev(struct device *dev, u8 index) | 214 | static inline struct usb_phy *devm_usb_get_phy_dev(struct device *dev, u8 index) |
| 194 | { | 215 | { |
| 195 | return NULL; | 216 | return ERR_PTR(-ENXIO); |
| 196 | } | 217 | } |
| 197 | 218 | ||
| 198 | static inline struct usb_phy *devm_usb_get_phy_by_phandle(struct device *dev, | 219 | static inline struct usb_phy *devm_usb_get_phy_by_phandle(struct device *dev, |
| 199 | const char *phandle, u8 index) | 220 | const char *phandle, u8 index) |
| 200 | { | 221 | { |
| 201 | return NULL; | 222 | return ERR_PTR(-ENXIO); |
| 202 | } | 223 | } |
| 203 | 224 | ||
| 204 | static inline void usb_put_phy(struct usb_phy *x) | 225 | static inline void usb_put_phy(struct usb_phy *x) |
diff --git a/include/linux/usb/renesas_usbhs.h b/include/linux/usb/renesas_usbhs.h index c5d36c65c33b..e452ba6ec6bd 100644 --- a/include/linux/usb/renesas_usbhs.h +++ b/include/linux/usb/renesas_usbhs.h | |||
| @@ -62,14 +62,14 @@ struct renesas_usbhs_platform_callback { | |||
| 62 | * Hardware exit function for platform. | 62 | * Hardware exit function for platform. |
| 63 | * it is called when driver was removed | 63 | * it is called when driver was removed |
| 64 | */ | 64 | */ |
| 65 | void (*hardware_exit)(struct platform_device *pdev); | 65 | int (*hardware_exit)(struct platform_device *pdev); |
| 66 | 66 | ||
| 67 | /* | 67 | /* |
| 68 | * option: | 68 | * option: |
| 69 | * | 69 | * |
| 70 | * for board specific clock control | 70 | * for board specific clock control |
| 71 | */ | 71 | */ |
| 72 | void (*power_ctrl)(struct platform_device *pdev, | 72 | int (*power_ctrl)(struct platform_device *pdev, |
| 73 | void __iomem *base, int enable); | 73 | void __iomem *base, int enable); |
| 74 | 74 | ||
| 75 | /* | 75 | /* |
| @@ -77,7 +77,7 @@ struct renesas_usbhs_platform_callback { | |||
| 77 | * | 77 | * |
| 78 | * Phy reset for platform | 78 | * Phy reset for platform |
| 79 | */ | 79 | */ |
| 80 | void (*phy_reset)(struct platform_device *pdev); | 80 | int (*phy_reset)(struct platform_device *pdev); |
| 81 | 81 | ||
| 82 | /* | 82 | /* |
| 83 | * get USB ID function | 83 | * get USB ID function |
