forked from luck/tmp_suning_uos_patched
power_supply: Add types for USB chargers
This adds power supply types for USB chargers defined in Battery Charging Specification 1.1. Signed-off-by: Heikki Krogerus <ext-heikki.krogerus@nokia.com> Signed-off-by: Anton Vorontsov <cbouatmailru@gmail.com>
This commit is contained in:
parent
353f867b55
commit
85efc8a18c
@ -42,7 +42,8 @@ static ssize_t power_supply_show_property(struct device *dev,
|
||||
struct device_attribute *attr,
|
||||
char *buf) {
|
||||
static char *type_text[] = {
|
||||
"Battery", "UPS", "Mains", "USB"
|
||||
"Battery", "UPS", "Mains", "USB",
|
||||
"USB_DCP", "USB_CDP", "USB_ACA"
|
||||
};
|
||||
static char *status_text[] = {
|
||||
"Unknown", "Charging", "Discharging", "Not charging", "Full"
|
||||
|
@ -125,7 +125,10 @@ enum power_supply_type {
|
||||
POWER_SUPPLY_TYPE_BATTERY = 0,
|
||||
POWER_SUPPLY_TYPE_UPS,
|
||||
POWER_SUPPLY_TYPE_MAINS,
|
||||
POWER_SUPPLY_TYPE_USB,
|
||||
POWER_SUPPLY_TYPE_USB, /* Standard Downstream Port */
|
||||
POWER_SUPPLY_TYPE_USB_DCP, /* Dedicated Charging Port */
|
||||
POWER_SUPPLY_TYPE_USB_CDP, /* Charging Downstream Port */
|
||||
POWER_SUPPLY_TYPE_USB_ACA, /* Accessory Charger Adapters */
|
||||
};
|
||||
|
||||
union power_supply_propval {
|
||||
|
Loading…
Reference in New Issue
Block a user