[9610] include: Add defines for s2mu00x series
authorKeunho Hwang <keunho.hwang@samsung.com>
Fri, 11 May 2018 01:31:38 +0000 (10:31 +0900)
committerJaehyoung Choi <jkkkkk.choi@samsung.com>
Fri, 11 May 2018 07:38:25 +0000 (16:38 +0900)
Change-Id: I977fa4e570688fd383cd5892e99a954d2cd3cca1
Signed-off-by: Keunho Hwang <keunho.hwang@samsung.com>
drivers/power/supply/power_supply_sysfs.c
include/linux/power_supply.h

index da589c3decb28348d47b1dc15cbd710ae80f0cad..0d649ff89547ff2cde6285c8b5334f11e55037ef 100644 (file)
@@ -43,7 +43,8 @@ static struct device_attribute power_supply_attrs[];
 static const char * const power_supply_type_text[] = {
        "Unknown", "Battery", "UPS", "Mains", "USB",
        "USB_DCP", "USB_CDP", "USB_ACA", "USB_C",
-       "USB_PD", "USB_PD_DRP", "BrickID"
+       "USB_PD", "USB_PD_DRP", "BrickID", "OTG", "HV_Mains",
+       "Prepare_TA", "SMART_NOTG", "END"
 };
 
 static const char * const power_supply_status_text[] = {
@@ -57,7 +58,7 @@ static const char * const power_supply_charge_type_text[] = {
 static const char * const power_supply_health_text[] = {
        "Unknown", "Good", "Overheat", "Dead", "Over voltage",
        "Unspecified failure", "Cold", "Watchdog timer expire",
-       "Safety timer expire"
+       "Safety timer expire", "Under voltage"
 };
 
 static const char * const power_supply_technology_text[] = {
@@ -191,6 +192,7 @@ static struct device_attribute power_supply_attrs[] = {
        POWER_SUPPLY_ATTR(present),
        POWER_SUPPLY_ATTR(online),
        POWER_SUPPLY_ATTR(authentic),
+       POWER_SUPPLY_ATTR(charging_enabled),
        POWER_SUPPLY_ATTR(technology),
        POWER_SUPPLY_ATTR(cycle_count),
        POWER_SUPPLY_ATTR(voltage_max),
@@ -201,9 +203,11 @@ static struct device_attribute power_supply_attrs[] = {
        POWER_SUPPLY_ATTR(voltage_avg),
        POWER_SUPPLY_ATTR(voltage_ocv),
        POWER_SUPPLY_ATTR(voltage_boot),
+       POWER_SUPPLY_ATTR(input_voltage_regulation),
        POWER_SUPPLY_ATTR(current_max),
        POWER_SUPPLY_ATTR(current_now),
        POWER_SUPPLY_ATTR(current_avg),
+       POWER_SUPPLY_ATTR(current_full),
        POWER_SUPPLY_ATTR(current_boot),
        POWER_SUPPLY_ATTR(power_now),
        POWER_SUPPLY_ATTR(power_avg),
@@ -214,6 +218,8 @@ static struct device_attribute power_supply_attrs[] = {
        POWER_SUPPLY_ATTR(charge_now),
        POWER_SUPPLY_ATTR(charge_avg),
        POWER_SUPPLY_ATTR(charge_counter),
+       POWER_SUPPLY_ATTR(charge_otg_control),
+       POWER_SUPPLY_ATTR(charge_powered_otg_control),
        POWER_SUPPLY_ATTR(constant_charge_current),
        POWER_SUPPLY_ATTR(constant_charge_current_max),
        POWER_SUPPLY_ATTR(constant_charge_voltage),
@@ -252,6 +258,7 @@ static struct device_attribute power_supply_attrs[] = {
        POWER_SUPPLY_ATTR(usb_hc),
        POWER_SUPPLY_ATTR(usb_otg),
        POWER_SUPPLY_ATTR(charge_enabled),
+       POWER_SUPPLY_ATTR(fuelgauge_reset),
        /* Local extensions of type int64_t */
        POWER_SUPPLY_ATTR(charge_counter_ext),
        /* Properties of type `const char *' */
index e2706432f1c61cdacf7a6e6f9fdd5c89339b8118..5f4377fcb98f23b7b20614b333155f8fd9f0061c 100644 (file)
@@ -58,6 +58,7 @@ enum {
        POWER_SUPPLY_HEALTH_COLD,
        POWER_SUPPLY_HEALTH_WATCHDOG_TIMER_EXPIRE,
        POWER_SUPPLY_HEALTH_SAFETY_TIMER_EXPIRE,
+       POWER_SUPPLY_HEALTH_UNDERVOLTAGE,
 };
 
 enum {
@@ -93,6 +94,7 @@ enum power_supply_property {
        POWER_SUPPLY_PROP_PRESENT,
        POWER_SUPPLY_PROP_ONLINE,
        POWER_SUPPLY_PROP_AUTHENTIC,
+       POWER_SUPPLY_PROP_CHARGING_ENABLED,
        POWER_SUPPLY_PROP_TECHNOLOGY,
        POWER_SUPPLY_PROP_CYCLE_COUNT,
        POWER_SUPPLY_PROP_VOLTAGE_MAX,
@@ -103,9 +105,11 @@ enum power_supply_property {
        POWER_SUPPLY_PROP_VOLTAGE_AVG,
        POWER_SUPPLY_PROP_VOLTAGE_OCV,
        POWER_SUPPLY_PROP_VOLTAGE_BOOT,
+       POWER_SUPPLY_PROP_INPUT_VOLTAGE_REGULATION,
        POWER_SUPPLY_PROP_CURRENT_MAX,
        POWER_SUPPLY_PROP_CURRENT_NOW,
        POWER_SUPPLY_PROP_CURRENT_AVG,
+       POWER_SUPPLY_PROP_CURRENT_FULL,
        POWER_SUPPLY_PROP_CURRENT_BOOT,
        POWER_SUPPLY_PROP_POWER_NOW,
        POWER_SUPPLY_PROP_POWER_AVG,
@@ -116,6 +120,8 @@ enum power_supply_property {
        POWER_SUPPLY_PROP_CHARGE_NOW,
        POWER_SUPPLY_PROP_CHARGE_AVG,
        POWER_SUPPLY_PROP_CHARGE_COUNTER,
+       POWER_SUPPLY_PROP_CHARGE_OTG_CONTROL,
+       POWER_SUPPLY_PROP_CHARGE_POWERED_OTG_CONTROL,
        POWER_SUPPLY_PROP_CONSTANT_CHARGE_CURRENT,
        POWER_SUPPLY_PROP_CONSTANT_CHARGE_CURRENT_MAX,
        POWER_SUPPLY_PROP_CONSTANT_CHARGE_VOLTAGE,
@@ -154,6 +160,7 @@ enum power_supply_property {
        POWER_SUPPLY_PROP_USB_HC,
        POWER_SUPPLY_PROP_USB_OTG,
        POWER_SUPPLY_PROP_CHARGE_ENABLED,
+       POWER_SUPPLY_PROP_FUELGAUGE_RESET,
        /* Local extensions of type int64_t */
        POWER_SUPPLY_PROP_CHARGE_COUNTER_EXT,
        /* Properties of type `const char *' */
@@ -175,6 +182,11 @@ enum power_supply_type {
        POWER_SUPPLY_TYPE_USB_PD,               /* Power Delivery Port */
        POWER_SUPPLY_TYPE_USB_PD_DRP,           /* PD Dual Role Port */
        POWER_SUPPLY_TYPE_APPLE_BRICK_ID,       /* Apple Charging Method */
+       POWER_SUPPLY_TYPE_OTG,
+       POWER_SUPPLY_TYPE_HV_MAINS,
+       POWER_SUPPLY_TYPE_PREPARE_TA,
+       POWER_SUPPLY_TYPE_SMART_NOTG,
+       POWER_SUPPLY_TYPE_END,
 };
 
 enum power_supply_notifier_events {