Skip to content

Commit 0c37f44

Browse files
klausenbuskandy-shev
authored andcommitted
platform/x86: asus-wmi: Rename CHARGE_THRESHOLD to RSOC
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 <[email protected]> Signed-off-by: Andy Shevchenko <[email protected]>
1 parent 7c28503 commit 0c37f44

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

drivers/platform/x86/asus-wmi.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2067,7 +2067,7 @@ static ssize_t charge_threshold_store(struct device *dev,
20672067
if (value < 0 || value > 100)
20682068
return -EINVAL;
20692069

2070-
ret = asus_wmi_set_devstate(ASUS_WMI_CHARGE_THRESHOLD, value, &rv);
2070+
ret = asus_wmi_set_devstate(ASUS_WMI_DEVID_RSOC, value, &rv);
20712071
if (ret)
20722072
return ret;
20732073

@@ -2124,7 +2124,7 @@ static umode_t asus_sysfs_is_visible(struct kobject *kobj,
21242124
else if (attr == &dev_attr_fan_boost_mode.attr)
21252125
ok = asus->fan_boost_mode_available;
21262126
else if (attr == &dev_attr_charge_threshold.attr)
2127-
devid = ASUS_WMI_CHARGE_THRESHOLD;
2127+
devid = ASUS_WMI_DEVID_RSOC;
21282128

21292129
if (devid != -1)
21302130
ok = !(asus_wmi_get_devstate_simple(asus, devid) < 0);
@@ -2455,7 +2455,7 @@ static int asus_wmi_add(struct platform_device *pdev)
24552455
* and we can't get the current threshold so let set it to 100% on
24562456
* module load.
24572457
*/
2458-
asus_wmi_set_devstate(ASUS_WMI_CHARGE_THRESHOLD, 100, NULL);
2458+
asus_wmi_set_devstate(ASUS_WMI_DEVID_RSOC, 100, NULL);
24592459
asus->charge_threshold = 100;
24602460

24612461
return 0;

include/linux/platform_data/x86/asus-wmi.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@
8282
#define ASUS_WMI_DEVID_LID_RESUME 0x00120031
8383

8484
/* Maximum charging percentage */
85-
#define ASUS_WMI_CHARGE_THRESHOLD 0x00120057
85+
#define ASUS_WMI_DEVID_RSOC 0x00120057
8686

8787
/* DSTS masks */
8888
#define ASUS_WMI_DSTS_STATUS_BIT 0x00000001

0 commit comments

Comments
 (0)