History

Merge branch 'fixes' into for-next

Resolve conflicts in dell/alienware-wmi-wmax and asus-wmi, and enable applying a few amd/hsmp patches that depend on changes in the fixes branch.

Ilpo Järvinen committed 1 year ago

Commit 593ee932 parents f94ffc3 bfcfe6d25 files · +366 −113Browse files

Unified · Split

25 files
  1. Documentation/wmi/devices/msi-wmi-platform.rst +4 −0
  2. drivers/platform/mellanox/mlxbf-bootctl.c +2 −2
  3. drivers/platform/x86/amd/hsmp/acpi.c +1 −2
  4. drivers/platform/x86/amd/hsmp/hsmp.h +1 −0
  5. drivers/platform/x86/amd/hsmp/plat.c +5 −1
  6. drivers/platform/x86/amd/pmc/pmc-quirks.c +7 −0
  7. drivers/platform/x86/amd/pmc/pmc.c +3 −4
  8. drivers/platform/x86/amd/pmf/auto-mode.c +2 −2
  9. drivers/platform/x86/amd/pmf/cnqf.c +4 −4
  10. drivers/platform/x86/amd/pmf/core.c +14 −0
  11. drivers/platform/x86/amd/pmf/pmf.h +1 −0
  12. drivers/platform/x86/amd/pmf/sps.c +8 −4
  13. drivers/platform/x86/amd/pmf/tee-if.c +26 −3
  14. drivers/platform/x86/asus-laptop.c +6 −3
  15. drivers/platform/x86/asus-wmi.c +12 −2
  16. drivers/platform/x86/dell/alienware-wmi-wmax.c +58 −2
  17. drivers/platform/x86/ideapad-laptop.c +16 −0
  18. drivers/platform/x86/intel/hid.c +11 −10
  19. drivers/platform/x86/intel/uncore-frequency/uncore-frequency.c +9 −4
  20. drivers/platform/x86/msi-wmi-platform.c +63 −36
  21. drivers/platform/x86/thinkpad_acpi.c +2 −0
  22. drivers/platform/x86/x86-android-tablets/dmi.c +13 −1
  23. drivers/platform/x86/x86-android-tablets/other.c +92 −32
  24. drivers/platform/x86/x86-android-tablets/x86-android-tablets.h +2 −1
  25. include/linux/platform_data/x86/intel_pmc_ipc.h +4 −0
