diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2019-05-10 13:03:47 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2019-05-10 13:03:47 -0400 |
commit | 7817ffd20a0f7fbd5971643b5ef1f577703dad11 (patch) | |
tree | 9156a783d559f37f377ff23be09f43c0bc68c450 /drivers/platform/x86/ideapad-laptop.c | |
parent | Merge tag 'fbdev-v5.2' of git://github.com/bzolnier/linux (diff) | |
parent | platform/x86: Add support for Basin Cove power button (diff) | |
download | linux-dev-7817ffd20a0f7fbd5971643b5ef1f577703dad11.tar.xz linux-dev-7817ffd20a0f7fbd5971643b5ef1f577703dad11.zip |
Merge tag 'platform-drivers-x86-v5.2-1' of git://git.infradead.org/linux-platform-drivers-x86
Pull x86 platform driver updates from Andy Shevchenko:
"Gathered pile of patches for Platform Drivers x86. No surprises and no
merge conflicts. Business as usual.
Summary:
- New driver of power button for Basin Cove PMIC.
- ASUS WMI driver has got a Fn lock mode switch support.
- Resolve a never end story with non working Wi-Fi on newer Lenovo
Ideapad computers. Now the black list is replaced with white list.
- New facility to debug S0ix failures on Intel Atom platforms. The
Intel PMC and accompanying drivers are cleaned up.
- Mellanox got a new TmFifo driver. Besides tachometer sensor and
watchdog are enabled on Mellanox platforms.
- The information of embedded controller is now recognized on new
Thinkpads. Bluetooth driver on Thinkpads is blacklisted for some
models.
- Touchscreen DMI driver extended to support 'jumper ezpad 6 pro b'
and Myria MY8307 2-in-1.
- Additionally few small fixes here and there for WMI and ACPI laptop
drivers.
- The following is an automated git shortlog grouped by driver:
- alienware-wmi:
- printing the wrong error code
- fix kfree on potentially uninitialized pointer
- asus-wmi:
- Add fn-lock mode switch support
- dell-laptop:
- fix rfkill functionality
- dell-rbtn:
- Add missing #include
- ideapad-laptop:
- Remove no_hw_rfkill_list
- intel_pmc_core:
- Allow to dump debug registers on S0ix failure
- Convert to a platform_driver
- Mark local function static
- intel_pmc_ipc:
- Don't map non-used optional resources
- Apply same width for offset definitions
- Use BIT() macro
- adding error handling
- intel_punit_ipc:
- Revert "Fix resource ioremap warning"
- mlx-platform:
- Add mlx-wdt platform driver activation
- Add support for tachometer speed register
- Add TmFifo driver for Mellanox BlueField Soc
- sony-laptop:
- Fix unintentional fall-through
- thinkpad_acpi:
- cleanup for Thinkpad ACPI led
- Mark expected switch fall-throughs
- fix spelling mistake "capabilites" -> "capabilities"
- Read EC information on newer models
- Disable Bluetooth for some machines
- touchscreen_dmi:
- Add info for 'jumper ezpad 6 pro b' touchscreen
- Add info for Myria MY8307 2-in-1"
* tag 'platform-drivers-x86-v5.2-1' of git://git.infradead.org/linux-platform-drivers-x86: (26 commits)
platform/x86: Add support for Basin Cove power button
platform/x86: asus-wmi: Add fn-lock mode switch support
platform/x86: ideapad-laptop: Remove no_hw_rfkill_list
platform/x86: touchscreen_dmi: Add info for 'jumper ezpad 6 pro b' touchscreen
platform/x86: thinkpad_acpi: cleanup for Thinkpad ACPI led
platform/x86: thinkpad_acpi: Mark expected switch fall-throughs
platform/x86: sony-laptop: Fix unintentional fall-through
platform/x86: alienware-wmi: printing the wrong error code
platform/x86: intel_pmc_core: Allow to dump debug registers on S0ix failure
platform/x86: intel_pmc_core: Convert to a platform_driver
platform/x86: mlx-platform: Add mlx-wdt platform driver activation
platform/x86: mlx-platform: Add support for tachometer speed register
platform/mellanox: Add TmFifo driver for Mellanox BlueField Soc
platform/x86: thinkpad_acpi: fix spelling mistake "capabilites" -> "capabilities"
platform/x86: intel_punit_ipc: Revert "Fix resource ioremap warning"
platform/x86: intel_pmc_ipc: Don't map non-used optional resources
platform/x86: intel_pmc_ipc: Apply same width for offset definitions
platform/x86: intel_pmc_ipc: Use BIT() macro
platform/x86: alienware-wmi: fix kfree on potentially uninitialized pointer
platform/x86: dell-laptop: fix rfkill functionality
...
Diffstat (limited to 'drivers/platform/x86/ideapad-laptop.c')
-rw-r--r-- | drivers/platform/x86/ideapad-laptop.c | 321 |
1 files changed, 15 insertions, 306 deletions
diff --git a/drivers/platform/x86/ideapad-laptop.c b/drivers/platform/x86/ideapad-laptop.c index c53ae86b59c7..2d94536dea88 100644 --- a/drivers/platform/x86/ideapad-laptop.c +++ b/drivers/platform/x86/ideapad-laptop.c @@ -980,312 +980,21 @@ static void ideapad_wmi_notify(u32 value, void *context) #endif /* - * Some ideapads don't have a hardware rfkill switch, reading VPCCMD_R_RF - * always results in 0 on these models, causing ideapad_laptop to wrongly - * report all radios as hardware-blocked. + * Some ideapads have a hardware rfkill switch, but most do not have one. + * Reading VPCCMD_R_RF always results in 0 on models without a hardware rfkill, + * switch causing ideapad_laptop to wrongly report all radios as hw-blocked. + * There used to be a long list of DMI ids for models without a hw rfkill + * switch here, but that resulted in playing whack a mole. + * More importantly wrongly reporting the wifi radio as hw-blocked, results in + * non working wifi. Whereas not reporting it hw-blocked, when it actually is + * hw-blocked results in an empty SSID list, which is a much more benign + * failure mode. + * So the default now is the much safer option of assuming there is no + * hardware rfkill switch. This default also actually matches most hardware, + * since having a hw rfkill switch is quite rare on modern hardware, so this + * also leads to a much shorter list. */ -static const struct dmi_system_id no_hw_rfkill_list[] = { - { - .ident = "Lenovo RESCUER R720-15IKBN", - .matches = { - DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"), - DMI_MATCH(DMI_PRODUCT_VERSION, "Lenovo R720-15IKBN"), - }, - }, - { - .ident = "Lenovo G40-30", - .matches = { - DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"), - DMI_MATCH(DMI_PRODUCT_VERSION, "Lenovo G40-30"), - }, - }, - { - .ident = "Lenovo G50-30", - .matches = { - DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"), - DMI_MATCH(DMI_PRODUCT_VERSION, "Lenovo G50-30"), - }, - }, - { - .ident = "Lenovo V310-14IKB", - .matches = { - DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"), - DMI_MATCH(DMI_PRODUCT_VERSION, "Lenovo V310-14IKB"), - }, - }, - { - .ident = "Lenovo V310-14ISK", - .matches = { - DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"), - DMI_MATCH(DMI_PRODUCT_VERSION, "Lenovo V310-14ISK"), - }, - }, - { - .ident = "Lenovo V310-15IKB", - .matches = { - DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"), - DMI_MATCH(DMI_PRODUCT_VERSION, "Lenovo V310-15IKB"), - }, - }, - { - .ident = "Lenovo V310-15ISK", - .matches = { - DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"), - DMI_MATCH(DMI_PRODUCT_VERSION, "Lenovo V310-15ISK"), - }, - }, - { - .ident = "Lenovo V510-15IKB", - .matches = { - DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"), - DMI_MATCH(DMI_PRODUCT_VERSION, "Lenovo V510-15IKB"), - }, - }, - { - .ident = "Lenovo ideapad 300-15IBR", - .matches = { - DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"), - DMI_MATCH(DMI_PRODUCT_VERSION, "Lenovo ideapad 300-15IBR"), - }, - }, - { - .ident = "Lenovo ideapad 300-15IKB", - .matches = { - DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"), - DMI_MATCH(DMI_PRODUCT_VERSION, "Lenovo ideapad 300-15IKB"), - }, - }, - { - .ident = "Lenovo ideapad 300S-11IBR", - .matches = { - DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"), - DMI_MATCH(DMI_PRODUCT_VERSION, "Lenovo ideapad 300S-11BR"), - }, - }, - { - .ident = "Lenovo ideapad 310-15ABR", - .matches = { - DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"), - DMI_MATCH(DMI_PRODUCT_VERSION, "Lenovo ideapad 310-15ABR"), - }, - }, - { - .ident = "Lenovo ideapad 310-15IAP", - .matches = { - DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"), - DMI_MATCH(DMI_PRODUCT_VERSION, "Lenovo ideapad 310-15IAP"), - }, - }, - { - .ident = "Lenovo ideapad 310-15IKB", - .matches = { - DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"), - DMI_MATCH(DMI_PRODUCT_VERSION, "Lenovo ideapad 310-15IKB"), - }, - }, - { - .ident = "Lenovo ideapad 310-15ISK", - .matches = { - DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"), - DMI_MATCH(DMI_PRODUCT_VERSION, "Lenovo ideapad 310-15ISK"), - }, - }, - { - .ident = "Lenovo ideapad 330-15ICH", - .matches = { - DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"), - DMI_MATCH(DMI_PRODUCT_VERSION, "Lenovo ideapad 330-15ICH"), - }, - }, - { - .ident = "Lenovo ideapad 530S-14ARR", - .matches = { - DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"), - DMI_MATCH(DMI_PRODUCT_VERSION, "Lenovo ideapad 530S-14ARR"), - }, - }, - { - .ident = "Lenovo ideapad S130-14IGM", - .matches = { - DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"), - DMI_MATCH(DMI_PRODUCT_VERSION, "Lenovo ideapad S130-14IGM"), - }, - }, - { - .ident = "Lenovo ideapad Y700-14ISK", - .matches = { - DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"), - DMI_MATCH(DMI_PRODUCT_VERSION, "Lenovo ideapad Y700-14ISK"), - }, - }, - { - .ident = "Lenovo ideapad Y700-15ACZ", - .matches = { - DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"), - DMI_MATCH(DMI_PRODUCT_VERSION, "Lenovo ideapad Y700-15ACZ"), - }, - }, - { - .ident = "Lenovo ideapad Y700-15ISK", - .matches = { - DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"), - DMI_MATCH(DMI_PRODUCT_VERSION, "Lenovo ideapad Y700-15ISK"), - }, - }, - { - .ident = "Lenovo ideapad Y700 Touch-15ISK", - .matches = { - DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"), - DMI_MATCH(DMI_PRODUCT_VERSION, "Lenovo ideapad Y700 Touch-15ISK"), - }, - }, - { - .ident = "Lenovo ideapad Y700-17ISK", - .matches = { - DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"), - DMI_MATCH(DMI_PRODUCT_VERSION, "Lenovo ideapad Y700-17ISK"), - }, - }, - { - .ident = "Lenovo ideapad MIIX 720-12IKB", - .matches = { - DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"), - DMI_MATCH(DMI_PRODUCT_VERSION, "MIIX 720-12IKB"), - }, - }, - { - .ident = "Lenovo Legion Y520-15IKB", - .matches = { - DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"), - DMI_MATCH(DMI_PRODUCT_VERSION, "Lenovo Y520-15IKB"), - }, - }, - { - .ident = "Lenovo Y520-15IKBM", - .matches = { - DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"), - DMI_MATCH(DMI_PRODUCT_VERSION, "Lenovo Y520-15IKBM"), - }, - }, - { - .ident = "Lenovo Legion Y530-15ICH", - .matches = { - DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"), - DMI_MATCH(DMI_PRODUCT_VERSION, "Lenovo Legion Y530-15ICH"), - }, - }, - { - .ident = "Lenovo Legion Y530-15ICH-1060", - .matches = { - DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"), - DMI_MATCH(DMI_PRODUCT_VERSION, "Lenovo Legion Y530-15ICH-1060"), - }, - }, - { - .ident = "Lenovo Legion Y720-15IKB", - .matches = { - DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"), - DMI_MATCH(DMI_PRODUCT_VERSION, "Lenovo Y720-15IKB"), - }, - }, - { - .ident = "Lenovo Legion Y720-15IKBN", - .matches = { - DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"), - DMI_MATCH(DMI_PRODUCT_VERSION, "Lenovo Y720-15IKBN"), - }, - }, - { - .ident = "Lenovo Y720-15IKBM", - .matches = { - DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"), - DMI_MATCH(DMI_PRODUCT_VERSION, "Lenovo Y720-15IKBM"), - }, - }, - { - .ident = "Lenovo Yoga 2 11 / 13 / Pro", - .matches = { - DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"), - DMI_MATCH(DMI_PRODUCT_VERSION, "Lenovo Yoga 2"), - }, - }, - { - .ident = "Lenovo Yoga 2 11 / 13 / Pro", - .matches = { - DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"), - DMI_MATCH(DMI_BOARD_NAME, "Yoga2"), - }, - }, - { - .ident = "Lenovo Yoga 2 13", - .matches = { - DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"), - DMI_MATCH(DMI_PRODUCT_VERSION, "Yoga 2 13"), - }, - }, - { - .ident = "Lenovo Yoga 3 1170 / 1470", - .matches = { - DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"), - DMI_MATCH(DMI_PRODUCT_VERSION, "Lenovo Yoga 3"), - }, - }, - { - .ident = "Lenovo Yoga 3 Pro 1370", - .matches = { - DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"), - DMI_MATCH(DMI_PRODUCT_VERSION, "Lenovo YOGA 3"), - }, - }, - { - .ident = "Lenovo Yoga 700", - .matches = { - DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"), - DMI_MATCH(DMI_PRODUCT_VERSION, "Lenovo YOGA 700"), - }, - }, - { - .ident = "Lenovo Yoga 900", - .matches = { - DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"), - DMI_MATCH(DMI_PRODUCT_VERSION, "Lenovo YOGA 900"), - }, - }, - { - .ident = "Lenovo Yoga 900", - .matches = { - DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"), - DMI_MATCH(DMI_BOARD_NAME, "VIUU4"), - }, - }, - { - .ident = "Lenovo YOGA 910-13IKB", - .matches = { - DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"), - DMI_MATCH(DMI_PRODUCT_VERSION, "Lenovo YOGA 910-13IKB"), - }, - }, - { - .ident = "Lenovo YOGA 920-13IKB", - .matches = { - DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"), - DMI_MATCH(DMI_PRODUCT_VERSION, "Lenovo YOGA 920-13IKB"), - }, - }, - { - .ident = "Lenovo YOGA C930-13IKB", - .matches = { - DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"), - DMI_MATCH(DMI_PRODUCT_VERSION, "Lenovo YOGA C930-13IKB"), - }, - }, - { - .ident = "Lenovo Zhaoyang E42-80", - .matches = { - DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"), - DMI_MATCH(DMI_PRODUCT_VERSION, "ZHAOYANG E42-80"), - }, - }, +static const struct dmi_system_id hw_rfkill_list[] = { {} }; @@ -1311,7 +1020,7 @@ static int ideapad_acpi_add(struct platform_device *pdev) priv->cfg = cfg; priv->adev = adev; priv->platform_device = pdev; - priv->has_hw_rfkill_switch = !dmi_check_system(no_hw_rfkill_list); + priv->has_hw_rfkill_switch = dmi_check_system(hw_rfkill_list); ret = ideapad_sysfs_init(priv); if (ret) |