Lines Matching refs:dev
50 typedef void (*usbc_ppc_event_cb_t)(const struct device *dev, void *data, enum usbc_ppc_event ev);
54 int (*is_dead_battery_mode)(const struct device *dev);
55 int (*exit_dead_battery_mode)(const struct device *dev);
56 int (*is_vbus_source)(const struct device *dev);
57 int (*is_vbus_sink)(const struct device *dev);
58 int (*set_snk_ctrl)(const struct device *dev, bool enable);
59 int (*set_src_ctrl)(const struct device *dev, bool enable);
60 int (*set_vbus_discharge)(const struct device *dev, bool enable);
61 int (*is_vbus_present)(const struct device *dev);
62 int (*set_event_handler)(const struct device *dev, usbc_ppc_event_cb_t handler, void *data);
63 int (*dump_regs)(const struct device *dev);
79 static inline int ppc_is_dead_battery_mode(const struct device *dev) in ppc_is_dead_battery_mode() argument
81 const struct usbc_ppc_driver_api *api = (const struct usbc_ppc_driver_api *)dev->api; in ppc_is_dead_battery_mode()
87 return api->is_dead_battery_mode(dev); in ppc_is_dead_battery_mode()
102 static inline int ppc_exit_dead_battery_mode(const struct device *dev) in ppc_exit_dead_battery_mode() argument
104 const struct usbc_ppc_driver_api *api = (const struct usbc_ppc_driver_api *)dev->api; in ppc_exit_dead_battery_mode()
110 return api->exit_dead_battery_mode(dev); in ppc_exit_dead_battery_mode()
122 static inline int ppc_is_vbus_source(const struct device *dev) in ppc_is_vbus_source() argument
124 const struct usbc_ppc_driver_api *api = (const struct usbc_ppc_driver_api *)dev->api; in ppc_is_vbus_source()
130 return api->is_vbus_source(dev); in ppc_is_vbus_source()
142 static inline int ppc_is_vbus_sink(const struct device *dev) in ppc_is_vbus_sink() argument
144 const struct usbc_ppc_driver_api *api = (const struct usbc_ppc_driver_api *)dev->api; in ppc_is_vbus_sink()
150 return api->is_vbus_sink(dev); in ppc_is_vbus_sink()
162 static inline int ppc_set_snk_ctrl(const struct device *dev, bool enable) in ppc_set_snk_ctrl() argument
164 const struct usbc_ppc_driver_api *api = (const struct usbc_ppc_driver_api *)dev->api; in ppc_set_snk_ctrl()
170 return api->set_snk_ctrl(dev, enable); in ppc_set_snk_ctrl()
182 static inline int ppc_set_src_ctrl(const struct device *dev, bool enable) in ppc_set_src_ctrl() argument
184 const struct usbc_ppc_driver_api *api = (const struct usbc_ppc_driver_api *)dev->api; in ppc_set_src_ctrl()
190 return api->set_src_ctrl(dev, enable); in ppc_set_src_ctrl()
202 static inline int ppc_set_vbus_discharge(const struct device *dev, bool enable) in ppc_set_vbus_discharge() argument
204 const struct usbc_ppc_driver_api *api = (const struct usbc_ppc_driver_api *)dev->api; in ppc_set_vbus_discharge()
210 return api->set_vbus_discharge(dev, enable); in ppc_set_vbus_discharge()
222 static inline int ppc_is_vbus_present(const struct device *dev) in ppc_is_vbus_present() argument
224 const struct usbc_ppc_driver_api *api = (const struct usbc_ppc_driver_api *)dev->api; in ppc_is_vbus_present()
230 return api->is_vbus_present(dev); in ppc_is_vbus_present()
242 static inline int ppc_set_event_handler(const struct device *dev, in ppc_set_event_handler() argument
245 const struct usbc_ppc_driver_api *api = (const struct usbc_ppc_driver_api *)dev->api; in ppc_set_event_handler()
251 return api->set_event_handler(dev, handler, data); in ppc_set_event_handler()
262 static inline int ppc_dump_regs(const struct device *dev) in ppc_dump_regs() argument
264 const struct usbc_ppc_driver_api *api = (const struct usbc_ppc_driver_api *)dev->api; in ppc_dump_regs()
270 return api->dump_regs(dev); in ppc_dump_regs()