Lines Matching refs:x
74 int (*read)(struct usb_phy *x, u32 reg);
75 int (*write)(struct usb_phy *x, u32 val, u32 reg);
127 int (*init)(struct usb_phy *x);
128 void (*shutdown)(struct usb_phy *x);
131 int (*set_vbus)(struct usb_phy *x, int on);
134 int (*set_power)(struct usb_phy *x,
138 int (*set_suspend)(struct usb_phy *x,
146 int (*set_wakeup)(struct usb_phy *x, bool enabled);
149 int (*notify_connect)(struct usb_phy *x,
151 int (*notify_disconnect)(struct usb_phy *x,
158 enum usb_charger_type (*charger_detect)(struct usb_phy *x);
169 static inline int usb_phy_io_read(struct usb_phy *x, u32 reg) in usb_phy_io_read() argument
171 if (x && x->io_ops && x->io_ops->read) in usb_phy_io_read()
172 return x->io_ops->read(x, reg); in usb_phy_io_read()
177 static inline int usb_phy_io_write(struct usb_phy *x, u32 val, u32 reg) in usb_phy_io_write() argument
179 if (x && x->io_ops && x->io_ops->write) in usb_phy_io_write()
180 return x->io_ops->write(x, val, reg); in usb_phy_io_write()
186 usb_phy_init(struct usb_phy *x) in usb_phy_init() argument
188 if (x && x->init) in usb_phy_init()
189 return x->init(x); in usb_phy_init()
195 usb_phy_shutdown(struct usb_phy *x) in usb_phy_shutdown() argument
197 if (x && x->shutdown) in usb_phy_shutdown()
198 x->shutdown(x); in usb_phy_shutdown()
202 usb_phy_vbus_on(struct usb_phy *x) in usb_phy_vbus_on() argument
204 if (!x || !x->set_vbus) in usb_phy_vbus_on()
207 return x->set_vbus(x, true); in usb_phy_vbus_on()
211 usb_phy_vbus_off(struct usb_phy *x) in usb_phy_vbus_off() argument
213 if (!x || !x->set_vbus) in usb_phy_vbus_off()
216 return x->set_vbus(x, false); in usb_phy_vbus_off()
229 extern void devm_usb_put_phy(struct device *dev, struct usb_phy *x);
230 extern void usb_phy_set_event(struct usb_phy *x, unsigned long event);
261 static inline void usb_put_phy(struct usb_phy *x) in usb_put_phy() argument
265 static inline void devm_usb_put_phy(struct device *dev, struct usb_phy *x) in devm_usb_put_phy() argument
269 static inline void usb_phy_set_event(struct usb_phy *x, unsigned long event) in usb_phy_set_event() argument
291 usb_phy_set_power(struct usb_phy *x, unsigned mA) in usb_phy_set_power() argument
293 if (!x) in usb_phy_set_power()
296 usb_phy_set_charger_current(x, mA); in usb_phy_set_power()
298 if (x->set_power) in usb_phy_set_power()
299 return x->set_power(x, mA); in usb_phy_set_power()
305 usb_phy_set_suspend(struct usb_phy *x, int suspend) in usb_phy_set_suspend() argument
307 if (x && x->set_suspend != NULL) in usb_phy_set_suspend()
308 return x->set_suspend(x, suspend); in usb_phy_set_suspend()
314 usb_phy_set_wakeup(struct usb_phy *x, bool enabled) in usb_phy_set_wakeup() argument
316 if (x && x->set_wakeup) in usb_phy_set_wakeup()
317 return x->set_wakeup(x, enabled); in usb_phy_set_wakeup()
323 usb_phy_notify_connect(struct usb_phy *x, enum usb_device_speed speed) in usb_phy_notify_connect() argument
325 if (x && x->notify_connect) in usb_phy_notify_connect()
326 return x->notify_connect(x, speed); in usb_phy_notify_connect()
332 usb_phy_notify_disconnect(struct usb_phy *x, enum usb_device_speed speed) in usb_phy_notify_disconnect() argument
334 if (x && x->notify_disconnect) in usb_phy_notify_disconnect()
335 return x->notify_disconnect(x, speed); in usb_phy_notify_disconnect()
342 usb_register_notifier(struct usb_phy *x, struct notifier_block *nb) in usb_register_notifier() argument
344 return atomic_notifier_chain_register(&x->notifier, nb); in usb_register_notifier()
348 usb_unregister_notifier(struct usb_phy *x, struct notifier_block *nb) in usb_unregister_notifier() argument
350 atomic_notifier_chain_unregister(&x->notifier, nb); in usb_unregister_notifier()