From 85efc8a18cedf70e55acd0c825e2d9d2f3b19999 Mon Sep 17 00:00:00 2001 From: Heikki Krogerus Date: Mon, 4 Oct 2010 10:51:37 +0300 Subject: 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 Signed-off-by: Anton Vorontsov --- include/linux/power_supply.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'include') diff --git a/include/linux/power_supply.h b/include/linux/power_supply.h index 30083a896f36..d37fef67ece2 100644 --- a/include/linux/power_supply.h +++ b/include/linux/power_supply.h @@ -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 { -- cgit v1.2.1 From fe3f6d097a042cff54bc1dc06f21ef528affe8ca Mon Sep 17 00:00:00 2001 From: Heikki Krogerus Date: Mon, 4 Oct 2010 10:51:38 +0300 Subject: power_supply: Introduce maximum current property USB only gives the maximum current allowed to draw. Signed-off-by: Heikki Krogerus Signed-off-by: Anton Vorontsov --- include/linux/power_supply.h | 1 + 1 file changed, 1 insertion(+) (limited to 'include') diff --git a/include/linux/power_supply.h b/include/linux/power_supply.h index d37fef67ece2..7d7325685c42 100644 --- a/include/linux/power_supply.h +++ b/include/linux/power_supply.h @@ -89,6 +89,7 @@ enum power_supply_property { POWER_SUPPLY_PROP_VOLTAGE_MIN_DESIGN, POWER_SUPPLY_PROP_VOLTAGE_NOW, POWER_SUPPLY_PROP_VOLTAGE_AVG, + POWER_SUPPLY_PROP_CURRENT_MAX, POWER_SUPPLY_PROP_CURRENT_NOW, POWER_SUPPLY_PROP_CURRENT_AVG, POWER_SUPPLY_PROP_POWER_NOW, -- cgit v1.2.1