Back to home page

OSCL-LXR

 
 

    


0001 /* SPDX-License-Identifier: GPL-2.0 */
0002 
0003 #ifndef __USB_POWER_DELIVERY__
0004 #define __USB_POWER_DELIVERY__
0005 
0006 #include <linux/device.h>
0007 #include <linux/usb/typec.h>
0008 
0009 struct usb_power_delivery {
0010     struct device dev;
0011     int id;
0012     u16 revision;
0013     u16 version;
0014 };
0015 
0016 struct usb_power_delivery_capabilities {
0017     struct device dev;
0018     struct usb_power_delivery *pd;
0019     enum typec_role role;
0020 };
0021 
0022 #define to_usb_power_delivery_capabilities(o) container_of(o, struct usb_power_delivery_capabilities, dev)
0023 #define to_usb_power_delivery(o) container_of(o, struct usb_power_delivery, dev)
0024 
0025 struct usb_power_delivery *usb_power_delivery_find(const char *name);
0026 
0027 int usb_power_delivery_init(void);
0028 void usb_power_delivery_exit(void);
0029 
0030 #endif /* __USB_POWER_DELIVERY__ */