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-v3.17-1' of git://git.infradead.org/users/dvhart/linux-platform-drivers-x86

Pull x86 platform drivers fixes from Darren Hart:
"This is my first pull request since taking on maintenance for the
platform-drivers-x86 tree from Matthew Garrett. These have passed my
build testing and been run through Fengguang's LKP tests. Due to
timing this round, these have not spent any time in linux-next. I
have asked Stephen to include my for-next branch in linux-next going
forward, once he's back from vacation.

Details from tag:

- toshiba_acpi: re-enable hotkeys and cleanups
- ideapad-laptop: revert touchpad disable, and cleanup static/const
usage
- MAINTAINERS: update platform-drivers-x86 maintainer and tree"

* tag 'platform-drivers-x86-v3.17-1' of git://git.infradead.org/users/dvhart/linux-platform-drivers-x86:
toshiba_acpi: fix and cleanup toshiba_kbd_bl_mode_store()
platform/x86: toshiba: re-enable acpi hotkeys after suspend to disk
ideapad-laptop: Constify DMI table for real!
Revert "ideapad-laptop: Disable touchpad interface on Yoga models"
MAINTAINERS: Update platform-drivers-x86 maintainer and tree

+24 -38
+2 -2
MAINTAINERS
··· 10070 10070 F: arch/x86/ 10071 10071 10072 10072 X86 PLATFORM DRIVERS 10073 - M: Matthew Garrett <matthew.garrett@nebula.com> 10073 + M: Darren Hart <dvhart@infradead.org> 10074 10074 L: platform-driver-x86@vger.kernel.org 10075 - T: git git://cavan.codon.org.uk/platform-drivers-x86.git 10075 + T: git git://git.infradead.org/users/dvhart/linux-platform-drivers-x86.git 10076 10076 S: Maintained 10077 10077 F: drivers/platform/x86/ 10078 10078
+2 -29
drivers/platform/x86/ideapad-laptop.c
··· 88 88 struct dentry *debug; 89 89 unsigned long cfg; 90 90 bool has_hw_rfkill_switch; 91 - bool has_touchpad_control; 92 91 }; 93 92 94 93 static bool no_bt_rfkill; ··· 455 456 int type; 456 457 }; 457 458 458 - const const struct ideapad_rfk_data ideapad_rfk_data[] = { 459 + static const struct ideapad_rfk_data ideapad_rfk_data[] = { 459 460 { "ideapad_wlan", CFG_WIFI_BIT, VPCCMD_W_WIFI, RFKILL_TYPE_WLAN }, 460 461 { "ideapad_bluetooth", CFG_BT_BIT, VPCCMD_W_BT, RFKILL_TYPE_BLUETOOTH }, 461 462 { "ideapad_3g", CFG_3G_BIT, VPCCMD_W_3G, RFKILL_TYPE_WWAN }, ··· 766 767 { 767 768 unsigned long value; 768 769 769 - if (!priv->has_touchpad_control) 770 - return; 771 - 772 770 /* Without reading from EC touchpad LED doesn't switch state */ 773 771 if (!read_ec_data(priv->adev->handle, VPCCMD_R_TOUCHPAD, &value)) { 774 772 /* Some IdeaPads don't really turn off touchpad - they only ··· 829 833 * always results in 0 on these models, causing ideapad_laptop to wrongly 830 834 * report all radios as hardware-blocked. 831 835 */ 832 - static struct dmi_system_id no_hw_rfkill_list[] = { 833 - { 834 - .ident = "Lenovo Yoga 2 11 / 13 / Pro", 835 - .matches = { 836 - DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"), 837 - DMI_MATCH(DMI_PRODUCT_VERSION, "Lenovo Yoga 2"), 838 - }, 839 - }, 840 - {} 841 - }; 842 - 843 - /* 844 - * Some models don't offer touchpad ctrl through the ideapad interface, causing 845 - * ideapad_sync_touchpad_state to send wrong touchpad enable/disable events. 846 - */ 847 - static struct dmi_system_id no_touchpad_ctrl_list[] = { 848 - { 849 - .ident = "Lenovo Yoga 1 series", 850 - .matches = { 851 - DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"), 852 - DMI_MATCH(DMI_PRODUCT_VERSION, "Lenovo IdeaPad Yoga"), 853 - }, 854 - }, 836 + static const struct dmi_system_id no_hw_rfkill_list[] = { 855 837 { 856 838 .ident = "Lenovo Yoga 2 11 / 13 / Pro", 857 839 .matches = { ··· 863 889 priv->adev = adev; 864 890 priv->platform_device = pdev; 865 891 priv->has_hw_rfkill_switch = !dmi_check_system(no_hw_rfkill_list); 866 - priv->has_touchpad_control = !dmi_check_system(no_touchpad_ctrl_list); 867 892 868 893 ret = ideapad_sysfs_init(priv); 869 894 if (ret)
+20 -7
drivers/platform/x86/toshiba_acpi.c
··· 1255 1255 const char *buf, size_t count) 1256 1256 { 1257 1257 struct toshiba_acpi_dev *toshiba = dev_get_drvdata(dev); 1258 - int mode = -1; 1259 - int time = -1; 1258 + int mode; 1259 + int time; 1260 + int ret; 1260 1261 1261 - if (sscanf(buf, "%i", &mode) != 1 && (mode != 2 || mode != 1)) 1262 + 1263 + ret = kstrtoint(buf, 0, &mode); 1264 + if (ret) 1265 + return ret; 1266 + if (mode != SCI_KBD_MODE_FNZ && mode != SCI_KBD_MODE_AUTO) 1262 1267 return -EINVAL; 1263 1268 1264 1269 /* Set the Keyboard Backlight Mode where: ··· 1271 1266 * Auto - KBD backlight turns off automatically in given time 1272 1267 * FN-Z - KBD backlight "toggles" when hotkey pressed 1273 1268 */ 1274 - if (mode != -1 && toshiba->kbd_mode != mode) { 1269 + if (toshiba->kbd_mode != mode) { 1275 1270 time = toshiba->kbd_time << HCI_MISC_SHIFT; 1276 1271 time = time + toshiba->kbd_mode; 1277 - if (toshiba_kbd_illum_status_set(toshiba, time) < 0) 1278 - return -EIO; 1272 + ret = toshiba_kbd_illum_status_set(toshiba, time); 1273 + if (ret) 1274 + return ret; 1279 1275 toshiba->kbd_mode = mode; 1280 1276 } 1281 1277 ··· 1863 1857 { 1864 1858 struct toshiba_acpi_dev *dev = acpi_driver_data(to_acpi_device(device)); 1865 1859 u32 result; 1860 + acpi_status status; 1866 1861 1867 - if (dev->hotkey_dev) 1862 + if (dev->hotkey_dev) { 1863 + status = acpi_evaluate_object(dev->acpi_dev->handle, "ENAB", 1864 + NULL, NULL); 1865 + if (ACPI_FAILURE(status)) 1866 + pr_info("Unable to re-enable hotkeys\n"); 1867 + 1868 1868 hci_write1(dev, HCI_HOTKEY_EVENT, HCI_HOTKEY_ENABLE, &result); 1869 + } 1869 1870 1870 1871 return 0; 1871 1872 }