From dc02054064e50b34c724e3bb546d1dc2513f3fca Mon Sep 17 00:00:00 2001 From: Ricardo Cerqueira Date: Thu, 19 Sep 2013 18:35:39 +0100 Subject: Revert "max77693: Standardize the output of the "online" property" This reverts commit 1a05356029493b29f866cf04f7550243ef3ae687, the enumerator breakage introduced by change Iafbd9fb45253b02d539ac0ba114f57b3bf9eeed4 can be reverted cleanly without further impact and it's a cleaner fix Change-Id: I351c320f98691241fbe321a0b1ac54152802deb4 --- arch/arm/configs/cyanogenmod_i9300_defconfig | 2 +- drivers/battery/max77693_charger.c | 4 ---- drivers/power/power_supply_sysfs.c | 2 +- include/linux/power_supply.h | 3 +-- 4 files changed, 3 insertions(+), 8 deletions(-) diff --git a/arch/arm/configs/cyanogenmod_i9300_defconfig b/arch/arm/configs/cyanogenmod_i9300_defconfig index 6dd11f6eeb2..9b139c9e702 100644 --- a/arch/arm/configs/cyanogenmod_i9300_defconfig +++ b/arch/arm/configs/cyanogenmod_i9300_defconfig @@ -2449,7 +2449,7 @@ CONFIG_USB_ARCH_HAS_OHCI=y CONFIG_USB_ARCH_HAS_EHCI=y CONFIG_USB_ARCH_HAS_XHCI=y CONFIG_USB=y -CONFIG_USB_DEBUG=y +# CONFIG_USB_DEBUG is not set CONFIG_USB_ANNOUNCE_NEW_DEVICES=y # diff --git a/drivers/battery/max77693_charger.c b/drivers/battery/max77693_charger.c index 98fc901e331..35289a671e7 100644 --- a/drivers/battery/max77693_charger.c +++ b/drivers/battery/max77693_charger.c @@ -1376,10 +1376,6 @@ static int max77693_charger_get_property(struct power_supply *psy, val->intval = max77693_get_online_type(chg_data); #else val->intval = max77693_get_cable_type(chg_data); - if (val->intval == POWER_SUPPLY_TYPE_BATTERY) { - /* Userspace expects 0 for no-supply */ - val->intval = 0; - } #endif break; case POWER_SUPPLY_PROP_CURRENT_MAX: diff --git a/drivers/power/power_supply_sysfs.c b/drivers/power/power_supply_sysfs.c index a647e74e702..a5235aba2c1 100644 --- a/drivers/power/power_supply_sysfs.c +++ b/drivers/power/power_supply_sysfs.c @@ -42,7 +42,7 @@ static ssize_t power_supply_show_property(struct device *dev, struct device_attribute *attr, char *buf) { static char *type_text[] = { - "Unknown", "Battery", "UPS", "Mains", "USB", + "Battery", "UPS", "Mains", "USB", "USB_DCP", "USB_CDP", "USB_ACA", "DOCK", "MISC", "WIRELESS", "OTG" }; diff --git a/include/linux/power_supply.h b/include/linux/power_supply.h index 566002ba94a..529d9817e45 100644 --- a/include/linux/power_supply.h +++ b/include/linux/power_supply.h @@ -129,8 +129,7 @@ enum power_supply_property { }; enum power_supply_type { - POWER_SUPPLY_TYPE_UNKNOWN = 0, - POWER_SUPPLY_TYPE_BATTERY, + POWER_SUPPLY_TYPE_BATTERY = 0, POWER_SUPPLY_TYPE_UPS, POWER_SUPPLY_TYPE_MAINS, POWER_SUPPLY_TYPE_USB, /* Standard Downstream Port */ -- cgit v1.2.3