]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
Merge branches 'acpi-bus', 'acpi-button', 'acpi-sysfs' and 'acpi-misc'
authorRafael J. Wysocki <rafael.j.wysocki@intel.com>
Wed, 4 Dec 2019 09:24:33 +0000 (10:24 +0100)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Wed, 4 Dec 2019 09:24:33 +0000 (10:24 +0100)
* acpi-bus:
  ACPI: bus: Fix NULL pointer check in acpi_bus_get_private_data()

* acpi-button:
  ACPI: button: Add DMI quirk for Acer Switch 10 SW5-032 lid-switch

* acpi-sysfs:
  ACPI: sysfs: Change ACPI_MASKABLE_GPE_MAX to 0x100

* acpi-misc:
  ACPI: Fix Kconfig indentation

Documentation/admin-guide/kernel-parameters.txt
drivers/acpi/Kconfig
drivers/acpi/bus.c
drivers/acpi/button.c
drivers/acpi/sysfs.c

index 122f2d2f3e96bf800043b0bca1b1efa72977c327..9c23934c28a9e601accb23598f8e4233b4f5ab9c 100644 (file)
                        the GPE dispatcher.
                        This facility can be used to prevent such uncontrolled
                        GPE floodings.
-                       Format: <int>
+                       Format: <byte>
 
        acpi_no_auto_serialize  [HW,ACPI]
                        Disable auto-serialization of AML methods
index 4fb97511a16f53089adfd21e14a66e7b41a9f7b7..002838d23b86672ddf7899ac67dfbaa55f2ebdd6 100644 (file)
@@ -104,9 +104,9 @@ config ACPI_PROCFS_POWER
        depends on X86 && PROC_FS
        help
          For backwards compatibility, this option allows
-          deprecated power /proc/acpi/ directories to exist, even when
-          they have been replaced by functions in /sys.
-          The deprecated directories (and their replacements) include:
+         deprecated power /proc/acpi/ directories to exist, even when
+         they have been replaced by functions in /sys.
+         The deprecated directories (and their replacements) include:
          /proc/acpi/battery/* (/sys/class/power_supply/*) and
          /proc/acpi/ac_adapter/* (sys/class/power_supply/*).
          This option has no effect on /proc/acpi/ directories
@@ -448,7 +448,7 @@ config ACPI_CUSTOM_METHOD
 config ACPI_BGRT
        bool "Boottime Graphics Resource Table support"
        depends on EFI && (X86 || ARM64)
-        help
+       help
          This driver adds support for exposing the ACPI Boottime Graphics
          Resource Table, which allows the operating system to obtain
          data from the firmware boot splash. It will appear under
index 48bc96d45babd103672cd7dacf996da8fd8c0890..54002670cb7a15b59ef3ea424e8af6e2c199c3fc 100644 (file)
@@ -153,7 +153,7 @@ int acpi_bus_get_private_data(acpi_handle handle, void **data)
 {
        acpi_status status;
 
-       if (!*data)
+       if (!data)
                return -EINVAL;
 
        status = acpi_get_data(handle, acpi_bus_private_data_handler, data);
index d27b01c0323d05ab402f3f5c39e252bba1be468c..b758b45737f50ff5ce1d9a816f7a7164ed8525b1 100644 (file)
@@ -77,6 +77,19 @@ MODULE_DEVICE_TABLE(acpi, button_device_ids);
 
 /* Please keep this list sorted alphabetically by vendor and model */
 static const struct dmi_system_id dmi_lid_quirks[] = {
+       {
+               /*
+                * Acer Switch 10 SW5-012. _LID method messes with home and
+                * power button GPIO IRQ settings causing an interrupt storm on
+                * both GPIOs. This is unfixable without a DSDT override, so we
+                * have to disable the lid-switch functionality altogether :|
+                */
+               .matches = {
+                       DMI_MATCH(DMI_SYS_VENDOR, "Acer"),
+                       DMI_MATCH(DMI_PRODUCT_NAME, "Aspire SW5-012"),
+               },
+               .driver_data = (void *)(long)ACPI_BUTTON_LID_INIT_DISABLED,
+       },
        {
                /*
                 * Asus T200TA, _LID keeps reporting closed after every second
index 75948a3f1a20e7dffe04958e6905305afd12df96..c60d2c6d31d6facf1cf29e26724a0624f7e7ae2d 100644 (file)
@@ -819,14 +819,14 @@ end:
  * interface:
  *   echo unmask > /sys/firmware/acpi/interrupts/gpe00
  */
-#define ACPI_MASKABLE_GPE_MAX  0xFF
+#define ACPI_MASKABLE_GPE_MAX  0x100
 static DECLARE_BITMAP(acpi_masked_gpes_map, ACPI_MASKABLE_GPE_MAX) __initdata;
 
 static int __init acpi_gpe_set_masked_gpes(char *val)
 {
        u8 gpe;
 
-       if (kstrtou8(val, 0, &gpe) || gpe > ACPI_MASKABLE_GPE_MAX)
+       if (kstrtou8(val, 0, &gpe))
                return -EINVAL;
        set_bit(gpe, acpi_masked_gpes_map);
 
@@ -838,7 +838,7 @@ void __init acpi_gpe_apply_masked_gpes(void)
 {
        acpi_handle handle;
        acpi_status status;
-       u8 gpe;
+       u16 gpe;
 
        for_each_set_bit(gpe, acpi_masked_gpes_map, ACPI_MASKABLE_GPE_MAX) {
                status = acpi_get_gpe_device(gpe, &handle);