kernel_optimize_test/drivers/platform/x86
João Paulo Rechi Vita 4b7fb9fcf9 platform/x86: asus-wireless: Use per-HID HSWC parameters
Some Asus machines use 0x4/0x5 as their LED on/off values, while others
use 0x0/0x1, as shown in the DSDT excerpts below. Luckily it seems this
behavior is tied to different HIDs, after looking at 44 DSDTs from
different Asus models.

Another small difference is that a few of them call GWBL instead of
OWGS, and SWBL instead of OWGD. That does not seem to make a difference
for asus-wireless, and is additional reasoning to not try to call these
methods directly.

Device (ASHS)                       | Device (ASHS)
{                                   | {
    Name (_HID, "ATK4002")          |     Name (_HID, "ATK4001")
    Method (HSWC, 1, Serialized)    |     Method (HSWC, 1, Serialized)
    {                               |     {
        If ((Arg0 < 0x02))          |         If ((Arg0 < 0x02))
        {                           |         {
            OWGD (Arg0)             |             OWGD (Arg0)
            Return (One)            |             Return (One)
        }                           |         }
        If ((Arg0 == 0x02))         |
        {                           |         If ((Arg0 == 0x02))
            Local0 = OWGS ()        |         {
            If (Local0)             |             Return (OWGS ())
            {                       |         }
                    Return (0x05)   |
            }                       |         If ((Arg0 == 0x03))
            Else                    |         {
            {                       |             Return (0xFF)
                    Return (0x04)   |         }
            }                       |
        }                           |         If ((Arg0 == 0x80))
        If ((Arg0 == 0x03))         |         {
        {                           |            Return (One)
            Return (0xFF)           |         }
        }                           |     }
        If ((Arg0 == 0x04))         |     Method (_STA, 0, NotSerialized)
        {                           |     {
            OWGD (Zero)             |         If ((MSOS () >= OSW8))
            Return (One)            |         {
        }                           |             Return (0x0F)
        If ((Arg0 == 0x05))         |         }
        {                           |         Else
            OWGD (One)              |         {
            Return (One)            |             Return (Zero)
        }                           |         }
        If ((Arg0 == 0x80))         |     }
        {                           | }
            Return (One)            |
        }                           |
    }                               |
    Method (_STA, 0, NotSerialized) |
    {                               |
        If ((MSOS () >= OSW8))      |
        {                           |
            Return (0x0F)           |
        }                           |
        Else                        |
        {                           |
            Return (Zero)           |
        }                           |
    }                               |
}                                   |

