#include <linux/slab.h>
#include <linux/usb/pd.h>
#include "pd.h"
static DEFINE_IDA(pd_ida);
static struct class pd_class = …;
#define to_pdo(o) …
struct pdo { … };
static void pdo_release(struct device *dev)
{ … }
static ssize_t
dual_role_power_show(struct device *dev, struct device_attribute *attr, char *buf)
{ … }
static DEVICE_ATTR_RO(dual_role_power);
static ssize_t
usb_suspend_supported_show(struct device *dev, struct device_attribute *attr, char *buf)
{ … }
static DEVICE_ATTR_RO(usb_suspend_supported);
static ssize_t
higher_capability_show(struct device *dev, struct device_attribute *attr, char *buf)
{ … }
static DEVICE_ATTR_RO(higher_capability);
static ssize_t
unconstrained_power_show(struct device *dev, struct device_attribute *attr, char *buf)
{ … }
static DEVICE_ATTR_RO(unconstrained_power);
static ssize_t
usb_communication_capable_show(struct device *dev, struct device_attribute *attr, char *buf)
{ … }
static DEVICE_ATTR_RO(usb_communication_capable);
static ssize_t
dual_role_data_show(struct device *dev, struct device_attribute *attr, char *buf)
{ … }
static DEVICE_ATTR_RO(dual_role_data);
static ssize_t
unchunked_extended_messages_supported_show(struct device *dev,
struct device_attribute *attr, char *buf)
{ … }
static DEVICE_ATTR_RO(unchunked_extended_messages_supported);
static ssize_t
peak_current_show(struct device *dev, struct device_attribute *attr, char *buf)
{ … }
static DEVICE_ATTR_RO(peak_current);
static ssize_t
fast_role_swap_current_show(struct device *dev, struct device_attribute *attr, char *buf)
{ … }
static DEVICE_ATTR_RO(fast_role_swap_current);
static ssize_t voltage_show(struct device *dev, struct device_attribute *attr, char *buf)
{ … }
static DEVICE_ATTR_RO(voltage);
static ssize_t current_show(struct device *dev, struct device_attribute *attr, char *buf)
{ … }
static struct device_attribute maximum_current_attr = …;
static struct device_attribute operational_current_attr = …;
static struct attribute *source_fixed_supply_attrs[] = …;
static umode_t fixed_attr_is_visible(struct kobject *kobj, struct attribute *attr, int n)
{ … }
static const struct attribute_group source_fixed_supply_group = …;
__ATTRIBUTE_GROUPS(…);
static const struct device_type source_fixed_supply_type = …;
static struct attribute *sink_fixed_supply_attrs[] = …;
static const struct attribute_group sink_fixed_supply_group = …;
__ATTRIBUTE_GROUPS(…);
static const struct device_type sink_fixed_supply_type = …;
static ssize_t
maximum_voltage_show(struct device *dev, struct device_attribute *attr, char *buf)
{ … }
static DEVICE_ATTR_RO(maximum_voltage);
static ssize_t
minimum_voltage_show(struct device *dev, struct device_attribute *attr, char *buf)
{ … }
static DEVICE_ATTR_RO(minimum_voltage);
static struct attribute *source_variable_supply_attrs[] = …;
ATTRIBUTE_GROUPS(…);
static const struct device_type source_variable_supply_type = …;
static struct attribute *sink_variable_supply_attrs[] = …;
ATTRIBUTE_GROUPS(…);
static const struct device_type sink_variable_supply_type = …;
static ssize_t
maximum_power_show(struct device *dev, struct device_attribute *attr, char *buf)
{ … }
static DEVICE_ATTR_RO(maximum_power);
static ssize_t
operational_power_show(struct device *dev, struct device_attribute *attr, char *buf)
{ … }
static DEVICE_ATTR_RO(operational_power);
static struct attribute *source_battery_attrs[] = …;
ATTRIBUTE_GROUPS(…);
static const struct device_type source_battery_type = …;
static struct attribute *sink_battery_attrs[] = …;
ATTRIBUTE_GROUPS(…);
static const struct device_type sink_battery_type = …;
static ssize_t
pps_power_limited_show(struct device *dev, struct device_attribute *attr, char *buf)
{ … }
static DEVICE_ATTR_RO(pps_power_limited);
static ssize_t
pps_max_voltage_show(struct device *dev, struct device_attribute *attr, char *buf)
{ … }
static ssize_t
pps_min_voltage_show(struct device *dev, struct device_attribute *attr, char *buf)
{ … }
static ssize_t
pps_max_current_show(struct device *dev, struct device_attribute *attr, char *buf)
{ … }
static struct device_attribute pps_max_voltage_attr = …;
static struct device_attribute pps_min_voltage_attr = …;
static struct device_attribute pps_max_current_attr = …;
static struct attribute *source_pps_attrs[] = …;
ATTRIBUTE_GROUPS(…);
static const struct device_type source_pps_type = …;
static struct attribute *sink_pps_attrs[] = …;
ATTRIBUTE_GROUPS(…);
static const struct device_type sink_pps_type = …;
static const char * const supply_name[] = …;
static const char * const apdo_supply_name[] = …;
static const struct device_type *source_type[] = …;
static const struct device_type *source_apdo_type[] = …;
static const struct device_type *sink_type[] = …;
static const struct device_type *sink_apdo_type[] = …;
static int add_pdo(struct usb_power_delivery_capabilities *cap, u32 pdo, int position)
{ … }
static int remove_pdo(struct device *dev, void *data)
{ … }
static const char * const cap_name[] = …;
static void pd_capabilities_release(struct device *dev)
{ … }
static const struct device_type pd_capabilities_type = …;
struct usb_power_delivery_capabilities *
usb_power_delivery_register_capabilities(struct usb_power_delivery *pd,
struct usb_power_delivery_capabilities_desc *desc)
{ … }
EXPORT_SYMBOL_GPL(…);
void usb_power_delivery_unregister_capabilities(struct usb_power_delivery_capabilities *cap)
{ … }
EXPORT_SYMBOL_GPL(…);
static ssize_t revision_show(struct device *dev, struct device_attribute *attr, char *buf)
{ … }
static DEVICE_ATTR_RO(revision);
static ssize_t version_show(struct device *dev, struct device_attribute *attr, char *buf)
{ … }
static DEVICE_ATTR_RO(version);
static struct attribute *pd_attrs[] = …;
static umode_t pd_attr_is_visible(struct kobject *kobj, struct attribute *attr, int n)
{ … }
static const struct attribute_group pd_group = …;
__ATTRIBUTE_GROUPS(…);
static void pd_release(struct device *dev)
{ … }
static const struct device_type pd_type = …;
struct usb_power_delivery *usb_power_delivery_find(const char *name)
{ … }
struct usb_power_delivery *
usb_power_delivery_register(struct device *parent, struct usb_power_delivery_desc *desc)
{ … }
EXPORT_SYMBOL_GPL(…);
void usb_power_delivery_unregister(struct usb_power_delivery *pd)
{ … }
EXPORT_SYMBOL_GPL(…);
int usb_power_delivery_link_device(struct usb_power_delivery *pd, struct device *dev)
{ … }
EXPORT_SYMBOL_GPL(…);
void usb_power_delivery_unlink_device(struct usb_power_delivery *pd, struct device *dev)
{ … }
EXPORT_SYMBOL_GPL(…);
int __init usb_power_delivery_init(void)
{ … }
void __exit usb_power_delivery_exit(void)
{ … }