.. | .. |
---|
13 | 13 | #include <linux/extcon.h> |
---|
14 | 14 | #include <linux/notifier.h> |
---|
15 | 15 | #include <linux/usb.h> |
---|
| 16 | +#include <linux/android_kabi.h> |
---|
16 | 17 | #include <uapi/linux/usb/charger.h> |
---|
17 | | - |
---|
18 | | -#define ENABLE_DP_MANUAL_PULLUP BIT(0) |
---|
19 | | -#define ENABLE_SECONDARY_PHY BIT(1) |
---|
20 | | -#define PHY_HOST_MODE BIT(2) |
---|
21 | | -#define PHY_CHARGER_CONNECTED BIT(3) |
---|
22 | | -#define PHY_VBUS_VALID_OVERRIDE BIT(4) |
---|
23 | | -#define DEVICE_IN_SS_MODE BIT(5) |
---|
24 | | -#define PHY_LANE_A BIT(6) |
---|
25 | | -#define PHY_LANE_B BIT(7) |
---|
26 | | -#define PHY_HSFS_MODE BIT(8) |
---|
27 | | -#define PHY_LS_MODE BIT(9) |
---|
28 | 18 | |
---|
29 | 19 | enum usb_phy_interface { |
---|
30 | 20 | USBPHY_INTERFACE_MODE_UNKNOWN, |
---|
.. | .. |
---|
48 | 38 | USB_PHY_TYPE_UNDEFINED, |
---|
49 | 39 | USB_PHY_TYPE_USB2, |
---|
50 | 40 | USB_PHY_TYPE_USB3, |
---|
51 | | - USB_PHY_TYPE_USB3_OR_DP, |
---|
52 | | - USB_PHY_TYPE_USB3_AND_DP, |
---|
53 | 41 | }; |
---|
54 | 42 | |
---|
55 | 43 | /* OTG defines lots of enumeration states before device reset */ |
---|
.. | .. |
---|
60 | 48 | OTG_STATE_B_IDLE, |
---|
61 | 49 | OTG_STATE_B_SRP_INIT, |
---|
62 | 50 | OTG_STATE_B_PERIPHERAL, |
---|
63 | | - OTG_STATE_B_SUSPEND, |
---|
64 | 51 | |
---|
65 | 52 | /* extra dual-role default-b states */ |
---|
66 | 53 | OTG_STATE_B_WAIT_ACON, |
---|
.. | .. |
---|
170 | 157 | */ |
---|
171 | 158 | enum usb_charger_type (*charger_detect)(struct usb_phy *x); |
---|
172 | 159 | |
---|
173 | | - /* reset the PHY clocks */ |
---|
174 | | - int (*reset)(struct usb_phy *x); |
---|
175 | | - int (*drive_dp_pulse)(struct usb_phy *x, unsigned int pulse_width); |
---|
| 160 | + ANDROID_KABI_RESERVE(1); |
---|
176 | 161 | }; |
---|
177 | 162 | |
---|
178 | 163 | /* for board-specific init logic */ |
---|
.. | .. |
---|
229 | 214 | return 0; |
---|
230 | 215 | |
---|
231 | 216 | return x->set_vbus(x, false); |
---|
232 | | -} |
---|
233 | | - |
---|
234 | | -static inline int |
---|
235 | | -usb_phy_reset(struct usb_phy *x) |
---|
236 | | -{ |
---|
237 | | - if (x && x->reset) |
---|
238 | | - return x->reset(x); |
---|
239 | | - |
---|
240 | | - return 0; |
---|
241 | | -} |
---|
242 | | - |
---|
243 | | -static inline int |
---|
244 | | -usb_phy_drive_dp_pulse(struct usb_phy *x, unsigned int pulse_width) |
---|
245 | | -{ |
---|
246 | | - if (x && x->drive_dp_pulse) |
---|
247 | | - return x->drive_dp_pulse(x, pulse_width); |
---|
248 | | - |
---|
249 | | - return 0; |
---|
250 | 217 | } |
---|
251 | 218 | |
---|
252 | 219 | /* for usb host and peripheral controller drivers */ |
---|