Signed-off-by: João Paulo Rechi Vita <jprvita@endlessm.com>
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
2017-02-24 23:48:48 -08:00
..
acer-wmi.c platform/x86: acer-wmi: setup accelerometer when machine has appropriate notify event 2017-02-03 14:04:53 +02:00
acerhdf.c thermal: Enhance thermal_zone_device_update for events 2016-09-27 14:35:21 +08:00
alienware-wmi.c platform/x86: alienware-wmi: Remove header duplicate 2017-02-24 23:48:46 -08:00
amilo-rfkill.c
apple-gmux.c apple-gmux: Sphinxify docs 2016-07-28 10:04:03 +02:00
asus-laptop.c platform/x86: asus-laptop: get rid of parse_arg() 2016-09-23 16:20:44 -07:00
asus-nb-wmi.c platform/x86: asus-nb-wmi.c: Add X45U quirk 2016-12-13 09:29:04 -08:00
asus-wireless.c platform/x86: asus-wireless: Use per-HID HSWC parameters 2017-02-24 23:48:48 -08:00
asus-wmi.c platform/x86: asus-wmi: Set specified XUSB2PR value for X550LB 2016-12-13 09:29:03 -08:00
asus-wmi.h platform/x86: asus-wmi: Set specified XUSB2PR value for X550LB 2016-12-13 09:29:03 -08:00
classmate-laptop.c
compal-laptop.c
dell-laptop.c platform/x86: dell-laptop: Use brightness_set_blocking for kbd_led_level_set 2016-12-13 09:29:08 -08:00
dell-rbtn.c dell-rbtn: Ignore ACPI notifications if device is suspended 2016-05-27 11:47:56 -07:00
dell-rbtn.h
dell-smbios.c
dell-smbios.h
dell-smo8800.c x86: separate extable.h, switch sections.h to it 2016-09-27 21:15:23 -04:00
dell-wmi-aio.c
dell-wmi.c platform/x86: dell-wmi: Add events created by Dell Rugged 2-in-1s 2016-12-13 09:29:00 -08:00
eeepc-laptop.c
eeepc-wmi.c
fujitsu-laptop.c platform/x86: fujitsu-laptop: make hotkey handling functions more similar 2017-02-04 02:47:19 +01:00
fujitsu-tablet.c
hdaps.c
hp_accel.c platform/x86: hp_accel: Add support for HP ZBook 17 2017-02-03 14:04:53 +02:00
hp-wireless.c
hp-wmi.c hp-wmi: Fix wifi cannot be hard-unblocked 2016-06-28 22:18:32 -07:00
ibm_rtl.c
ideapad-laptop.c platform/x86: ideapad-laptop: handle ACPI event 1 2017-01-22 12:47:06 +02:00
intel_bxtwc_tmu.c platform/x86: Add Whiskey Cove PMIC TMU support 2016-12-18 14:56:37 -08:00
intel_ips.c
intel_ips.h
intel_menlow.c intel_menlow: reduce code duplication 2016-05-27 11:47:55 -07:00
intel_mid_powerbtn.c platform/x86: intel_mid_powerbtn: Use SCU IPC directly 2017-02-24 23:48:45 -08:00
intel_mid_thermal.c platform/x86: intel_mid_thermal: Fix module autoload 2017-02-03 14:04:53 +02:00
intel_oaktrail.c
intel_pmc_core.c platform/x86: intel_pmc_core: fix out-of-bounds accesses on stack 2017-02-14 00:39:48 +02:00
intel_pmc_core.h platform/x86: intel_pmc_core: Add LTR IGNORE debug feature 2016-12-13 09:28:58 -08:00
intel_pmc_ipc.c platform/x86: intel_pmc_ipc: Add APL PMC PCI Id 2017-02-24 23:48:47 -08:00
intel_pmic_gpio.c intel_pmic_gpio: Make explicitly non-modular 2016-08-28 22:31:52 -07:00
intel_punit_ipc.c platform:x86 decouple telemetry driver from the optional IPC resources 2016-04-19 13:51:41 -07:00
intel_scu_ipc.c
intel_scu_ipcutil.c
intel_telemetry_core.c intel_telemetry: Constify telemetry_core_ops structures 2016-05-05 13:58:55 -07:00
intel_telemetry_debugfs.c platform-drivers-x86 for 4.8-1 2016-07-26 17:23:08 -07:00
intel_telemetry_pltdrv.c platform-drivers-x86 for 4.8-1 2016-07-26 17:23:08 -07:00
intel_turbo_max_3.c platform/x86: Support Turbo Boost Max 3.0 for non HWP systems 2017-02-04 02:47:20 +01:00
intel-hid.c platform-drivers-x86 for 4.10-1 2016-12-15 13:31:25 -08:00
intel-rst.c
intel-smartconnect.c platform/x86: Use ACPI_FAILURE at appropriate places 2016-12-13 09:29:01 -08:00
intel-vbtn.c platform-drivers-x86 for 4.10-1 2016-12-15 13:31:25 -08:00
Kconfig platform/x86: silead depends on I2C being built-in 2017-02-14 00:39:48 +02:00
Makefile platform/x86: add support for devices with Silead touchscreens 2017-02-14 00:39:48 +02:00
mlx-platform.c platform/x86: mlx-platform: mlxcpld-hotplug driver style fixes 2017-02-03 14:04:53 +02:00
mlxcpld-hotplug.c platform/x86: Introduce support for Mellanox hotplug driver 2016-10-23 07:52:57 -07:00
msi-laptop.c
msi-wmi.c ktime: Cleanup ktime_set() usage 2016-12-25 17:21:22 +01:00
mxm-wmi.c
panasonic-laptop.c platform/x86: Use ACPI_FAILURE at appropriate places 2016-12-13 09:29:01 -08:00
pvpanic.c
samsung-laptop.c
samsung-q10.c
silead_dmi.c platform/x86: add support for devices with Silead touchscreens 2017-02-14 00:39:48 +02:00
sony-laptop.c Replace <asm/uaccess.h> with <linux/uaccess.h> globally 2016-12-24 11:46:01 -08:00
surface3_button.c platform/x86: Introduce button support for the Surface 3 2016-12-16 23:30:26 +02:00
surface3-wmi.c platform/x86: surface3-wmi: fix uninitialized symbol 2017-01-21 01:43:42 +02:00
surfacepro3_button.c surfacepro3_button: Add a warning when switching to tablet mode 2016-05-27 11:47:53 -07:00
tc1100-wmi.c
thinkpad_acpi.c Replace <asm/uaccess.h> with <linux/uaccess.h> globally 2016-12-24 11:46:01 -08:00
topstar-laptop.c
toshiba_acpi.c platform/x86: toshiba_acpi: Fix typo in *_cooling_method_set function 2016-08-31 17:33:33 -07:00
toshiba_bluetooth.c platform/x86: toshiba_bluetooth: Decouple an error checking status code 2016-09-23 16:21:06 -07:00
toshiba_haps.c platform/x86: toshiba_haps: Change logging level from info to debug 2016-09-23 16:21:05 -07:00
toshiba-wmi.c toshiba-wmi: Fix loading the driver on non Toshiba laptops 2016-10-19 13:25:54 -07:00
wmi.c drivers/platform/x86/wmi.c: use generic UUID library 2016-05-20 17:58:30 -07:00
xo1-rfkill.c
xo15-ebook.c