mirror of
git://git.kernel.org/pub/scm/linux/kernel/git/xiang/erofs.git
synced 2026-10-30 22:03:17 +01:00
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 <[email protected]> Signed-off-by: Anton Vorontsov <[email protected]>
This commit is contained in:
1 parent
353f867b55
commit
85efc8a18c
2 files changed
+6
-2
No files matched your search
@@ -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 {
|
||||
|
||||
Reference in new issue
Block a user