Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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.

+384 -131
+4
Documentation/wmi/devices/msi-wmi-platform.rst
··· 138 138 The output buffer contains a single byte which signals success or failure (``0x00`` on failure) 139 139 and 31 bytes of output data, the meaning if which depends on the subfeature being accessed. 140 140 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 + 141 145 WMI method Get_EC() 142 146 ------------------- 143 147
+2 -2
drivers/platform/mellanox/mlxbf-bootctl.c
··· 333 333 else 334 334 status = valid ? "Invalid" : "Free"; 335 335 } 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); 337 337 } 338 - buf_len += sysfs_emit(buf + buf_len, "\n"); 338 + buf_len += sysfs_emit_at(buf, buf_len, "\n"); 339 339 340 340 return buf_len; 341 341 }
+1 -2
drivers/platform/x86/amd/hsmp/acpi.c
··· 27 27 28 28 #include "hsmp.h" 29 29 30 - #define DRIVER_NAME "amd_hsmp" 30 + #define DRIVER_NAME "hsmp_acpi" 31 31 #define DRIVER_VERSION "2.3" 32 - #define ACPI_HSMP_DEVICE_HID "AMDI0097" 33 32 34 33 /* These are the strings specified in ACPI table */ 35 34 #define MSG_IDOFF_STR "MsgIdOffset"
+1
drivers/platform/x86/amd/hsmp/hsmp.h
··· 23 23 24 24 #define HSMP_CDEV_NAME "hsmp_cdev" 25 25 #define HSMP_DEVNODE_NAME "hsmp" 26 + #define ACPI_HSMP_DEVICE_HID "AMDI0097" 26 27 27 28 struct hsmp_mbaddr_info { 28 29 u32 base_addr;
+5 -1
drivers/platform/x86/amd/hsmp/plat.c
··· 11 11 12 12 #include <asm/amd_hsmp.h> 13 13 14 + #include <linux/acpi.h> 14 15 #include <linux/build_bug.h> 15 16 #include <linux/device.h> 16 17 #include <linux/module.h> ··· 267 266 } 268 267 case 0x1A: 269 268 switch (boot_cpu_data.x86_model) { 270 - case 0x00 ... 0x1F: 269 + case 0x00 ... 0x0F: 271 270 return true; 272 271 default: 273 272 return false; ··· 288 287 boot_cpu_data.x86, boot_cpu_data.x86_model); 289 288 return ret; 290 289 } 290 + 291 + if (acpi_dev_present(ACPI_HSMP_DEVICE_HID, NULL, -1)) 292 + return -ENODEV; 291 293 292 294 hsmp_pdev = get_hsmp_pdev(); 293 295 if (!hsmp_pdev)
+7
drivers/platform/x86/amd/pmc/pmc-quirks.c
··· 217 217 DMI_MATCH(DMI_BIOS_VERSION, "03.05"), 218 218 } 219 219 }, 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 + }, 220 227 {} 221 228 }; 222 229
+3 -4
drivers/platform/x86/amd/pmc/pmc.c
··· 644 644 struct smu_metrics table; 645 645 int rc; 646 646 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); 651 650 652 651 /* Dump the IdleMask before we add to the STB */ 653 652 amd_pmc_idlemask_read(pdev, pdev->dev, NULL);
+2 -2
drivers/platform/x86/amd/pmf/auto-mode.c
··· 120 120 amd_pmf_send_cmd(dev, SET_SPPT_APU_ONLY, false, pwr_ctrl->sppt_apu_only, NULL); 121 121 amd_pmf_send_cmd(dev, SET_STT_MIN_LIMIT, false, pwr_ctrl->stt_min, NULL); 122 122 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); 124 124 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); 126 126 127 127 if (is_apmf_func_supported(dev, APMF_FUNC_SET_FAN_IDX)) 128 128 apmf_update_fan_idx(dev, config_store.mode_set[idx].fan_control.manual,
+4 -4
drivers/platform/x86/amd/pmf/cnqf.c
··· 81 81 amd_pmf_send_cmd(dev, SET_SPPT, false, pc->sppt, NULL); 82 82 amd_pmf_send_cmd(dev, SET_SPPT_APU_ONLY, false, pc->sppt_apu_only, NULL); 83 83 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); 88 88 89 89 if (is_apmf_func_supported(dev, APMF_FUNC_SET_FAN_IDX)) 90 90 apmf_update_fan_idx(dev,
+14
drivers/platform/x86/amd/pmf/core.c
··· 176 176 dev_dbg(dev->dev, "AMD_PMF_REGISTER_MESSAGE:%x\n", value); 177 177 } 178 178 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 + 179 193 int amd_pmf_send_cmd(struct amd_pmf_dev *dev, u8 message, bool get, u32 arg, u32 *data) 180 194 { 181 195 int rc;
+1
drivers/platform/x86/amd/pmf/pmf.h
··· 777 777 int apmf_os_power_slider_update(struct amd_pmf_dev *dev, u8 flag); 778 778 int amd_pmf_set_dram_addr(struct amd_pmf_dev *dev, bool alloc_buffer); 779 779 int amd_pmf_notify_sbios_heartbeat_event_v2(struct amd_pmf_dev *dev, u8 flag); 780 + u32 fixp_q88_fromint(u32 val); 780 781 781 782 /* SPS Layer */ 782 783 int amd_pmf_get_pprof_modes(struct amd_pmf_dev *pmf);
+8 -4
drivers/platform/x86/amd/pmf/sps.c
··· 198 198 amd_pmf_send_cmd(dev, SET_STT_MIN_LIMIT, false, 199 199 apts_config_store.val[idx].stt_min_limit, NULL); 200 200 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); 202 203 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); 204 206 } 205 207 206 208 void amd_pmf_update_slider(struct amd_pmf_dev *dev, bool op, int idx, ··· 219 217 amd_pmf_send_cmd(dev, SET_STT_MIN_LIMIT, false, 220 218 config_store.prop[src][idx].stt_min, NULL); 221 219 amd_pmf_send_cmd(dev, SET_STT_LIMIT_APU, false, 222 - config_store.prop[src][idx].stt_skin_temp[STT_TEMP_APU], NULL); 220 + fixp_q88_fromint(config_store.prop[src][idx].stt_skin_temp[STT_TEMP_APU]), 221 + NULL); 223 222 amd_pmf_send_cmd(dev, SET_STT_LIMIT_HS2, false, 224 - config_store.prop[src][idx].stt_skin_temp[STT_TEMP_HS2], NULL); 223 + fixp_q88_fromint(config_store.prop[src][idx].stt_skin_temp[STT_TEMP_HS2]), 224 + NULL); 225 225 } else if (op == SLIDER_OP_GET) { 226 226 amd_pmf_send_cmd(dev, GET_SPL, true, ARG_NONE, &table->prop[src][idx].spl); 227 227 amd_pmf_send_cmd(dev, GET_FPPT, true, ARG_NONE, &table->prop[src][idx].fppt);
+26 -3
drivers/platform/x86/amd/pmf/tee-if.c
··· 123 123 124 124 case PMF_POLICY_STT_SKINTEMP_APU: 125 125 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); 127 128 dev_dbg(dev->dev, "update STT_SKINTEMP_APU: %u\n", val); 128 129 dev->prev_data->stt_skintemp_apu = val; 129 130 } ··· 132 131 133 132 case PMF_POLICY_STT_SKINTEMP_HS2: 134 133 if (dev->prev_data->stt_skintemp_hs2 != val) { 135 - amd_pmf_send_cmd(dev, SET_STT_LIMIT_HS2, false, val, NULL); 134 + amd_pmf_send_cmd(dev, SET_STT_LIMIT_HS2, false, 135 + fixp_q88_fromint(val), NULL); 136 136 dev_dbg(dev->dev, "update STT_SKINTEMP_HS2: %u\n", val); 137 137 dev->prev_data->stt_skintemp_hs2 = val; 138 138 } ··· 334 332 return 0; 335 333 } 336 334 335 + static inline bool amd_pmf_pb_valid(struct amd_pmf_dev *dev) 336 + { 337 + return memchr_inv(dev->policy_buf, 0xff, dev->policy_sz); 338 + } 339 + 337 340 #ifdef CONFIG_AMD_PMF_DEBUG 338 341 static void amd_pmf_hex_dump_pb(struct amd_pmf_dev *dev) 339 342 { ··· 366 359 dev->policy_buf = new_policy_buf; 367 360 dev->policy_sz = length; 368 361 362 + if (!amd_pmf_pb_valid(dev)) { 363 + ret = -EINVAL; 364 + goto cleanup; 365 + } 366 + 369 367 amd_pmf_hex_dump_pb(dev); 370 368 ret = amd_pmf_start_policy_engine(dev); 371 369 if (ret < 0) 372 - return ret; 370 + goto cleanup; 373 371 374 372 return length; 373 + 374 + cleanup: 375 + kfree(dev->policy_buf); 376 + dev->policy_buf = NULL; 377 + return ret; 375 378 } 376 379 377 380 static const struct file_operations pb_fops = { ··· 542 525 } 543 526 544 527 memcpy_fromio(dev->policy_buf, dev->policy_base, dev->policy_sz); 528 + 529 + if (!amd_pmf_pb_valid(dev)) { 530 + dev_info(dev->dev, "No Smart PC policy present\n"); 531 + ret = -EINVAL; 532 + goto err_free_policy; 533 + } 545 534 546 535 amd_pmf_hex_dump_pb(dev); 547 536
+6 -3
drivers/platform/x86/asus-laptop.c
··· 426 426 427 427 static int pega_acc_axis(struct asus_laptop *asus, int curr, char *method) 428 428 { 429 + unsigned long long val = (unsigned long long)curr; 430 + acpi_status status; 429 431 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); 433 432 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; 434 437 /* The output is noisy. From reading the ASL 435 438 * dissassembly, timeout errors are returned with 1's 436 439 * in the high word, and the lack of locking around
+12 -2
drivers/platform/x86/asus-wmi.c
··· 305 305 306 306 u32 kbd_rgb_dev; 307 307 bool kbd_rgb_state_available; 308 + bool oobe_state_available; 308 309 309 310 u8 throttle_thermal_policy_mode; 310 311 u32 throttle_thermal_policy_dev; ··· 1869 1868 goto error; 1870 1869 } 1871 1870 1872 - if (asus_wmi_dev_is_present(asus, ASUS_WMI_DEVID_OOBE)) { 1871 + if (asus->oobe_state_available) { 1873 1872 /* 1874 1873 * Disable OOBE state, so that e.g. the keyboard backlight 1875 1874 * works. ··· 4781 4780 asus->egpu_enable_available = asus_wmi_dev_is_present(asus, ASUS_WMI_DEVID_EGPU); 4782 4781 asus->dgpu_disable_available = asus_wmi_dev_is_present(asus, ASUS_WMI_DEVID_DGPU); 4783 4782 asus->kbd_rgb_state_available = asus_wmi_dev_is_present(asus, ASUS_WMI_DEVID_TUF_RGB_STATE); 4783 + asus->oobe_state_available = asus_wmi_dev_is_present(asus, ASUS_WMI_DEVID_OOBE); 4784 4784 4785 4785 if (asus_wmi_dev_is_present(asus, ASUS_WMI_DEVID_MINI_LED_MODE)) 4786 4786 asus->mini_led_dev_id = ASUS_WMI_DEVID_MINI_LED_MODE; ··· 4834 4832 goto fail_leds; 4835 4833 4836 4834 asus_wmi_get_devstate(asus, ASUS_WMI_DEVID_WLAN, &result); 4837 - if (result & (ASUS_WMI_DSTS_PRESENCE_BIT | ASUS_WMI_DSTS_USER_BIT)) 4835 + if ((result & (ASUS_WMI_DSTS_PRESENCE_BIT | ASUS_WMI_DSTS_USER_BIT)) == 4836 + (ASUS_WMI_DSTS_PRESENCE_BIT | ASUS_WMI_DSTS_USER_BIT)) 4838 4837 asus->driver->wlan_ctrl_by_user = 1; 4839 4838 4840 4839 if (!(asus->driver->wlan_ctrl_by_user && ashs_present())) { ··· 5000 4997 } 5001 4998 if (!IS_ERR_OR_NULL(asus->kbd_led.dev)) 5002 4999 kbd_led_update(asus); 5000 + if (asus->oobe_state_available) { 5001 + /* 5002 + * Disable OOBE state, so that e.g. the keyboard backlight 5003 + * works. 5004 + */ 5005 + asus_wmi_set_devstate(ASUS_WMI_DEVID_OOBE, 1, NULL); 5006 + } 5003 5007 5004 5008 if (asus_wmi_has_fnlock_key(asus)) 5005 5009 asus_wmi_fnlock_update(asus);
+58 -2
drivers/platform/x86/dell/alienware-wmi-wmax.c
··· 90 90 91 91 static const struct dmi_system_id awcc_dmi_table[] __initconst = { 92 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 + }, 116 + { 93 117 .ident = "Alienware m16 R1 AMD", 94 118 .matches = { 95 119 DMI_MATCH(DMI_SYS_VENDOR, "Alienware"), 96 120 DMI_MATCH(DMI_PRODUCT_NAME, "Alienware m16 R1 AMD"), 121 + }, 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"), 97 129 }, 98 130 .driver_data = &generic_quirks, 99 131 }, ··· 150 118 .matches = { 151 119 DMI_MATCH(DMI_SYS_VENDOR, "Alienware"), 152 120 DMI_MATCH(DMI_PRODUCT_NAME, "Alienware x15 R1"), 121 + }, 122 + .driver_data = &generic_quirks, 123 + }, 124 + { 125 + .ident = "Alienware x15 R2", 126 + .matches = { 127 + DMI_MATCH(DMI_SYS_VENDOR, "Alienware"), 128 + DMI_MATCH(DMI_PRODUCT_NAME, "Alienware x15 R2"), 153 129 }, 154 130 .driver_data = &generic_quirks, 155 131 }, ··· 194 154 .driver_data = &g_series_quirks, 195 155 }, 196 156 { 157 + .ident = "Dell Inc. G16 7630", 158 + .matches = { 159 + DMI_MATCH(DMI_SYS_VENDOR, "Dell Inc."), 160 + DMI_MATCH(DMI_PRODUCT_NAME, "Dell G16 7630"), 161 + }, 162 + .driver_data = &g_series_quirks, 163 + }, 164 + { 197 165 .ident = "Dell Inc. G3 3500", 198 166 .matches = { 199 167 DMI_MATCH(DMI_SYS_VENDOR, "Dell Inc."), ··· 222 174 .matches = { 223 175 DMI_MATCH(DMI_SYS_VENDOR, "Dell Inc."), 224 176 DMI_MATCH(DMI_PRODUCT_NAME, "G5 5500"), 177 + }, 178 + .driver_data = &g_series_quirks, 179 + }, 180 + { 181 + .ident = "Dell Inc. G5 5505", 182 + .matches = { 183 + DMI_MATCH(DMI_SYS_VENDOR, "Dell Inc."), 184 + DMI_MATCH(DMI_PRODUCT_NAME, "G5 5505"), 225 185 }, 226 186 .driver_data = &g_series_quirks, 227 187 }, ··· 1297 1241 1298 1242 for (unsigned int i = 0; i < priv->profile_count; i++) { 1299 1243 ret = awcc_op_get_resource_id(priv->wdev, i + offset, &id); 1300 - if (ret == -EIO) 1301 - return ret; 1302 1244 /* 1303 1245 * Some devices report an incorrect number of thermal profiles 1304 1246 * so the resource ID list may end prematurely 1305 1247 */ 1306 1248 if (ret == -EBADRQC) 1307 1249 break; 1250 + if (ret) 1251 + return ret; 1308 1252 1309 1253 if (!is_awcc_thermal_profile_id(id)) { 1310 1254 dev_dbg(&priv->wdev->dev, "Unmapped thermal profile ID 0x%02x\n", id);
+16
drivers/platform/x86/ideapad-laptop.c
··· 1294 1294 /* Specific to some newer models */ 1295 1295 { KE_KEY, 0x3e | IDEAPAD_WMI_KEY, { KEY_MICMUTE } }, 1296 1296 { 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 } }, 1297 1307 1298 1308 { KE_END }, 1299 1309 }; ··· 2089 2079 2090 2080 dev_dbg(&wdev->dev, "WMI fn-key event: 0x%llx\n", 2091 2081 data->integer.value); 2082 + 2083 + /* performance button triggered by 0x3d */ 2084 + if (data->integer.value == 0x3d && priv->dytc) { 2085 + platform_profile_cycle(); 2086 + break; 2087 + } 2092 2088 2093 2089 /* 0x02 FnLock, 0x03 Esc */ 2094 2090 if (data->integer.value == 0x02 || data->integer.value == 0x03)
+11 -10
drivers/platform/x86/intel/hid.c
··· 44 44 MODULE_AUTHOR("Alex Hung"); 45 45 46 46 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 + { } 57 58 }; 58 59 MODULE_DEVICE_TABLE(acpi, intel_hid_ids); 59 60
+9 -4
drivers/platform/x86/intel/uncore-frequency/uncore-frequency.c
··· 146 146 { 147 147 struct uncore_data *data; 148 148 int target; 149 + int ret; 149 150 150 151 /* Check if there is an online cpu in the package for uncore MSR */ 151 152 target = cpumask_any_and(&uncore_cpu_mask, topology_die_cpumask(cpu)); 152 153 if (target < nr_cpu_ids) 153 154 return 0; 154 - 155 - /* Use this CPU on this die as a control CPU */ 156 - cpumask_set_cpu(cpu, &uncore_cpu_mask); 157 155 158 156 data = uncore_get_instance(cpu); 159 157 if (!data) ··· 161 163 data->die_id = topology_die_id(cpu); 162 164 data->domain_id = UNCORE_DOMAIN_ID_INVALID; 163 165 164 - return uncore_freq_add_entry(data, cpu); 166 + ret = uncore_freq_add_entry(data, cpu); 167 + if (ret) 168 + return ret; 169 + 170 + /* Use this CPU on this die as a control CPU */ 171 + cpumask_set_cpu(cpu, &uncore_cpu_mask); 172 + 173 + return 0; 165 174 } 166 175 167 176 static int uncore_event_cpu_offline(unsigned int cpu)
+63 -36
drivers/platform/x86/msi-wmi-platform.c
··· 10 10 #include <linux/acpi.h> 11 11 #include <linux/bits.h> 12 12 #include <linux/bitfield.h> 13 + #include <linux/cleanup.h> 13 14 #include <linux/debugfs.h> 14 15 #include <linux/device.h> 15 16 #include <linux/device/driver.h> ··· 18 17 #include <linux/hwmon.h> 19 18 #include <linux/kernel.h> 20 19 #include <linux/module.h> 20 + #include <linux/mutex.h> 21 21 #include <linux/printk.h> 22 22 #include <linux/rwsem.h> 23 23 #include <linux/types.h> ··· 78 76 MSI_PLATFORM_GET_WMI = 0x1d, 79 77 }; 80 78 81 - struct msi_wmi_platform_debugfs_data { 79 + struct msi_wmi_platform_data { 82 80 struct wmi_device *wdev; 81 + struct mutex wmi_lock; /* Necessary when calling WMI methods */ 82 + }; 83 + 84 + struct msi_wmi_platform_debugfs_data { 85 + struct msi_wmi_platform_data *data; 83 86 enum msi_wmi_platform_method method; 84 87 struct rw_semaphore buffer_lock; /* Protects debugfs buffer */ 85 88 size_t length; ··· 139 132 return 0; 140 133 } 141 134 142 - static int msi_wmi_platform_query(struct wmi_device *wdev, enum msi_wmi_platform_method method, 143 - u8 *input, size_t input_length, u8 *output, size_t output_length) 135 + static int msi_wmi_platform_query(struct msi_wmi_platform_data *data, 136 + enum msi_wmi_platform_method method, u8 *input, 137 + size_t input_length, u8 *output, size_t output_length) 144 138 { 145 139 struct acpi_buffer out = { ACPI_ALLOCATE_BUFFER, NULL }; 146 140 struct acpi_buffer in = { ··· 155 147 if (!input_length || !output_length) 156 148 return -EINVAL; 157 149 158 - status = wmidev_evaluate_method(wdev, 0x0, method, &in, &out); 159 - if (ACPI_FAILURE(status)) 160 - return -EIO; 150 + /* 151 + * The ACPI control method responsible for handling the WMI method calls 152 + * is not thread-safe. Because of this we have to do the locking ourself. 153 + */ 154 + scoped_guard(mutex, &data->wmi_lock) { 155 + status = wmidev_evaluate_method(data->wdev, 0x0, method, &in, &out); 156 + if (ACPI_FAILURE(status)) 157 + return -EIO; 158 + } 161 159 162 160 obj = out.pointer; 163 161 if (!obj) ··· 184 170 static int msi_wmi_platform_read(struct device *dev, enum hwmon_sensor_types type, u32 attr, 185 171 int channel, long *val) 186 172 { 187 - struct wmi_device *wdev = dev_get_drvdata(dev); 173 + struct msi_wmi_platform_data *data = dev_get_drvdata(dev); 188 174 u8 input[32] = { 0 }; 189 175 u8 output[32]; 190 - u16 data; 176 + u16 value; 191 177 int ret; 192 178 193 - ret = msi_wmi_platform_query(wdev, MSI_PLATFORM_GET_FAN, input, sizeof(input), output, 179 + ret = msi_wmi_platform_query(data, MSI_PLATFORM_GET_FAN, input, sizeof(input), output, 194 180 sizeof(output)); 195 181 if (ret < 0) 196 182 return ret; 197 183 198 - data = get_unaligned_be16(&output[channel * 2 + 1]); 199 - if (!data) 184 + value = get_unaligned_be16(&output[channel * 2 + 1]); 185 + if (!value) 200 186 *val = 0; 201 187 else 202 - *val = 480000 / data; 188 + *val = 480000 / value; 203 189 204 190 return 0; 205 191 } ··· 245 231 return ret; 246 232 247 233 down_write(&data->buffer_lock); 248 - ret = msi_wmi_platform_query(data->wdev, data->method, payload, data->length, data->buffer, 234 + ret = msi_wmi_platform_query(data->data, data->method, payload, data->length, data->buffer, 249 235 data->length); 250 236 up_write(&data->buffer_lock); 251 237 ··· 291 277 debugfs_remove_recursive(dir); 292 278 } 293 279 294 - static void msi_wmi_platform_debugfs_add(struct wmi_device *wdev, struct dentry *dir, 280 + static void msi_wmi_platform_debugfs_add(struct msi_wmi_platform_data *drvdata, struct dentry *dir, 295 281 const char *name, enum msi_wmi_platform_method method) 296 282 { 297 283 struct msi_wmi_platform_debugfs_data *data; 298 284 struct dentry *entry; 299 285 300 - data = devm_kzalloc(&wdev->dev, sizeof(*data), GFP_KERNEL); 286 + data = devm_kzalloc(&drvdata->wdev->dev, sizeof(*data), GFP_KERNEL); 301 287 if (!data) 302 288 return; 303 289 304 - data->wdev = wdev; 290 + data->data = drvdata; 305 291 data->method = method; 306 292 init_rwsem(&data->buffer_lock); 307 293 ··· 312 298 313 299 entry = debugfs_create_file(name, 0600, dir, data, &msi_wmi_platform_debugfs_fops); 314 300 if (IS_ERR(entry)) 315 - devm_kfree(&wdev->dev, data); 301 + devm_kfree(&drvdata->wdev->dev, data); 316 302 } 317 303 318 - static void msi_wmi_platform_debugfs_init(struct wmi_device *wdev) 304 + static void msi_wmi_platform_debugfs_init(struct msi_wmi_platform_data *data) 319 305 { 320 306 struct dentry *dir; 321 307 char dir_name[64]; 322 308 int ret, method; 323 309 324 - scnprintf(dir_name, ARRAY_SIZE(dir_name), "%s-%s", DRIVER_NAME, dev_name(&wdev->dev)); 310 + scnprintf(dir_name, ARRAY_SIZE(dir_name), "%s-%s", DRIVER_NAME, dev_name(&data->wdev->dev)); 325 311 326 312 dir = debugfs_create_dir(dir_name, NULL); 327 313 if (IS_ERR(dir)) 328 314 return; 329 315 330 - ret = devm_add_action_or_reset(&wdev->dev, msi_wmi_platform_debugfs_remove, dir); 316 + ret = devm_add_action_or_reset(&data->wdev->dev, msi_wmi_platform_debugfs_remove, dir); 331 317 if (ret < 0) 332 318 return; 333 319 334 320 for (method = MSI_PLATFORM_GET_PACKAGE; method <= MSI_PLATFORM_GET_WMI; method++) 335 - msi_wmi_platform_debugfs_add(wdev, dir, msi_wmi_platform_debugfs_names[method - 1], 321 + msi_wmi_platform_debugfs_add(data, dir, msi_wmi_platform_debugfs_names[method - 1], 336 322 method); 337 323 } 338 324 339 - static int msi_wmi_platform_hwmon_init(struct wmi_device *wdev) 325 + static int msi_wmi_platform_hwmon_init(struct msi_wmi_platform_data *data) 340 326 { 341 327 struct device *hdev; 342 328 343 - hdev = devm_hwmon_device_register_with_info(&wdev->dev, "msi_wmi_platform", wdev, 329 + hdev = devm_hwmon_device_register_with_info(&data->wdev->dev, "msi_wmi_platform", data, 344 330 &msi_wmi_platform_chip_info, NULL); 345 331 346 332 return PTR_ERR_OR_ZERO(hdev); 347 333 } 348 334 349 - static int msi_wmi_platform_ec_init(struct wmi_device *wdev) 335 + static int msi_wmi_platform_ec_init(struct msi_wmi_platform_data *data) 350 336 { 351 337 u8 input[32] = { 0 }; 352 338 u8 output[32]; 353 339 u8 flags; 354 340 int ret; 355 341 356 - ret = msi_wmi_platform_query(wdev, MSI_PLATFORM_GET_EC, input, sizeof(input), output, 342 + ret = msi_wmi_platform_query(data, MSI_PLATFORM_GET_EC, input, sizeof(input), output, 357 343 sizeof(output)); 358 344 if (ret < 0) 359 345 return ret; 360 346 361 347 flags = output[MSI_PLATFORM_EC_FLAGS_OFFSET]; 362 348 363 - dev_dbg(&wdev->dev, "EC RAM version %lu.%lu\n", 349 + dev_dbg(&data->wdev->dev, "EC RAM version %lu.%lu\n", 364 350 FIELD_GET(MSI_PLATFORM_EC_MAJOR_MASK, flags), 365 351 FIELD_GET(MSI_PLATFORM_EC_MINOR_MASK, flags)); 366 - dev_dbg(&wdev->dev, "EC firmware version %.28s\n", 352 + dev_dbg(&data->wdev->dev, "EC firmware version %.28s\n", 367 353 &output[MSI_PLATFORM_EC_VERSION_OFFSET]); 368 354 369 355 if (!(flags & MSI_PLATFORM_EC_IS_TIGERLAKE)) { 370 356 if (!force) 371 357 return -ENODEV; 372 358 373 - dev_warn(&wdev->dev, "Loading on a non-Tigerlake platform\n"); 359 + dev_warn(&data->wdev->dev, "Loading on a non-Tigerlake platform\n"); 374 360 } 375 361 376 362 return 0; 377 363 } 378 364 379 - static int msi_wmi_platform_init(struct wmi_device *wdev) 365 + static int msi_wmi_platform_init(struct msi_wmi_platform_data *data) 380 366 { 381 367 u8 input[32] = { 0 }; 382 368 u8 output[32]; 383 369 int ret; 384 370 385 - ret = msi_wmi_platform_query(wdev, MSI_PLATFORM_GET_WMI, input, sizeof(input), output, 371 + ret = msi_wmi_platform_query(data, MSI_PLATFORM_GET_WMI, input, sizeof(input), output, 386 372 sizeof(output)); 387 373 if (ret < 0) 388 374 return ret; 389 375 390 - dev_dbg(&wdev->dev, "WMI interface version %u.%u\n", 376 + dev_dbg(&data->wdev->dev, "WMI interface version %u.%u\n", 391 377 output[MSI_PLATFORM_WMI_MAJOR_OFFSET], 392 378 output[MSI_PLATFORM_WMI_MINOR_OFFSET]); 393 379 ··· 395 381 if (!force) 396 382 return -ENODEV; 397 383 398 - dev_warn(&wdev->dev, "Loading despite unsupported WMI interface version (%u.%u)\n", 384 + dev_warn(&data->wdev->dev, 385 + "Loading despite unsupported WMI interface version (%u.%u)\n", 399 386 output[MSI_PLATFORM_WMI_MAJOR_OFFSET], 400 387 output[MSI_PLATFORM_WMI_MINOR_OFFSET]); 401 388 } ··· 406 391 407 392 static int msi_wmi_platform_probe(struct wmi_device *wdev, const void *context) 408 393 { 394 + struct msi_wmi_platform_data *data; 409 395 int ret; 410 396 411 - ret = msi_wmi_platform_init(wdev); 397 + data = devm_kzalloc(&wdev->dev, sizeof(*data), GFP_KERNEL); 398 + if (!data) 399 + return -ENOMEM; 400 + 401 + data->wdev = wdev; 402 + dev_set_drvdata(&wdev->dev, data); 403 + 404 + ret = devm_mutex_init(&wdev->dev, &data->wmi_lock); 412 405 if (ret < 0) 413 406 return ret; 414 407 415 - ret = msi_wmi_platform_ec_init(wdev); 408 + ret = msi_wmi_platform_init(data); 416 409 if (ret < 0) 417 410 return ret; 418 411 419 - msi_wmi_platform_debugfs_init(wdev); 412 + ret = msi_wmi_platform_ec_init(data); 413 + if (ret < 0) 414 + return ret; 420 415 421 - return msi_wmi_platform_hwmon_init(wdev); 416 + msi_wmi_platform_debugfs_init(data); 417 + 418 + return msi_wmi_platform_hwmon_init(data); 422 419 } 423 420 424 421 static const struct wmi_device_id msi_wmi_platform_id_table[] = {
+2
drivers/platform/x86/thinkpad_acpi.c
··· 11519 11519 tp->vendor = PCI_VENDOR_ID_IBM; 11520 11520 else if (dmi_name_in_vendors("LENOVO")) 11521 11521 tp->vendor = PCI_VENDOR_ID_LENOVO; 11522 + else if (dmi_name_in_vendors("NEC")) 11523 + tp->vendor = PCI_VENDOR_ID_LENOVO; 11522 11524 else 11523 11525 return 0; 11524 11526
+13 -1
drivers/platform/x86/x86-android-tablets/dmi.c
··· 180 180 .driver_data = (void *)&peaq_c1010_info, 181 181 }, 182 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 + }, 194 + { 183 195 /* Vexia Edu Atla 10 tablet 9V version */ 184 196 .matches = { 185 197 DMI_MATCH(DMI_BOARD_VENDOR, "AMI Corporation"), ··· 199 187 /* Above strings are too generic, also match on BIOS date */ 200 188 DMI_MATCH(DMI_BIOS_DATE, "08/25/2014"), 201 189 }, 202 - .driver_data = (void *)&vexia_edu_atla10_info, 190 + .driver_data = (void *)&vexia_edu_atla10_9v_info, 203 191 }, 204 192 { 205 193 /* Whitelabel (sold as various brands) TM800A550L */
+110 -50
drivers/platform/x86/x86-android-tablets/other.c
··· 599 599 }; 600 600 601 601 /* 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 603 * distributed to schools in the Spanish Andalucía region. 604 604 */ 605 - static const char * const crystal_cove_pwrsrc_psy[] = { "crystal_cove_pwrsrc" }; 606 - 607 - static const struct property_entry vexia_edu_atla10_ulpmc_props[] = { 608 - PROPERTY_ENTRY_STRING_ARRAY("supplied-from", crystal_cove_pwrsrc_psy), 609 - { } 610 - }; 611 - 612 - static const struct software_node vexia_edu_atla10_ulpmc_node = { 613 - .properties = vexia_edu_atla10_ulpmc_props, 614 - }; 615 - 616 - static const char * const vexia_edu_atla10_accel_mount_matrix[] = { 617 - "0", "-1", "0", 618 - "1", "0", "0", 619 - "0", "0", "1" 620 - }; 621 - 622 - static const struct property_entry vexia_edu_atla10_accel_props[] = { 623 - PROPERTY_ENTRY_STRING_ARRAY("mount-matrix", vexia_edu_atla10_accel_mount_matrix), 624 - { } 625 - }; 626 - 627 - static const struct software_node vexia_edu_atla10_accel_node = { 628 - .properties = vexia_edu_atla10_accel_props, 629 - }; 630 - 631 - static const struct property_entry vexia_edu_atla10_touchscreen_props[] = { 605 + static const struct property_entry vexia_edu_atla10_5v_touchscreen_props[] = { 632 606 PROPERTY_ENTRY_U32("hid-descr-addr", 0x0000), 633 607 PROPERTY_ENTRY_U32("post-reset-deassert-delay-ms", 120), 634 608 { } 635 609 }; 636 610 637 - static const struct software_node vexia_edu_atla10_touchscreen_node = { 638 - .properties = vexia_edu_atla10_touchscreen_props, 611 + static const struct software_node vexia_edu_atla10_5v_touchscreen_node = { 612 + .properties = vexia_edu_atla10_5v_touchscreen_props, 639 613 }; 640 614 641 - static const struct property_entry vexia_edu_atla10_pmic_props[] = { 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 663 + * distributed to schools in the Spanish Andalucía region. 664 + */ 665 + static const char * const crystal_cove_pwrsrc_psy[] = { "crystal_cove_pwrsrc" }; 666 + 667 + static const struct property_entry vexia_edu_atla10_9v_ulpmc_props[] = { 668 + PROPERTY_ENTRY_STRING_ARRAY("supplied-from", crystal_cove_pwrsrc_psy), 669 + { } 670 + }; 671 + 672 + static const struct software_node vexia_edu_atla10_9v_ulpmc_node = { 673 + .properties = vexia_edu_atla10_9v_ulpmc_props, 674 + }; 675 + 676 + static const char * const vexia_edu_atla10_9v_accel_mount_matrix[] = { 677 + "0", "-1", "0", 678 + "1", "0", "0", 679 + "0", "0", "1" 680 + }; 681 + 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), 684 + { } 685 + }; 686 + 687 + static const struct software_node vexia_edu_atla10_9v_accel_node = { 688 + .properties = vexia_edu_atla10_9v_accel_props, 689 + }; 690 + 691 + static const struct property_entry vexia_edu_atla10_9v_touchscreen_props[] = { 692 + PROPERTY_ENTRY_U32("hid-descr-addr", 0x0000), 693 + PROPERTY_ENTRY_U32("post-reset-deassert-delay-ms", 120), 694 + { } 695 + }; 696 + 697 + static const struct software_node vexia_edu_atla10_9v_touchscreen_node = { 698 + .properties = vexia_edu_atla10_9v_touchscreen_props, 699 + }; 700 + 701 + static const struct property_entry vexia_edu_atla10_9v_pmic_props[] = { 642 702 PROPERTY_ENTRY_BOOL("linux,register-pwrsrc-power_supply"), 643 703 { } 644 704 }; 645 705 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, 648 708 }; 649 709 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 = { 651 711 { 652 712 /* I2C attached embedded controller, used to access fuel-gauge */ 653 713 .board_info = { 654 714 .type = "vexia_atla10_ec", 655 715 .addr = 0x76, 656 716 .dev_name = "ulpmc", 657 - .swnode = &vexia_edu_atla10_ulpmc_node, 717 + .swnode = &vexia_edu_atla10_9v_ulpmc_node, 658 718 }, 659 719 .adapter_path = "0000:00:18.1", 660 720 }, { ··· 739 679 .type = "kxtj21009", 740 680 .addr = 0x0f, 741 681 .dev_name = "kxtj21009", 742 - .swnode = &vexia_edu_atla10_accel_node, 682 + .swnode = &vexia_edu_atla10_9v_accel_node, 743 683 }, 744 684 .adapter_path = "0000:00:18.5", 745 685 }, { ··· 748 688 .type = "hid-over-i2c", 749 689 .addr = 0x38, 750 690 .dev_name = "FTSC1000", 751 - .swnode = &vexia_edu_atla10_touchscreen_node, 691 + .swnode = &vexia_edu_atla10_9v_touchscreen_node, 752 692 }, 753 693 .adapter_path = "0000:00:18.6", 754 694 .irq_data = { ··· 763 703 .type = "intel_soc_pmic_crc", 764 704 .addr = 0x6e, 765 705 .dev_name = "intel_soc_pmic_crc", 766 - .swnode = &vexia_edu_atla10_pmic_node, 706 + .swnode = &vexia_edu_atla10_9v_pmic_node, 767 707 }, 768 708 .adapter_path = "0000:00:18.7", 769 709 .irq_data = { ··· 775 715 } 776 716 }; 777 717 778 - static const struct x86_serdev_info vexia_edu_atla10_serdevs[] __initconst = { 718 + static const struct x86_serdev_info vexia_edu_atla10_9v_serdevs[] __initconst = { 779 719 { 780 720 .ctrl.pci.devfn = PCI_DEVFN(0x1e, 3), 781 721 .ctrl_devname = "serial0", ··· 783 723 }, 784 724 }; 785 725 786 - static struct gpiod_lookup_table vexia_edu_atla10_ft5416_gpios = { 726 + static struct gpiod_lookup_table vexia_edu_atla10_9v_ft5416_gpios = { 787 727 .dev_id = "i2c-FTSC1000", 788 728 .table = { 789 729 GPIO_LOOKUP("INT33FC:00", 60, "reset", GPIO_ACTIVE_LOW), ··· 791 731 }, 792 732 }; 793 733 794 - static struct gpiod_lookup_table * const vexia_edu_atla10_gpios[] = { 795 - &vexia_edu_atla10_ft5416_gpios, 734 + static struct gpiod_lookup_table * const vexia_edu_atla10_9v_gpios[] = { 735 + &vexia_edu_atla10_9v_ft5416_gpios, 796 736 NULL 797 737 }; 798 738 799 - static int __init vexia_edu_atla10_init(struct device *dev) 739 + static int __init vexia_edu_atla10_9v_init(struct device *dev) 800 740 { 801 741 struct pci_dev *pdev; 802 742 int ret; ··· 820 760 return 0; 821 761 } 822 762 823 - const struct x86_dev_info vexia_edu_atla10_info __initconst = { 824 - .i2c_client_info = vexia_edu_atla10_i2c_clients, 825 - .i2c_client_count = ARRAY_SIZE(vexia_edu_atla10_i2c_clients), 826 - .serdev_info = vexia_edu_atla10_serdevs, 827 - .serdev_count = ARRAY_SIZE(vexia_edu_atla10_serdevs), 828 - .gpiod_lookup_tables = vexia_edu_atla10_gpios, 829 - .init = vexia_edu_atla10_init, 763 + const struct x86_dev_info vexia_edu_atla10_9v_info __initconst = { 764 + .i2c_client_info = vexia_edu_atla10_9v_i2c_clients, 765 + .i2c_client_count = ARRAY_SIZE(vexia_edu_atla10_9v_i2c_clients), 766 + .serdev_info = vexia_edu_atla10_9v_serdevs, 767 + .serdev_count = ARRAY_SIZE(vexia_edu_atla10_9v_serdevs), 768 + .gpiod_lookup_tables = vexia_edu_atla10_9v_gpios, 769 + .init = vexia_edu_atla10_9v_init, 830 770 .use_pci = true, 831 771 }; 832 772
+2 -1
drivers/platform/x86/x86-android-tablets/x86-android-tablets.h
··· 127 127 extern const struct x86_dev_info nextbook_ares8a_info; 128 128 extern const struct x86_dev_info peaq_c1010_info; 129 129 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; 131 132 extern const struct x86_dev_info xiaomi_mipad2_info; 132 133 extern const struct dmi_system_id x86_android_tablet_ids[]; 133 134
+4
include/linux/platform_data/x86/intel_pmc_ipc.h
··· 36 36 */ 37 37 static inline int intel_pmc_ipc(struct pmc_ipc_cmd *ipc_cmd, struct pmc_ipc_rbuf *rbuf) 38 38 { 39 + #ifdef CONFIG_ACPI 39 40 struct acpi_buffer buffer = { ACPI_ALLOCATE_BUFFER, NULL }; 40 41 union acpi_object params[PMC_IPCS_PARAM_COUNT] = { 41 42 {.type = ACPI_TYPE_INTEGER,}, ··· 90 89 } 91 90 92 91 return 0; 92 + #else 93 + return -ENODEV; 94 + #endif /* CONFIG_ACPI */ 93 95 } 94 96 95 97 #endif /* INTEL_PMC_IPC_H */