platform/x86: asus-wmi: Rename CHARGE_THRESHOLD to RSOC
authorKristian Klausen <kristian@klausen.dk>
Mon, 9 Sep 2019 17:31:27 +0000 (19:31 +0200)
committerAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Mon, 9 Sep 2019 18:19:22 +0000 (21:19 +0300)
The device is officially called "Relative state of charge" (RSOC).
At the same time add the missing DEVID from the name.

Signed-off-by: Kristian Klausen <kristian@klausen.dk>
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
drivers/platform/x86/asus-wmi.c
include/linux/platform_data/x86/asus-wmi.h

index 848b23764fc315d50c5887d8832a9aa7f7be474c..92c149dc2e6e8b99ebbe85d5b8c3fcf5fcbcaf0e 100644 (file)
@@ -2067,7 +2067,7 @@ static ssize_t charge_threshold_store(struct device *dev,
        if (value < 0 || value > 100)
                return -EINVAL;
 
-       ret = asus_wmi_set_devstate(ASUS_WMI_CHARGE_THRESHOLD, value, &rv);
+       ret = asus_wmi_set_devstate(ASUS_WMI_DEVID_RSOC, value, &rv);
        if (ret)
                return ret;
 
@@ -2124,7 +2124,7 @@ static umode_t asus_sysfs_is_visible(struct kobject *kobj,
        else if (attr == &dev_attr_fan_boost_mode.attr)
                ok = asus->fan_boost_mode_available;
        else if (attr == &dev_attr_charge_threshold.attr)
-               devid = ASUS_WMI_CHARGE_THRESHOLD;
+               devid = ASUS_WMI_DEVID_RSOC;
 
        if (devid != -1)
                ok = !(asus_wmi_get_devstate_simple(asus, devid) < 0);
@@ -2455,7 +2455,7 @@ static int asus_wmi_add(struct platform_device *pdev)
         * and we can't get the current threshold so let set it to 100% on
         * module load.
         */
-       asus_wmi_set_devstate(ASUS_WMI_CHARGE_THRESHOLD, 100, NULL);
+       asus_wmi_set_devstate(ASUS_WMI_DEVID_RSOC, 100, NULL);
        asus->charge_threshold = 100;
 
        return 0;
index 21f0426c827207fa5bf78f150b77ef1217fe8616..60249e22e8441994d7b8f89c6d84ebc5e71994c7 100644 (file)
@@ -82,7 +82,7 @@
 #define ASUS_WMI_DEVID_LID_RESUME      0x00120031
 
 /* Maximum charging percentage */
-#define ASUS_WMI_CHARGE_THRESHOLD      0x00120057
+#define ASUS_WMI_DEVID_RSOC            0x00120057
 
 /* DSTS masks */
 #define ASUS_WMI_DSTS_STATUS_BIT       0x00000001