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

Configure Feed

Select the types of activity you want to include in your feed.

Merge tag 'platform-drivers-x86-v6.17-5' of git://git.kernel.org/pub/scm/linux/kernel/git/pdx86/platform-drivers-x86

Pull x86 platform driver fixes from Ilpo Järvinen:
"Fixes and New HW Supoort

- amd/pmc: Use 8042 quirk for Stellaris Slim Gen6 AMD

- dell: Set USTT mode according to BIOS after reboot

- dell-lis3lv02d: Add Latitude E6530

- lg-laptop: Fix setting the fan mode"

* tag 'platform-drivers-x86-v6.17-5' of git://git.kernel.org/pub/scm/linux/kernel/git/pdx86/platform-drivers-x86:
platform/x86: lg-laptop: Fix WMAB call in fan_mode_store()
platform/x86: dell-lis3lv02d: Add Latitude E6530
platform/x86/dell: Set USTT mode according to BIOS after reboot
platform/x86/amd/pmc: Add Stellaris Slim Gen6 AMD to spurious 8042 quirks list

+33 -22
+2 -2
Documentation/admin-guide/laptops/lg-laptop.rst
··· 48 48 Fan mode 49 49 -------- 50 50 51 - Writing 1/0 to /sys/devices/platform/lg-laptop/fan_mode disables/enables 52 - the fan silent mode. 51 + Writing 0/1/2 to /sys/devices/platform/lg-laptop/fan_mode sets fan mode to 52 + Optimal/Silent/Performance respectively. 53 53 54 54 55 55 USB charge
+7
drivers/platform/x86/amd/pmc/pmc-quirks.c
··· 257 257 } 258 258 }, 259 259 { 260 + .ident = "TUXEDO Stellaris Slim 15 AMD Gen6", 261 + .driver_data = &quirk_spurious_8042, 262 + .matches = { 263 + DMI_MATCH(DMI_BOARD_NAME, "GMxHGxx"), 264 + } 265 + }, 266 + { 260 267 .ident = "TUXEDO InfinityBook Pro 14/15 AMD Gen10", 261 268 .driver_data = &quirk_spurious_8042, 262 269 .matches = {
+1
drivers/platform/x86/dell/dell-lis3lv02d.c
··· 48 48 DELL_LIS3LV02D_DMI_ENTRY("Latitude 5500", 0x29), 49 49 DELL_LIS3LV02D_DMI_ENTRY("Latitude E6330", 0x29), 50 50 DELL_LIS3LV02D_DMI_ENTRY("Latitude E6430", 0x29), 51 + DELL_LIS3LV02D_DMI_ENTRY("Latitude E6530", 0x29), 51 52 DELL_LIS3LV02D_DMI_ENTRY("Precision 3540", 0x29), 52 53 DELL_LIS3LV02D_DMI_ENTRY("Precision 3551", 0x29), 53 54 DELL_LIS3LV02D_DMI_ENTRY("Precision M6800", 0x29),
+9
drivers/platform/x86/dell/dell-pc.c
··· 228 228 229 229 static int thermal_platform_profile_probe(void *drvdata, unsigned long *choices) 230 230 { 231 + int current_mode; 232 + 231 233 if (supported_modes & DELL_QUIET) 232 234 __set_bit(PLATFORM_PROFILE_QUIET, choices); 233 235 if (supported_modes & DELL_COOL_BOTTOM) ··· 238 236 __set_bit(PLATFORM_PROFILE_BALANCED, choices); 239 237 if (supported_modes & DELL_PERFORMANCE) 240 238 __set_bit(PLATFORM_PROFILE_PERFORMANCE, choices); 239 + 240 + /* Make sure that ACPI is in sync with the profile set by USTT */ 241 + current_mode = thermal_get_mode(); 242 + if (current_mode < 0) 243 + return current_mode; 244 + 245 + thermal_set_mode(current_mode); 241 246 242 247 return 0; 243 248 }
+14 -20
drivers/platform/x86/lg-laptop.c
··· 8 8 #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt 9 9 10 10 #include <linux/acpi.h> 11 + #include <linux/bitfield.h> 11 12 #include <linux/bits.h> 12 13 #include <linux/device.h> 13 14 #include <linux/dev_printk.h> ··· 75 74 #define WM_FAN_MODE 0x33 76 75 #define WMBB_USB_CHARGE 0x10B 77 76 #define WMBB_BATT_LIMIT 0x10C 77 + 78 + #define FAN_MODE_LOWER GENMASK(1, 0) 79 + #define FAN_MODE_UPPER GENMASK(5, 4) 78 80 79 81 #define PLATFORM_NAME "lg-laptop" 80 82 ··· 278 274 struct device_attribute *attr, 279 275 const char *buffer, size_t count) 280 276 { 281 - bool value; 277 + unsigned long value; 282 278 union acpi_object *r; 283 - u32 m; 284 279 int ret; 285 280 286 - ret = kstrtobool(buffer, &value); 281 + ret = kstrtoul(buffer, 10, &value); 287 282 if (ret) 288 283 return ret; 284 + if (value >= 3) 285 + return -EINVAL; 289 286 290 - r = lg_wmab(dev, WM_FAN_MODE, WM_GET, 0); 291 - if (!r) 292 - return -EIO; 293 - 294 - if (r->type != ACPI_TYPE_INTEGER) { 295 - kfree(r); 296 - return -EIO; 297 - } 298 - 299 - m = r->integer.value; 300 - kfree(r); 301 - r = lg_wmab(dev, WM_FAN_MODE, WM_SET, (m & 0xffffff0f) | (value << 4)); 302 - kfree(r); 303 - r = lg_wmab(dev, WM_FAN_MODE, WM_SET, (m & 0xfffffff0) | value); 287 + r = lg_wmab(dev, WM_FAN_MODE, WM_SET, 288 + FIELD_PREP(FAN_MODE_LOWER, value) | 289 + FIELD_PREP(FAN_MODE_UPPER, value)); 304 290 kfree(r); 305 291 306 292 return count; ··· 299 305 static ssize_t fan_mode_show(struct device *dev, 300 306 struct device_attribute *attr, char *buffer) 301 307 { 302 - unsigned int status; 308 + unsigned int mode; 303 309 union acpi_object *r; 304 310 305 311 r = lg_wmab(dev, WM_FAN_MODE, WM_GET, 0); ··· 311 317 return -EIO; 312 318 } 313 319 314 - status = r->integer.value & 0x01; 320 + mode = FIELD_GET(FAN_MODE_LOWER, r->integer.value); 315 321 kfree(r); 316 322 317 - return sysfs_emit(buffer, "%d\n", status); 323 + return sysfs_emit(buffer, "%d\n", mode); 318 324 } 319 325 320 326 static ssize_t usb_charge_store(struct device *dev,