Documentation/wmi/devices/msi-wmi-platform.rst+4−0
@@ -138,6 +138,10 @@ input data, the meaning of which depends on the subfeature being accessed. · 137 unmodified lines
138138 The output buffer contains a single byte which signals success or failure (``0x00`` on failure)
139139 and 31 bytes of output data, the meaning if which depends on the subfeature being accessed.
140140
141+.. note::
142+ The ACPI control method responsible for handling the WMI method calls is not thread-safe.
143+ This is a firmware bug that needs to be handled inside the driver itself.
144+
141145 WMI method Get_EC()
142146 -------------------
143147
drivers/platform/mellanox/mlxbf-bootctl.c+2−2
@@ -333,9 +333,9 @@ static ssize_t secure_boot_fuse_state_show(struct device *dev, · 332 unmodified lines
333333 else
334334 status = valid ? "Invalid" : "Free";
335335 }
336− buf_len += sysfs_emit(buf + buf_len, "%d:%s ", key, status);
336+ buf_len += sysfs_emit_at(buf, buf_len, "%d:%s ", key, status);
337337 }
338− buf_len += sysfs_emit(buf + buf_len, "\n");
338+ buf_len += sysfs_emit_at(buf, buf_len, "\n");
339339
340340 return buf_len;
341341 }
drivers/platform/x86/amd/hsmp/acpi.c+1−2
@@ -27,9 +27,8 @@ · 26 unmodified lines
2727
2828 #include "hsmp.h"
2929
30−#define DRIVER_NAME "amd_hsmp"
30+#define DRIVER_NAME "hsmp_acpi"
3131 #define DRIVER_VERSION "2.3"
32−#define ACPI_HSMP_DEVICE_HID "AMDI0097"
3332
3433 /* These are the strings specified in ACPI table */
3534 #define MSG_IDOFF_STR "MsgIdOffset"
drivers/platform/x86/amd/hsmp/hsmp.h+1−0
@@ -23,6 +23,7 @@ · 22 unmodified lines
2323
2424 #define HSMP_CDEV_NAME "hsmp_cdev"
2525 #define HSMP_DEVNODE_NAME "hsmp"
26+#define ACPI_HSMP_DEVICE_HID "AMDI0097"
2627
2728 struct hsmp_mbaddr_info {
2829 u32 base_addr;
drivers/platform/x86/amd/hsmp/plat.c+5−1
@@ -11,6 +11,7 @@ · 10 unmodified lines
1111
1212 #include <asm/amd_hsmp.h>
1313
14+#include <linux/acpi.h>
1415 #include <linux/build_bug.h>
1516 #include <linux/device.h>
1617 #include <linux/module.h>
@@ -266,7 +267,7 @@ static bool legacy_hsmp_support(void) · 249 unmodified lines
266267 }
267268 case 0x1A:
268269 switch (boot_cpu_data.x86_model) {
269− case 0x00 ... 0x1F:
270+ case 0x00 ... 0x0F:
270271 return true;
271272 default:
272273 return false;
@@ -288,6 +289,9 @@ static int __init hsmp_plt_init(void) · 15 unmodified lines
288289 return ret;
289290 }
290291
292+ if (acpi_dev_present(ACPI_HSMP_DEVICE_HID, NULL, -1))
293+ return -ENODEV;
294+
291295 hsmp_pdev = get_hsmp_pdev();
292296 if (!hsmp_pdev)
293297 return -ENOMEM;
drivers/platform/x86/amd/pmc/pmc-quirks.c+7−0
@@ -217,6 +217,13 @@ static const struct dmi_system_id fwbug_list[] = { · 216 unmodified lines
217217 DMI_MATCH(DMI_BIOS_VERSION, "03.05"),
218218 }
219219 },
220+ {
221+ .ident = "MECHREVO Wujie 14X (GX4HRXL)",
222+ .driver_data = &quirk_spurious_8042,
223+ .matches = {
224+ DMI_MATCH(DMI_BOARD_NAME, "WUJIE14-GX4HRXL"),
225+ }
226+ },
220227 {}
221228 };
222229
drivers/platform/x86/amd/pmc/pmc.c+3−4
@@ -644,10 +644,9 @@ static void amd_pmc_s2idle_check(void) · 643 unmodified lines
644644 struct smu_metrics table;
645645 int rc;
646646
647− /* CZN: Ensure that future s0i3 entry attempts at least 10ms passed */
648− if (pdev->cpu_id == AMD_CPU_ID_CZN && !get_metrics_table(pdev, &table) &&
649− table.s0i3_last_entry_status)
650− usleep_range(10000, 20000);
647+ /* Avoid triggering OVP */
648+ if (!get_metrics_table(pdev, &table) && table.s0i3_last_entry_status)
649+ msleep(2500);
651650
652651 /* Dump the IdleMask before we add to the STB */
653652 amd_pmc_idlemask_read(pdev, pdev->dev, NULL);
drivers/platform/x86/amd/pmf/auto-mode.c+2−2
@@ -120,9 +120,9 @@ static void amd_pmf_set_automode(struct amd_pmf_dev *dev, int idx, · 119 unmodified lines
120120 amd_pmf_send_cmd(dev, SET_SPPT_APU_ONLY, false, pwr_ctrl->sppt_apu_only, NULL);
121121 amd_pmf_send_cmd(dev, SET_STT_MIN_LIMIT, false, pwr_ctrl->stt_min, NULL);
122122 amd_pmf_send_cmd(dev, SET_STT_LIMIT_APU, false,
123− pwr_ctrl->stt_skin_temp[STT_TEMP_APU], NULL);
123+ fixp_q88_fromint(pwr_ctrl->stt_skin_temp[STT_TEMP_APU]), NULL);
124124 amd_pmf_send_cmd(dev, SET_STT_LIMIT_HS2, false,
125− pwr_ctrl->stt_skin_temp[STT_TEMP_HS2], NULL);
125+ fixp_q88_fromint(pwr_ctrl->stt_skin_temp[STT_TEMP_HS2]), NULL);
126126
127127 if (is_apmf_func_supported(dev, APMF_FUNC_SET_FAN_IDX))
128128 apmf_update_fan_idx(dev, config_store.mode_set[idx].fan_control.manual,
drivers/platform/x86/amd/pmf/cnqf.c+4−4
@@ -81,10 +81,10 @@ static int amd_pmf_set_cnqf(struct amd_pmf_dev *dev, int src, int idx, · 80 unmodified lines
8181 amd_pmf_send_cmd(dev, SET_SPPT, false, pc->sppt, NULL);
8282 amd_pmf_send_cmd(dev, SET_SPPT_APU_ONLY, false, pc->sppt_apu_only, NULL);
8383 amd_pmf_send_cmd(dev, SET_STT_MIN_LIMIT, false, pc->stt_min, NULL);
84− amd_pmf_send_cmd(dev, SET_STT_LIMIT_APU, false, pc->stt_skin_temp[STT_TEMP_APU],
85− NULL);
86− amd_pmf_send_cmd(dev, SET_STT_LIMIT_HS2, false, pc->stt_skin_temp[STT_TEMP_HS2],
87− NULL);
84+ amd_pmf_send_cmd(dev, SET_STT_LIMIT_APU, false,
85+ fixp_q88_fromint(pc->stt_skin_temp[STT_TEMP_APU]), NULL);
86+ amd_pmf_send_cmd(dev, SET_STT_LIMIT_HS2, false,
87+ fixp_q88_fromint(pc->stt_skin_temp[STT_TEMP_HS2]), NULL);
8888
8989 if (is_apmf_func_supported(dev, APMF_FUNC_SET_FAN_IDX))
9090 apmf_update_fan_idx(dev,
drivers/platform/x86/amd/pmf/core.c+14−0
@@ -176,6 +176,20 @@ static void __maybe_unused amd_pmf_dump_registers(struct amd_pmf_dev *dev) · 175 unmodified lines
176176 dev_dbg(dev->dev, "AMD_PMF_REGISTER_MESSAGE:%x\n", value);
177177 }
178178
179+/**
180+ * fixp_q88_fromint: Convert integer to Q8.8
181+ * @val: input value
182+ *
183+ * Converts an integer into binary fixed point format where 8 bits
184+ * are used for integer and 8 bits are used for the decimal.
185+ *
186+ * Return: unsigned integer converted to Q8.8 format
187+ */
188+u32 fixp_q88_fromint(u32 val)
189+{
190+ return val << 8;
191+}
192+
179193 int amd_pmf_send_cmd(struct amd_pmf_dev *dev, u8 message, bool get, u32 arg, u32 *data)
180194 {
181195 int rc;
drivers/platform/x86/amd/pmf/pmf.h+1−0
@@ -777,6 +777,7 @@ int apmf_install_handler(struct amd_pmf_dev *pmf_dev); · 776 unmodified lines
777777 int apmf_os_power_slider_update(struct amd_pmf_dev *dev, u8 flag);
778778 int amd_pmf_set_dram_addr(struct amd_pmf_dev *dev, bool alloc_buffer);
779779 int amd_pmf_notify_sbios_heartbeat_event_v2(struct amd_pmf_dev *dev, u8 flag);
780+u32 fixp_q88_fromint(u32 val);
780781
781782 /* SPS Layer */
782783 int amd_pmf_get_pprof_modes(struct amd_pmf_dev *pmf);
drivers/platform/x86/amd/pmf/sps.c+8−4
@@ -198,9 +198,11 @@ static void amd_pmf_update_slider_v2(struct amd_pmf_dev *dev, int idx) · 197 unmodified lines
198198 amd_pmf_send_cmd(dev, SET_STT_MIN_LIMIT, false,
199199 apts_config_store.val[idx].stt_min_limit, NULL);
200200 amd_pmf_send_cmd(dev, SET_STT_LIMIT_APU, false,
201− apts_config_store.val[idx].stt_skin_temp_limit_apu, NULL);
201+ fixp_q88_fromint(apts_config_store.val[idx].stt_skin_temp_limit_apu),
202+ NULL);
202203 amd_pmf_send_cmd(dev, SET_STT_LIMIT_HS2, false,
203− apts_config_store.val[idx].stt_skin_temp_limit_hs2, NULL);
204+ fixp_q88_fromint(apts_config_store.val[idx].stt_skin_temp_limit_hs2),
205+ NULL);
204206 }
205207
206208 void amd_pmf_update_slider(struct amd_pmf_dev *dev, bool op, int idx,
@@ -217,9 +219,11 @@ void amd_pmf_update_slider(struct amd_pmf_dev *dev, bool op, int idx, · 10 unmodified lines
217219 amd_pmf_send_cmd(dev, SET_STT_MIN_LIMIT, false,
218220 config_store.prop[src][idx].stt_min, NULL);
219221 amd_pmf_send_cmd(dev, SET_STT_LIMIT_APU, false,
220− config_store.prop[src][idx].stt_skin_temp[STT_TEMP_APU], NULL);
222+ fixp_q88_fromint(config_store.prop[src][idx].stt_skin_temp[STT_TEMP_APU]),
223+ NULL);
221224 amd_pmf_send_cmd(dev, SET_STT_LIMIT_HS2, false,
222− config_store.prop[src][idx].stt_skin_temp[STT_TEMP_HS2], NULL);
225+ fixp_q88_fromint(config_store.prop[src][idx].stt_skin_temp[STT_TEMP_HS2]),
226+ NULL);
223227 } else if (op == SLIDER_OP_GET) {
224228 amd_pmf_send_cmd(dev, GET_SPL, true, ARG_NONE, &table->prop[src][idx].spl);
225229 amd_pmf_send_cmd(dev, GET_FPPT, true, ARG_NONE, &table->prop[src][idx].fppt);
drivers/platform/x86/amd/pmf/tee-if.c+26−3
@@ -123,7 +123,8 @@ static void amd_pmf_apply_policies(struct amd_pmf_dev *dev, struct ta_pmf_enact_ · 122 unmodified lines
123123
124124 case PMF_POLICY_STT_SKINTEMP_APU:
125125 if (dev->prev_data->stt_skintemp_apu != val) {
126− amd_pmf_send_cmd(dev, SET_STT_LIMIT_APU, false, val, NULL);
126+ amd_pmf_send_cmd(dev, SET_STT_LIMIT_APU, false,
127+ fixp_q88_fromint(val), NULL);
127128 dev_dbg(dev->dev, "update STT_SKINTEMP_APU: %u\n", val);
128129 dev->prev_data->stt_skintemp_apu = val;
129130 }
@@ -131,7 +132,8 @@ static void amd_pmf_apply_policies(struct amd_pmf_dev *dev, struct ta_pmf_enact_ · 1 unmodified line
131132
132133 case PMF_POLICY_STT_SKINTEMP_HS2:
133134 if (dev->prev_data->stt_skintemp_hs2 != val) {
134− amd_pmf_send_cmd(dev, SET_STT_LIMIT_HS2, false, val, NULL);
135+ amd_pmf_send_cmd(dev, SET_STT_LIMIT_HS2, false,
136+ fixp_q88_fromint(val), NULL);
135137 dev_dbg(dev->dev, "update STT_SKINTEMP_HS2: %u\n", val);
136138 dev->prev_data->stt_skintemp_hs2 = val;
137139 }
@@ -332,6 +334,11 @@ static int amd_pmf_start_policy_engine(struct amd_pmf_dev *dev) · 194 unmodified lines
332334 return 0;
333335 }
334336
337+static inline bool amd_pmf_pb_valid(struct amd_pmf_dev *dev)
338+{
339+ return memchr_inv(dev->policy_buf, 0xff, dev->policy_sz);
340+}
341+
335342 #ifdef CONFIG_AMD_PMF_DEBUG
336343 static void amd_pmf_hex_dump_pb(struct amd_pmf_dev *dev)
337344 {
@@ -359,12 +366,22 @@ static ssize_t amd_pmf_get_pb_data(struct file *filp, const char __user *buf, · 21 unmodified lines
359366 dev->policy_buf = new_policy_buf;
360367 dev->policy_sz = length;
361368
369+ if (!amd_pmf_pb_valid(dev)) {
370+ ret = -EINVAL;
371+ goto cleanup;
372+ }
373+
362374 amd_pmf_hex_dump_pb(dev);
363375 ret = amd_pmf_start_policy_engine(dev);
364376 if (ret < 0)
365− return ret;
377+ goto cleanup;
366378
367379 return length;
380+
381+cleanup:
382+ kfree(dev->policy_buf);
383+ dev->policy_buf = NULL;
384+ return ret;
368385 }
369386
370387 static const struct file_operations pb_fops = {
@@ -526,6 +543,12 @@ int amd_pmf_init_smart_pc(struct amd_pmf_dev *dev) · 155 unmodified lines
526543
527544 memcpy_fromio(dev->policy_buf, dev->policy_base, dev->policy_sz);
528545
546+ if (!amd_pmf_pb_valid(dev)) {
547+ dev_info(dev->dev, "No Smart PC policy present\n");
548+ ret = -EINVAL;
549+ goto err_free_policy;
550+ }
551+
529552 amd_pmf_hex_dump_pb(dev);
530553
531554 dev->prev_data = kzalloc(sizeof(*dev->prev_data), GFP_KERNEL);
drivers/platform/x86/asus-laptop.c+6−3
@@ -426,11 +426,14 @@ static int asus_pega_lucid_set(struct asus_laptop *asus, int unit, bool enable) · 425 unmodified lines
426426
427427 static int pega_acc_axis(struct asus_laptop *asus, int curr, char *method)
428428 {
429+ unsigned long long val = (unsigned long long)curr;
430+ acpi_status status;
429431 int i, delta;
430− unsigned long long val;
431− for (i = 0; i < PEGA_ACC_RETRIES; i++) {
432− acpi_evaluate_integer(asus->handle, method, NULL, &val);
433432
433+ for (i = 0; i < PEGA_ACC_RETRIES; i++) {
434+ status = acpi_evaluate_integer(asus->handle, method, NULL, &val);
435+ if (ACPI_FAILURE(status))
436+ continue;
434437 /* The output is noisy. From reading the ASL
435438 * dissassembly, timeout errors are returned with 1's
436439 * in the high word, and the lack of locking around
drivers/platform/x86/asus-wmi.c+12−2
@@ -305,6 +305,7 @@ struct asus_wmi { · 304 unmodified lines
305305
306306 u32 kbd_rgb_dev;
307307 bool kbd_rgb_state_available;
308+ bool oobe_state_available;
308309
309310 u8 throttle_thermal_policy_mode;
310311 u32 throttle_thermal_policy_dev;
@@ -1868,7 +1869,7 @@ static int asus_wmi_led_init(struct asus_wmi *asus) · 1557 unmodified lines
18681869 goto error;
18691870 }
18701871
1871− if (asus_wmi_dev_is_present(asus, ASUS_WMI_DEVID_OOBE)) {
1872+ if (asus->oobe_state_available) {
18721873 /*
18731874 * Disable OOBE state, so that e.g. the keyboard backlight
18741875 * works.
@@ -4780,6 +4781,7 @@ static int asus_wmi_add(struct platform_device *pdev) · 2905 unmodified lines
47804781 asus->egpu_enable_available = asus_wmi_dev_is_present(asus, ASUS_WMI_DEVID_EGPU);
47814782 asus->dgpu_disable_available = asus_wmi_dev_is_present(asus, ASUS_WMI_DEVID_DGPU);
47824783 asus->kbd_rgb_state_available = asus_wmi_dev_is_present(asus, ASUS_WMI_DEVID_TUF_RGB_STATE);
4784+ asus->oobe_state_available = asus_wmi_dev_is_present(asus, ASUS_WMI_DEVID_OOBE);
47834785
47844786 if (asus_wmi_dev_is_present(asus, ASUS_WMI_DEVID_MINI_LED_MODE))
47854787 asus->mini_led_dev_id = ASUS_WMI_DEVID_MINI_LED_MODE;
@@ -4832,7 +4834,8 @@ static int asus_wmi_add(struct platform_device *pdev) · 46 unmodified lines
48324834 goto fail_leds;
48334835
48344836 asus_wmi_get_devstate(asus, ASUS_WMI_DEVID_WLAN, &result);
4835− if (result & (ASUS_WMI_DSTS_PRESENCE_BIT | ASUS_WMI_DSTS_USER_BIT))
4837+ if ((result & (ASUS_WMI_DSTS_PRESENCE_BIT | ASUS_WMI_DSTS_USER_BIT)) ==
4838+ (ASUS_WMI_DSTS_PRESENCE_BIT | ASUS_WMI_DSTS_USER_BIT))
48364839 asus->driver->wlan_ctrl_by_user = 1;
48374840
48384841 if (!(asus->driver->wlan_ctrl_by_user && ashs_present())) {
@@ -4997,6 +5000,13 @@ static int asus_hotk_restore(struct device *device) · 158 unmodified lines
49975000 }
49985001 if (!IS_ERR_OR_NULL(asus->kbd_led.dev))
49995002 kbd_led_update(asus);
5003+ if (asus->oobe_state_available) {
5004+ /*
5005+ * Disable OOBE state, so that e.g. the keyboard backlight
5006+ * works.
5007+ */
5008+ asus_wmi_set_devstate(ASUS_WMI_DEVID_OOBE, 1, NULL);
5009+ }
50005010
50015011 if (asus_wmi_has_fnlock_key(asus))
50025012 asus_wmi_fnlock_update(asus);
drivers/platform/x86/dell/alienware-wmi-wmax.c+58−2
@@ -89,12 +89,44 @@ static struct awcc_quirks generic_quirks = { · 88 unmodified lines
8989 static struct awcc_quirks empty_quirks;
9090
9191 static const struct dmi_system_id awcc_dmi_table[] __initconst = {
92+ {
93+ .ident = "Alienware Area-51m R2",
94+ .matches = {
95+ DMI_MATCH(DMI_SYS_VENDOR, "Alienware"),
96+ DMI_MATCH(DMI_PRODUCT_NAME, "Alienware Area-51m R2"),
97+ },
98+ .driver_data = &generic_quirks,
99+ },
100+ {
101+ .ident = "Alienware m15 R7",
102+ .matches = {
103+ DMI_MATCH(DMI_SYS_VENDOR, "Alienware"),
104+ DMI_MATCH(DMI_PRODUCT_NAME, "Alienware m15 R7"),
105+ },
106+ .driver_data = &generic_quirks,
107+ },
108+ {
109+ .ident = "Alienware m16 R1",
110+ .matches = {
111+ DMI_MATCH(DMI_SYS_VENDOR, "Alienware"),
112+ DMI_MATCH(DMI_PRODUCT_NAME, "Alienware m16 R1"),
113+ },
114+ .driver_data = &g_series_quirks,
115+ },
92116 {
93117 .ident = "Alienware m16 R1 AMD",
94118 .matches = {
95119 DMI_MATCH(DMI_SYS_VENDOR, "Alienware"),
96120 DMI_MATCH(DMI_PRODUCT_NAME, "Alienware m16 R1 AMD"),
97121 },
122+ .driver_data = &g_series_quirks,
123+ },
124+ {
125+ .ident = "Alienware m16 R2",
126+ .matches = {
127+ DMI_MATCH(DMI_SYS_VENDOR, "Alienware"),
128+ DMI_MATCH(DMI_PRODUCT_NAME, "Alienware m16 R2"),
129+ },
98130 .driver_data = &generic_quirks,
99131 },
100132 {
@@ -121,6 +153,14 @@ static const struct dmi_system_id awcc_dmi_table[] __initconst = { · 20 unmodified lines
121153 },
122154 .driver_data = &generic_quirks,
123155 },
156+ {
157+ .ident = "Alienware x15 R2",
158+ .matches = {
159+ DMI_MATCH(DMI_SYS_VENDOR, "Alienware"),
160+ DMI_MATCH(DMI_PRODUCT_NAME, "Alienware x15 R2"),
161+ },
162+ .driver_data = &generic_quirks,
163+ },
124164 {
125165 .ident = "Alienware x17 R2",
126166 .matches = {
@@ -153,6 +193,14 @@ static const struct dmi_system_id awcc_dmi_table[] __initconst = { · 26 unmodified lines
153193 },
154194 .driver_data = &g_series_quirks,
155195 },
196+ {
197+ .ident = "Dell Inc. G16 7630",
198+ .matches = {
199+ DMI_MATCH(DMI_SYS_VENDOR, "Dell Inc."),
200+ DMI_MATCH(DMI_PRODUCT_NAME, "Dell G16 7630"),
201+ },
202+ .driver_data = &g_series_quirks,
203+ },
156204 {
157205 .ident = "Dell Inc. G3 3500",
158206 .matches = {
@@ -177,6 +225,14 @@ static const struct dmi_system_id awcc_dmi_table[] __initconst = { · 18 unmodified lines
177225 },
178226 .driver_data = &g_series_quirks,
179227 },
228+ {
229+ .ident = "Dell Inc. G5 5505",
230+ .matches = {
231+ DMI_MATCH(DMI_SYS_VENDOR, "Dell Inc."),
232+ DMI_MATCH(DMI_PRODUCT_NAME, "G5 5505"),
233+ },
234+ .driver_data = &g_series_quirks,
235+ },
180236 };
181237
182238 enum AWCC_GET_FAN_SENSORS_OPERATIONS {
@@ -1241,14 +1297,14 @@ static int awcc_platform_profile_probe(void *drvdata, unsigned long *choices) · 1058 unmodified lines
12411297
12421298 for (unsigned int i = 0; i < priv->profile_count; i++) {
12431299 ret = awcc_op_get_resource_id(priv->wdev, i + offset, &id);
1244− if (ret == -EIO)
1245− return ret;
12461300 /*
12471301 * Some devices report an incorrect number of thermal profiles
12481302 * so the resource ID list may end prematurely
12491303 */
12501304 if (ret == -EBADRQC)
12511305 break;
1306+ if (ret)
1307+ return ret;
12521308
12531309 if (!is_awcc_thermal_profile_id(id)) {
12541310 dev_dbg(&priv->wdev->dev, "Unmapped thermal profile ID 0x%02x\n", id);
drivers/platform/x86/ideapad-laptop.c+16−0
@@ -1294,6 +1294,16 @@ static const struct key_entry ideapad_keymap[] = { · 1293 unmodified lines
12941294 /* Specific to some newer models */
12951295 { KE_KEY, 0x3e | IDEAPAD_WMI_KEY, { KEY_MICMUTE } },
12961296 { KE_KEY, 0x3f | IDEAPAD_WMI_KEY, { KEY_RFKILL } },
1297+ /* Star- (User Assignable Key) */
1298+ { KE_KEY, 0x44 | IDEAPAD_WMI_KEY, { KEY_PROG1 } },
1299+ /* Eye */
1300+ { KE_KEY, 0x45 | IDEAPAD_WMI_KEY, { KEY_PROG3 } },
1301+ /* Performance toggle also Fn+Q, handled inside ideapad_wmi_notify() */
1302+ { KE_KEY, 0x3d | IDEAPAD_WMI_KEY, { KEY_PROG4 } },
1303+ /* shift + prtsc */
1304+ { KE_KEY, 0x2d | IDEAPAD_WMI_KEY, { KEY_CUT } },
1305+ { KE_KEY, 0x29 | IDEAPAD_WMI_KEY, { KEY_TOUCHPAD_TOGGLE } },
1306+ { KE_KEY, 0x2a | IDEAPAD_WMI_KEY, { KEY_ROOT_MENU } },
12971307
12981308 { KE_END },
12991309 };
@@ -2080,6 +2090,12 @@ static void ideapad_wmi_notify(struct wmi_device *wdev, union acpi_object *data) · 780 unmodified lines
20802090 dev_dbg(&wdev->dev, "WMI fn-key event: 0x%llx\n",
20812091 data->integer.value);
20822092
2093+ /* performance button triggered by 0x3d */
2094+ if (data->integer.value == 0x3d && priv->dytc) {
2095+ platform_profile_cycle();
2096+ break;
2097+ }
2098+
20832099 /* 0x02 FnLock, 0x03 Esc */
20842100 if (data->integer.value == 0x02 || data->integer.value == 0x03)
20852101 ideapad_fn_lock_led_notify(priv, data->integer.value == 0x02);
drivers/platform/x86/intel/hid.c+11−10
@@ -44,16 +44,17 @@ MODULE_LICENSE("GPL"); · 43 unmodified lines
4444 MODULE_AUTHOR("Alex Hung");
4545
4646 static const struct acpi_device_id intel_hid_ids[] = {
47− {"INT33D5", 0},
48− {"INTC1051", 0},
49− {"INTC1054", 0},
50− {"INTC1070", 0},
51− {"INTC1076", 0},
52− {"INTC1077", 0},
53− {"INTC1078", 0},
54− {"INTC107B", 0},
55− {"INTC10CB", 0},
56− {"", 0},
47+ { "INT33D5" },
48+ { "INTC1051" },
49+ { "INTC1054" },
50+ { "INTC1070" },
51+ { "INTC1076" },
52+ { "INTC1077" },
53+ { "INTC1078" },
54+ { "INTC107B" },
55+ { "INTC10CB" },
56+ { "INTC10CC" },
57+ { }
5758 };
5859 MODULE_DEVICE_TABLE(acpi, intel_hid_ids);
5960
drivers/platform/x86/intel/uncore-frequency/uncore-frequency.c+9−4
@@ -146,15 +146,13 @@ static int uncore_event_cpu_online(unsigned int cpu) · 145 unmodified lines
146146 {
147147 struct uncore_data *data;
148148 int target;
149+ int ret;
149150
150151 /* Check if there is an online cpu in the package for uncore MSR */
151152 target = cpumask_any_and(&uncore_cpu_mask, topology_die_cpumask(cpu));
152153 if (target < nr_cpu_ids)
153154 return 0;
154155
155− /* Use this CPU on this die as a control CPU */
156− cpumask_set_cpu(cpu, &uncore_cpu_mask);
157−
158156 data = uncore_get_instance(cpu);
159157 if (!data)
160158 return 0;
@@ -163,7 +161,14 @@ static int uncore_event_cpu_online(unsigned int cpu) · 2 unmodified lines
163161 data->die_id = topology_die_id(cpu);
164162 data->domain_id = UNCORE_DOMAIN_ID_INVALID;
165163
166− return uncore_freq_add_entry(data, cpu);
164+ ret = uncore_freq_add_entry(data, cpu);
165+ if (ret)
166+ return ret;
167+
168+ /* Use this CPU on this die as a control CPU */
169+ cpumask_set_cpu(cpu, &uncore_cpu_mask);
170+
171+ return 0;
167172 }
168173
169174 static int uncore_event_cpu_offline(unsigned int cpu)
drivers/platform/x86/msi-wmi-platform.c+63−36
@@ -10,6 +10,7 @@ · 9 unmodified lines
1010 #include <linux/acpi.h>
1111 #include <linux/bits.h>
1212 #include <linux/bitfield.h>
13+#include <linux/cleanup.h>
1314 #include <linux/debugfs.h>
1415 #include <linux/device.h>
1516 #include <linux/device/driver.h>
@@ -17,6 +18,7 @@ · 1 unmodified line
1718 #include <linux/hwmon.h>
1819 #include <linux/kernel.h>
1920 #include <linux/module.h>
21+#include <linux/mutex.h>
2022 #include <linux/printk.h>
2123 #include <linux/rwsem.h>
2224 #include <linux/types.h>
@@ -76,8 +78,13 @@ enum msi_wmi_platform_method { · 53 unmodified lines
7678 MSI_PLATFORM_GET_WMI = 0x1d,
7779 };
7880
79−struct msi_wmi_platform_debugfs_data {
81+struct msi_wmi_platform_data {
8082 struct wmi_device *wdev;
83+ struct mutex wmi_lock; /* Necessary when calling WMI methods */
84+};
85+
86+struct msi_wmi_platform_debugfs_data {
87+ struct msi_wmi_platform_data *data;
8188 enum msi_wmi_platform_method method;
8289 struct rw_semaphore buffer_lock; /* Protects debugfs buffer */
8390 size_t length;
@@ -132,8 +139,9 @@ static int msi_wmi_platform_parse_buffer(union acpi_object *obj, u8 *output, siz · 48 unmodified lines
132139 return 0;
133140 }
134141
135−static int msi_wmi_platform_query(struct wmi_device *wdev, enum msi_wmi_platform_method method,
136− u8 *input, size_t input_length, u8 *output, size_t output_length)
142+static int msi_wmi_platform_query(struct msi_wmi_platform_data *data,
143+ enum msi_wmi_platform_method method, u8 *input,
144+ size_t input_length, u8 *output, size_t output_length)
137145 {
138146 struct acpi_buffer out = { ACPI_ALLOCATE_BUFFER, NULL };
139147 struct acpi_buffer in = {
@@ -147,9 +155,15 @@ static int msi_wmi_platform_query(struct wmi_device *wdev, enum msi_wmi_platform · 7 unmodified lines
147155 if (!input_length || !output_length)
148156 return -EINVAL;
149157
150− status = wmidev_evaluate_method(wdev, 0x0, method, &in, &out);
151− if (ACPI_FAILURE(status))
152− return -EIO;
158+ /*
159+ * The ACPI control method responsible for handling the WMI method calls
160+ * is not thread-safe. Because of this we have to do the locking ourself.
161+ */
162+ scoped_guard(mutex, &data->wmi_lock) {
163+ status = wmidev_evaluate_method(data->wdev, 0x0, method, &in, &out);
164+ if (ACPI_FAILURE(status))
165+ return -EIO;
166+ }
153167
154168 obj = out.pointer;
155169 if (!obj)
@@ -170,22 +184,22 @@ static umode_t msi_wmi_platform_is_visible(const void *drvdata, enum hwmon_senso · 14 unmodified lines
170184 static int msi_wmi_platform_read(struct device *dev, enum hwmon_sensor_types type, u32 attr,
171185 int channel, long *val)
172186 {
173− struct wmi_device *wdev = dev_get_drvdata(dev);
187+ struct msi_wmi_platform_data *data = dev_get_drvdata(dev);
174188 u8 input[32] = { 0 };
175189 u8 output[32];
176− u16 data;
190+ u16 value;
177191 int ret;
178192
179− ret = msi_wmi_platform_query(wdev, MSI_PLATFORM_GET_FAN, input, sizeof(input), output,
193+ ret = msi_wmi_platform_query(data, MSI_PLATFORM_GET_FAN, input, sizeof(input), output,
180194 sizeof(output));
181195 if (ret < 0)
182196 return ret;
183197
184− data = get_unaligned_be16(&output[channel * 2 + 1]);
185− if (!data)
198+ value = get_unaligned_be16(&output[channel * 2 + 1]);
199+ if (!value)
186200 *val = 0;
187201 else
188− *val = 480000 / data;
202+ *val = 480000 / value;
189203
190204 return 0;
191205 }
@@ -231,7 +245,7 @@ static ssize_t msi_wmi_platform_write(struct file *fp, const char __user *input, · 39 unmodified lines
231245 return ret;
232246
233247 down_write(&data->buffer_lock);
234− ret = msi_wmi_platform_query(data->wdev, data->method, payload, data->length, data->buffer,
248+ ret = msi_wmi_platform_query(data->data, data->method, payload, data->length, data->buffer,
235249 data->length);
236250 up_write(&data->buffer_lock);
237251
@@ -277,17 +291,17 @@ static void msi_wmi_platform_debugfs_remove(void *data) · 39 unmodified lines
277291 debugfs_remove_recursive(dir);
278292 }
279293
280−static void msi_wmi_platform_debugfs_add(struct wmi_device *wdev, struct dentry *dir,
294+static void msi_wmi_platform_debugfs_add(struct msi_wmi_platform_data *drvdata, struct dentry *dir,
281295 const char *name, enum msi_wmi_platform_method method)
282296 {
283297 struct msi_wmi_platform_debugfs_data *data;
284298 struct dentry *entry;
285299
286− data = devm_kzalloc(&wdev->dev, sizeof(*data), GFP_KERNEL);
300+ data = devm_kzalloc(&drvdata->wdev->dev, sizeof(*data), GFP_KERNEL);
287301 if (!data)
288302 return;
289303
290− data->wdev = wdev;
304+ data->data = drvdata;
291305 data->method = method;
292306 init_rwsem(&data->buffer_lock);
293307
@@ -298,82 +312,82 @@ static void msi_wmi_platform_debugfs_add(struct wmi_device *wdev, struct dentry · 4 unmodified lines
298312
299313 entry = debugfs_create_file(name, 0600, dir, data, &msi_wmi_platform_debugfs_fops);
300314 if (IS_ERR(entry))
301− devm_kfree(&wdev->dev, data);
315+ devm_kfree(&drvdata->wdev->dev, data);
302316 }
303317
304−static void msi_wmi_platform_debugfs_init(struct wmi_device *wdev)
318+static void msi_wmi_platform_debugfs_init(struct msi_wmi_platform_data *data)
305319 {
306320 struct dentry *dir;
307321 char dir_name[64];
308322 int ret, method;
309323
310− scnprintf(dir_name, ARRAY_SIZE(dir_name), "%s-%s", DRIVER_NAME, dev_name(&wdev->dev));
324+ scnprintf(dir_name, ARRAY_SIZE(dir_name), "%s-%s", DRIVER_NAME, dev_name(&data->wdev->dev));
311325
312326 dir = debugfs_create_dir(dir_name, NULL);
313327 if (IS_ERR(dir))
314328 return;
315329
316− ret = devm_add_action_or_reset(&wdev->dev, msi_wmi_platform_debugfs_remove, dir);
330+ ret = devm_add_action_or_reset(&data->wdev->dev, msi_wmi_platform_debugfs_remove, dir);
317331 if (ret < 0)
318332 return;
319333
320334 for (method = MSI_PLATFORM_GET_PACKAGE; method <= MSI_PLATFORM_GET_WMI; method++)
321− msi_wmi_platform_debugfs_add(wdev, dir, msi_wmi_platform_debugfs_names[method - 1],
335+ msi_wmi_platform_debugfs_add(data, dir, msi_wmi_platform_debugfs_names[method - 1],
322336 method);
323337 }
324338
325−static int msi_wmi_platform_hwmon_init(struct wmi_device *wdev)
339+static int msi_wmi_platform_hwmon_init(struct msi_wmi_platform_data *data)
326340 {
327341 struct device *hdev;
328342
329− hdev = devm_hwmon_device_register_with_info(&wdev->dev, "msi_wmi_platform", wdev,
343+ hdev = devm_hwmon_device_register_with_info(&data->wdev->dev, "msi_wmi_platform", data,
330344 &msi_wmi_platform_chip_info, NULL);
331345
332346 return PTR_ERR_OR_ZERO(hdev);
333347 }
334348
335−static int msi_wmi_platform_ec_init(struct wmi_device *wdev)
349+static int msi_wmi_platform_ec_init(struct msi_wmi_platform_data *data)
336350 {
337351 u8 input[32] = { 0 };
338352 u8 output[32];
339353 u8 flags;
340354 int ret;
341355
342− ret = msi_wmi_platform_query(wdev, MSI_PLATFORM_GET_EC, input, sizeof(input), output,
356+ ret = msi_wmi_platform_query(data, MSI_PLATFORM_GET_EC, input, sizeof(input), output,
343357 sizeof(output));
344358 if (ret < 0)
345359 return ret;
346360
347361 flags = output[MSI_PLATFORM_EC_FLAGS_OFFSET];
348362
349− dev_dbg(&wdev->dev, "EC RAM version %lu.%lu\n",
363+ dev_dbg(&data->wdev->dev, "EC RAM version %lu.%lu\n",
350364 FIELD_GET(MSI_PLATFORM_EC_MAJOR_MASK, flags),
351365 FIELD_GET(MSI_PLATFORM_EC_MINOR_MASK, flags));
352− dev_dbg(&wdev->dev, "EC firmware version %.28s\n",
366+ dev_dbg(&data->wdev->dev, "EC firmware version %.28s\n",
353367 &output[MSI_PLATFORM_EC_VERSION_OFFSET]);
354368
355369 if (!(flags & MSI_PLATFORM_EC_IS_TIGERLAKE)) {
356370 if (!force)
357371 return -ENODEV;
358372
359− dev_warn(&wdev->dev, "Loading on a non-Tigerlake platform\n");
373+ dev_warn(&data->wdev->dev, "Loading on a non-Tigerlake platform\n");
360374 }
361375
362376 return 0;
363377 }
364378
365−static int msi_wmi_platform_init(struct wmi_device *wdev)
379+static int msi_wmi_platform_init(struct msi_wmi_platform_data *data)
366380 {
367381 u8 input[32] = { 0 };
368382 u8 output[32];
369383 int ret;
370384
371− ret = msi_wmi_platform_query(wdev, MSI_PLATFORM_GET_WMI, input, sizeof(input), output,
385+ ret = msi_wmi_platform_query(data, MSI_PLATFORM_GET_WMI, input, sizeof(input), output,
372386 sizeof(output));
373387 if (ret < 0)
374388 return ret;
375389
376− dev_dbg(&wdev->dev, "WMI interface version %u.%u\n",
390+ dev_dbg(&data->wdev->dev, "WMI interface version %u.%u\n",
377391 output[MSI_PLATFORM_WMI_MAJOR_OFFSET],
378392 output[MSI_PLATFORM_WMI_MINOR_OFFSET]);
379393
@@ -381,7 +395,8 @@ static int msi_wmi_platform_init(struct wmi_device *wdev) · 1 unmodified line
381395 if (!force)
382396 return -ENODEV;
383397
384− dev_warn(&wdev->dev, "Loading despite unsupported WMI interface version (%u.%u)\n",
398+ dev_warn(&data->wdev->dev,
399+ "Loading despite unsupported WMI interface version (%u.%u)\n",
385400 output[MSI_PLATFORM_WMI_MAJOR_OFFSET],
386401 output[MSI_PLATFORM_WMI_MINOR_OFFSET]);
387402 }
@@ -391,19 +406,31 @@ static int msi_wmi_platform_init(struct wmi_device *wdev) · 3 unmodified lines
391406
392407 static int msi_wmi_platform_probe(struct wmi_device *wdev, const void *context)
393408 {
409+ struct msi_wmi_platform_data *data;
394410 int ret;
395411
396− ret = msi_wmi_platform_init(wdev);
412+ data = devm_kzalloc(&wdev->dev, sizeof(*data), GFP_KERNEL);
413+ if (!data)
414+ return -ENOMEM;
415+
416+ data->wdev = wdev;
417+ dev_set_drvdata(&wdev->dev, data);
418+
419+ ret = devm_mutex_init(&wdev->dev, &data->wmi_lock);
420+ if (ret < 0)
421+ return ret;
422+
423+ ret = msi_wmi_platform_init(data);
397424 if (ret < 0)
398425 return ret;
399426
400− ret = msi_wmi_platform_ec_init(wdev);
427+ ret = msi_wmi_platform_ec_init(data);
401428 if (ret < 0)
402429 return ret;
403430
404− msi_wmi_platform_debugfs_init(wdev);
431+ msi_wmi_platform_debugfs_init(data);
405432
406− return msi_wmi_platform_hwmon_init(wdev);
433+ return msi_wmi_platform_hwmon_init(data);
407434 }
408435
409436 static const struct wmi_device_id msi_wmi_platform_id_table[] = {
drivers/platform/x86/thinkpad_acpi.c+2−0
@@ -11519,6 +11519,8 @@ static int __must_check __init get_thinkpad_model_data( · 11518 unmodified lines
1151911519 tp->vendor = PCI_VENDOR_ID_IBM;
1152011520 else if (dmi_name_in_vendors("LENOVO"))
1152111521 tp->vendor = PCI_VENDOR_ID_LENOVO;
11522+ else if (dmi_name_in_vendors("NEC"))
11523+ tp->vendor = PCI_VENDOR_ID_LENOVO;
1152211524 else
1152311525 return 0;
1152411526
drivers/platform/x86/x86-android-tablets/dmi.c+13−1
@@ -179,6 +179,18 @@ const struct dmi_system_id x86_android_tablet_ids[] __initconst = { · 178 unmodified lines
179179 },
180180 .driver_data = (void *)&peaq_c1010_info,
181181 },
182+ {
183+ /* Vexia Edu Atla 10 tablet 5V version */
184+ .matches = {
185+ /* Having all 3 of these not set is somewhat unique */
186+ DMI_MATCH(DMI_SYS_VENDOR, "To be filled by O.E.M."),
187+ DMI_MATCH(DMI_PRODUCT_NAME, "To be filled by O.E.M."),
188+ DMI_MATCH(DMI_BOARD_NAME, "To be filled by O.E.M."),
189+ /* Above strings are too generic, also match on BIOS date */
190+ DMI_MATCH(DMI_BIOS_DATE, "05/14/2015"),
191+ },
192+ .driver_data = (void *)&vexia_edu_atla10_5v_info,
193+ },
182194 {
183195 /* Vexia Edu Atla 10 tablet 9V version */
184196 .matches = {
@@ -187,7 +199,7 @@ const struct dmi_system_id x86_android_tablet_ids[] __initconst = { · 2 unmodified lines
187199 /* Above strings are too generic, also match on BIOS date */
188200 DMI_MATCH(DMI_BIOS_DATE, "08/25/2014"),
189201 },
190− .driver_data = (void *)&vexia_edu_atla10_info,
202+ .driver_data = (void *)&vexia_edu_atla10_9v_info,
191203 },
192204 {
193205 /* Whitelabel (sold as various brands) TM800A550L */
drivers/platform/x86/x86-android-tablets/other.c+92−32
@@ -599,62 +599,122 @@ const struct x86_dev_info whitelabel_tm800a550l_info __initconst = { · 598 unmodified lines
599599 };
600600
601601 /*
602− * Vexia EDU ATLA 10 tablet, Android 4.2 / 4.4 + Guadalinex Ubuntu tablet
602+ * Vexia EDU ATLA 10 tablet 5V, Android 4.4 + Guadalinex Ubuntu tablet
603+ * distributed to schools in the Spanish Andalucía region.
604+ */
605+static const struct property_entry vexia_edu_atla10_5v_touchscreen_props[] = {
606+ PROPERTY_ENTRY_U32("hid-descr-addr", 0x0000),
607+ PROPERTY_ENTRY_U32("post-reset-deassert-delay-ms", 120),
608+ { }
609+};
610+
611+static const struct software_node vexia_edu_atla10_5v_touchscreen_node = {
612+ .properties = vexia_edu_atla10_5v_touchscreen_props,
613+};
614+
615+static const struct x86_i2c_client_info vexia_edu_atla10_5v_i2c_clients[] __initconst = {
616+ {
617+ /* kxcjk1013 accelerometer */
618+ .board_info = {
619+ .type = "kxcjk1013",
620+ .addr = 0x0f,
621+ .dev_name = "kxcjk1013",
622+ },
623+ .adapter_path = "\\_SB_.I2C3",
624+ }, {
625+ /* touchscreen controller */
626+ .board_info = {
627+ .type = "hid-over-i2c",
628+ .addr = 0x38,
629+ .dev_name = "FTSC1000",
630+ .swnode = &vexia_edu_atla10_5v_touchscreen_node,
631+ },
632+ .adapter_path = "\\_SB_.I2C4",
633+ .irq_data = {
634+ .type = X86_ACPI_IRQ_TYPE_APIC,
635+ .index = 0x44,
636+ .trigger = ACPI_LEVEL_SENSITIVE,
637+ .polarity = ACPI_ACTIVE_HIGH,
638+ },
639+ }
640+};
641+
642+static struct gpiod_lookup_table vexia_edu_atla10_5v_ft5416_gpios = {
643+ .dev_id = "i2c-FTSC1000",
644+ .table = {
645+ GPIO_LOOKUP("INT33FC:01", 26, "reset", GPIO_ACTIVE_LOW),
646+ { }
647+ },
648+};
649+
650+static struct gpiod_lookup_table * const vexia_edu_atla10_5v_gpios[] = {
651+ &vexia_edu_atla10_5v_ft5416_gpios,
652+ NULL
653+};
654+
655+const struct x86_dev_info vexia_edu_atla10_5v_info __initconst = {
656+ .i2c_client_info = vexia_edu_atla10_5v_i2c_clients,
657+ .i2c_client_count = ARRAY_SIZE(vexia_edu_atla10_5v_i2c_clients),
658+ .gpiod_lookup_tables = vexia_edu_atla10_5v_gpios,
659+};
660+
661+/*
662+ * Vexia EDU ATLA 10 tablet 9V, Android 4.2 + Guadalinex Ubuntu tablet
603663 * distributed to schools in the Spanish Andalucía region.
604664 */
605665 static const char * const crystal_cove_pwrsrc_psy[] = { "crystal_cove_pwrsrc" };
606666
607−static const struct property_entry vexia_edu_atla10_ulpmc_props[] = {
667+static const struct property_entry vexia_edu_atla10_9v_ulpmc_props[] = {
608668 PROPERTY_ENTRY_STRING_ARRAY("supplied-from", crystal_cove_pwrsrc_psy),
609669 { }
610670 };
611671
612−static const struct software_node vexia_edu_atla10_ulpmc_node = {
613− .properties = vexia_edu_atla10_ulpmc_props,
672+static const struct software_node vexia_edu_atla10_9v_ulpmc_node = {
673+ .properties = vexia_edu_atla10_9v_ulpmc_props,
614674 };
615675
616−static const char * const vexia_edu_atla10_accel_mount_matrix[] = {
676+static const char * const vexia_edu_atla10_9v_accel_mount_matrix[] = {
617677 "0", "-1", "0",
618678 "1", "0", "0",
619679 "0", "0", "1"
620680 };
621681
622−static const struct property_entry vexia_edu_atla10_accel_props[] = {
623− PROPERTY_ENTRY_STRING_ARRAY("mount-matrix", vexia_edu_atla10_accel_mount_matrix),
682+static const struct property_entry vexia_edu_atla10_9v_accel_props[] = {
683+ PROPERTY_ENTRY_STRING_ARRAY("mount-matrix", vexia_edu_atla10_9v_accel_mount_matrix),
624684 { }
625685 };
626686
627−static const struct software_node vexia_edu_atla10_accel_node = {
628− .properties = vexia_edu_atla10_accel_props,
687+static const struct software_node vexia_edu_atla10_9v_accel_node = {
688+ .properties = vexia_edu_atla10_9v_accel_props,
629689 };
630690
631−static const struct property_entry vexia_edu_atla10_touchscreen_props[] = {
691+static const struct property_entry vexia_edu_atla10_9v_touchscreen_props[] = {
632692 PROPERTY_ENTRY_U32("hid-descr-addr", 0x0000),
633693 PROPERTY_ENTRY_U32("post-reset-deassert-delay-ms", 120),
634694 { }
635695 };
636696
637−static const struct software_node vexia_edu_atla10_touchscreen_node = {
638− .properties = vexia_edu_atla10_touchscreen_props,
697+static const struct software_node vexia_edu_atla10_9v_touchscreen_node = {
698+ .properties = vexia_edu_atla10_9v_touchscreen_props,
639699 };
640700
641−static const struct property_entry vexia_edu_atla10_pmic_props[] = {
701+static const struct property_entry vexia_edu_atla10_9v_pmic_props[] = {
642702 PROPERTY_ENTRY_BOOL("linux,register-pwrsrc-power_supply"),
643703 { }
644704 };
645705
646−static const struct software_node vexia_edu_atla10_pmic_node = {
647− .properties = vexia_edu_atla10_pmic_props,
706+static const struct software_node vexia_edu_atla10_9v_pmic_node = {
707+ .properties = vexia_edu_atla10_9v_pmic_props,
648708 };
649709
650−static const struct x86_i2c_client_info vexia_edu_atla10_i2c_clients[] __initconst = {
710+static const struct x86_i2c_client_info vexia_edu_atla10_9v_i2c_clients[] __initconst = {
651711 {
652712 /* I2C attached embedded controller, used to access fuel-gauge */
653713 .board_info = {
654714 .type = "vexia_atla10_ec",
655715 .addr = 0x76,
656716 .dev_name = "ulpmc",
657− .swnode = &vexia_edu_atla10_ulpmc_node,
717+ .swnode = &vexia_edu_atla10_9v_ulpmc_node,
658718 },
659719 .adapter_path = "0000:00:18.1",
660720 }, {
@@ -679,7 +739,7 @@ static const struct x86_i2c_client_info vexia_edu_atla10_i2c_clients[] __initcon · 18 unmodified lines
679739 .type = "kxtj21009",
680740 .addr = 0x0f,
681741 .dev_name = "kxtj21009",
682− .swnode = &vexia_edu_atla10_accel_node,
742+ .swnode = &vexia_edu_atla10_9v_accel_node,
683743 },
684744 .adapter_path = "0000:00:18.5",
685745 }, {
@@ -688,7 +748,7 @@ static const struct x86_i2c_client_info vexia_edu_atla10_i2c_clients[] __initcon · 2 unmodified lines
688748 .type = "hid-over-i2c",
689749 .addr = 0x38,
690750 .dev_name = "FTSC1000",
691− .swnode = &vexia_edu_atla10_touchscreen_node,
751+ .swnode = &vexia_edu_atla10_9v_touchscreen_node,
692752 },
693753 .adapter_path = "0000:00:18.6",
694754 .irq_data = {
@@ -703,7 +763,7 @@ static const struct x86_i2c_client_info vexia_edu_atla10_i2c_clients[] __initcon · 8 unmodified lines
703763 .type = "intel_soc_pmic_crc",
704764 .addr = 0x6e,
705765 .dev_name = "intel_soc_pmic_crc",
706− .swnode = &vexia_edu_atla10_pmic_node,
766+ .swnode = &vexia_edu_atla10_9v_pmic_node,
707767 },
708768 .adapter_path = "0000:00:18.7",
709769 .irq_data = {
@@ -715,7 +775,7 @@ static const struct x86_i2c_client_info vexia_edu_atla10_i2c_clients[] __initcon · 5 unmodified lines
715775 }
716776 };
717777
718−static const struct x86_serdev_info vexia_edu_atla10_serdevs[] __initconst = {
778+static const struct x86_serdev_info vexia_edu_atla10_9v_serdevs[] __initconst = {
719779 {
720780 .ctrl.pci.devfn = PCI_DEVFN(0x1e, 3),
721781 .ctrl_devname = "serial0",
@@ -723,7 +783,7 @@ static const struct x86_serdev_info vexia_edu_atla10_serdevs[] __initconst = { · 1 unmodified line
723783 },
724784 };
725785
726−static struct gpiod_lookup_table vexia_edu_atla10_ft5416_gpios = {
786+static struct gpiod_lookup_table vexia_edu_atla10_9v_ft5416_gpios = {
727787 .dev_id = "i2c-FTSC1000",
728788 .table = {
729789 GPIO_LOOKUP("INT33FC:00", 60, "reset", GPIO_ACTIVE_LOW),
@@ -731,12 +791,12 @@ static struct gpiod_lookup_table vexia_edu_atla10_ft5416_gpios = { · 1 unmodified line
731791 },
732792 };
733793
734−static struct gpiod_lookup_table * const vexia_edu_atla10_gpios[] = {
735− &vexia_edu_atla10_ft5416_gpios,
794+static struct gpiod_lookup_table * const vexia_edu_atla10_9v_gpios[] = {
795+ &vexia_edu_atla10_9v_ft5416_gpios,
736796 NULL
737797 };
738798
739−static int __init vexia_edu_atla10_init(struct device *dev)
799+static int __init vexia_edu_atla10_9v_init(struct device *dev)
740800 {
741801 struct pci_dev *pdev;
742802 int ret;
@@ -760,13 +820,13 @@ static int __init vexia_edu_atla10_init(struct device *dev) · 17 unmodified lines
760820 return 0;
761821 }
762822
763−const struct x86_dev_info vexia_edu_atla10_info __initconst = {
764− .i2c_client_info = vexia_edu_atla10_i2c_clients,
765− .i2c_client_count = ARRAY_SIZE(vexia_edu_atla10_i2c_clients),
766− .serdev_info = vexia_edu_atla10_serdevs,
767− .serdev_count = ARRAY_SIZE(vexia_edu_atla10_serdevs),
768− .gpiod_lookup_tables = vexia_edu_atla10_gpios,
769− .init = vexia_edu_atla10_init,
823+const struct x86_dev_info vexia_edu_atla10_9v_info __initconst = {
824+ .i2c_client_info = vexia_edu_atla10_9v_i2c_clients,
825+ .i2c_client_count = ARRAY_SIZE(vexia_edu_atla10_9v_i2c_clients),
826+ .serdev_info = vexia_edu_atla10_9v_serdevs,
827+ .serdev_count = ARRAY_SIZE(vexia_edu_atla10_9v_serdevs),
828+ .gpiod_lookup_tables = vexia_edu_atla10_9v_gpios,
829+ .init = vexia_edu_atla10_9v_init,
770830 .use_pci = true,
771831 };
772832
drivers/platform/x86/x86-android-tablets/x86-android-tablets.h+2−1
@@ -127,7 +127,8 @@ extern const struct x86_dev_info nextbook_ares8_info; · 126 unmodified lines
127127 extern const struct x86_dev_info nextbook_ares8a_info;
128128 extern const struct x86_dev_info peaq_c1010_info;
129129 extern const struct x86_dev_info whitelabel_tm800a550l_info;
130−extern const struct x86_dev_info vexia_edu_atla10_info;
130+extern const struct x86_dev_info vexia_edu_atla10_5v_info;
131+extern const struct x86_dev_info vexia_edu_atla10_9v_info;
131132 extern const struct x86_dev_info xiaomi_mipad2_info;
132133 extern const struct dmi_system_id x86_android_tablet_ids[];
133134
include/linux/platform_data/x86/intel_pmc_ipc.h+4−0
@@ -36,6 +36,7 @@ struct pmc_ipc_rbuf { · 35 unmodified lines
3636 */
3737 static inline int intel_pmc_ipc(struct pmc_ipc_cmd *ipc_cmd, struct pmc_ipc_rbuf *rbuf)
3838 {
39+#ifdef CONFIG_ACPI
3940 struct acpi_buffer buffer = { ACPI_ALLOCATE_BUFFER, NULL };
4041 union acpi_object params[PMC_IPCS_PARAM_COUNT] = {
4142 {.type = ACPI_TYPE_INTEGER,},
@@ -89,6 +90,9 @@ static inline int intel_pmc_ipc(struct pmc_ipc_cmd *ipc_cmd, struct pmc_ipc_rbuf · 47 unmodified lines
8990 }
9091
9192 return 0;
93+#else
94+ return -ENODEV;
95+#endif /* CONFIG_ACPI */
9296 }
9397
9498 #endif /* INTEL_PMC_IPC_H */