Revision tags: v6.6.25, v6.6.24, v6.6.23, v6.6.16, v6.6.15, v6.6.14, v6.6.13, v6.6.12, v6.6.11, v6.6.10, v6.6.9, v6.6.8, v6.6.7, v6.6.6, v6.6.5, v6.6.4, v6.6.3, v6.6.2, v6.5.11, v6.6.1, v6.5.10, v6.6, v6.5.9, v6.5.8, v6.5.7, v6.5.6, v6.5.5, v6.5.4, v6.5.3, v6.5.2, v6.1.51, v6.5.1, v6.1.50, v6.5, v6.1.49, v6.1.48, v6.1.46, v6.1.45, v6.1.44, v6.1.43, v6.1.42, v6.1.41, v6.1.40, v6.1.39, v6.1.38, v6.1.37, v6.1.36, v6.4, v6.1.35, v6.1.34, v6.1.33, v6.1.32 |
|
#
e4e62d5f |
| 04-Jun-2023 |
Rafael J. Wysocki <rafael.j.wysocki@intel.com> |
ACPI: button: Use different notify handlers for lid and buttons
Since the lid handling in acpi_button_notify() is special, introduce acpi_lid_notify() specifically for handling lid notifications.
S
ACPI: button: Use different notify handlers for lid and buttons
Since the lid handling in acpi_button_notify() is special, introduce acpi_lid_notify() specifically for handling lid notifications.
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
show more ...
|
#
0d51157d |
| 04-Jun-2023 |
Rafael J. Wysocki <rafael.j.wysocki@intel.com> |
ACPI: button: Eliminate the driver notify callback
Rework the ACPI button driver to install notify handlers or fixed event handlers for the devices it binds to by itself, reduce the indentation leve
ACPI: button: Eliminate the driver notify callback
Rework the ACPI button driver to install notify handlers or fixed event handlers for the devices it binds to by itself, reduce the indentation level in its notify handler routine and drop its notify callback.
This will allow acpi_device_install_notify_handler() and acpi_device_remove_notify_handler() to be simplified going forward and it will allow the driver to use different notify handlers for the lid and for the power and sleep buttons.
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com> Reviewed-by: Michal Wilczynski <michal.wilczynski@intel.com>
show more ...
|
Revision tags: v6.1.31, v6.1.30, v6.1.29, v6.1.28, v6.1.27 |
|
#
4fd55566 |
| 29-Apr-2023 |
Hans de Goede <hdegoede@redhat.com> |
ACPI: button: Add lid disable DMI quirk for Nextbook Ares 8A
The LID0 device on the Nextbook Ares 8A tablet always reports lid closed causing userspace to suspend the device as soon as booting is co
ACPI: button: Add lid disable DMI quirk for Nextbook Ares 8A
The LID0 device on the Nextbook Ares 8A tablet always reports lid closed causing userspace to suspend the device as soon as booting is complete.
Add a DMI quirk to disable the broken lid functionality.
Signed-off-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
show more ...
|
Revision tags: v6.1.26, v6.3, v6.1.25, v6.1.24, v6.1.23, v6.1.22, v6.1.21, v6.1.20, v6.1.19, v6.1.18, v6.1.17, v6.1.16, v6.1.15, v6.1.14, v6.1.13, v6.2, v6.1.12, v6.1.11, v6.1.10, v6.1.9, v6.1.8, v6.1.7, v6.1.6, v6.1.5, v6.0.19, v6.0.18, v6.1.4, v6.1.3, v6.0.17, v6.1.2, v6.0.16, v6.1.1, v6.0.15, v6.0.14, v6.0.13, v6.1, v6.0.12, v6.0.11, v6.0.10, v5.15.80, v6.0.9, v5.15.79 |
|
#
6c0eb5ba |
| 13-Nov-2022 |
Dawei Li <set_pte_at@outlook.com> |
ACPI: make remove callback of ACPI driver void
For bus-based driver, device removal is implemented as: 1 device_remove()-> 2 bus->remove()-> 3 driver->remove()
Driver core needs no inform fro
ACPI: make remove callback of ACPI driver void
For bus-based driver, device removal is implemented as: 1 device_remove()-> 2 bus->remove()-> 3 driver->remove()
Driver core needs no inform from callee(bus driver) about the result of remove callback. In that case, commit fc7a6209d571 ("bus: Make remove callback return void") forces bus_type::remove be void-returned.
Now we have the situation that both 1 & 2 of calling chain are void-returned, so it does not make much sense for 3(driver->remove) to return non-void to its caller.
So the basic idea behind this change is making remove() callback of any bus-based driver to be void-returned.
This change, for itself, is for device drivers based on acpi-bus.
Acked-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Acked-by: Lee Jones <lee@kernel.org> Acked-by: Dmitry Torokhov <dmitry.torokhov@gmail.com> Reviewed-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Dawei Li <set_pte_at@outlook.com> Reviewed-by: Maximilian Luz <luzmaximilian@gmail.com> # for drivers/platform/surface/* Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
show more ...
|
Revision tags: v6.0.8, v5.15.78, v6.0.7, v5.15.77, v5.15.76, v6.0.6, v6.0.5, v5.15.75, v6.0.4, v6.0.3, v6.0.2, v5.15.74, v5.15.73, v6.0.1, v5.15.72, v6.0, v5.15.71, v5.15.70, v5.15.69, v5.15.68, v5.15.67, v5.15.66, v5.15.65, v5.15.64, v5.15.63, v5.15.62, v5.15.61, v5.15.60, v5.15.59, v5.19, v5.15.58, v5.15.57, v5.15.56, v5.15.55, v5.15.54, v5.15.53, v5.15.52, v5.15.51, v5.15.50, v5.15.49, v5.15.48, v5.15.47, v5.15.46, v5.15.45, v5.15.44, v5.15.43, v5.15.42, v5.18, v5.15.41, v5.15.40, v5.15.39, v5.15.38, v5.15.37, v5.15.36, v5.15.35, v5.15.34, v5.15.33, v5.15.32, v5.15.31, v5.17, v5.15.30, v5.15.29, v5.15.28, v5.15.27, v5.15.26, v5.15.25, v5.15.24, v5.15.23, v5.15.22, v5.15.21, v5.15.20, v5.15.19, v5.15.18, v5.15.17, v5.4.173, v5.15.16, v5.15.15, v5.16, v5.15.10, v5.15.9, v5.15.8, v5.15.7, v5.15.6, v5.15.5, v5.15.4, v5.15.3, v5.15.2, v5.15.1, v5.15, v5.14.14, v5.14.13, v5.14.12, v5.14.11, v5.14.10, v5.14.9, v5.14.8, v5.14.7, v5.14.6, v5.10.67, v5.10.66, v5.14.5, v5.14.4, v5.10.65, v5.14.3, v5.10.64, v5.14.2, v5.10.63, v5.14.1, v5.10.62, v5.14, v5.10.61 |
|
#
1a20d409 |
| 24-Aug-2021 |
Ulrich Huber <ulrich@huberulrich.de> |
ACPI: button: Add DMI quirk for Lenovo Yoga 9 (14INTL5)
The Lenovo Yoga 9 (14INTL5)'s ACPI _LID is bugged:
After hibernation the lid is initially reported as closed. Once closing and then reopening
ACPI: button: Add DMI quirk for Lenovo Yoga 9 (14INTL5)
The Lenovo Yoga 9 (14INTL5)'s ACPI _LID is bugged:
After hibernation the lid is initially reported as closed. Once closing and then reopening the lid reports the lid as open again. This leads to the conclusion that the initial notification of the lid is missing but subsequent notifications are correct.
In order fo the Linux LID code to handle this device properly the lid_init_state must be set to ACPI_BUTTON_LID_INIT_OPEN.
Signed-off-by: Ulrich Huber <ulrich@huberulrich.de> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
show more ...
|
Revision tags: v5.10.60, v5.10.53, v5.10.52, v5.10.51, v5.10.50, v5.10.49, v5.13, v5.10.46, v5.10.43, v5.10.42, v5.10.41, v5.10.40, v5.10.39, v5.4.119, v5.10.36, v5.10.35, v5.10.34, v5.4.116, v5.10.33, v5.12, v5.10.32, v5.10.31, v5.10.30, v5.10.27 |
|
#
effbe640 |
| 27-Mar-2021 |
Xiaofei Tan <tanxiaofei@huawei.com> |
ACPI: button: fix some coding style issues
Fix some coding style issues reported by checkpatch.pl, including the following types:
WARNING: Block comments use * on subsequent lines WARNING: Block co
ACPI: button: fix some coding style issues
Fix some coding style issues reported by checkpatch.pl, including the following types:
WARNING: Block comments use * on subsequent lines WARNING: Block comments use a trailing */ on a separate line ERROR: code indent should use tabs where possible
Signed-off-by: Xiaofei Tan <tanxiaofei@huawei.com> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
show more ...
|
Revision tags: v5.10.26, v5.10.25, v5.10.24, v5.10.23, v5.10.22, v5.10.21, v5.10.20, v5.10.19, v5.4.101, v5.10.18, v5.10.17, v5.11, v5.10.16, v5.10.15, v5.10.14 |
|
#
411e3216 |
| 03-Feb-2021 |
Rafael J. Wysocki <rafael.j.wysocki@intel.com> |
ACPI: button: Clean up printing messages
Replace the ACPI_DEBUG_PRINT() instance in button.c with an acpi_handle_debug() call, drop the _COMPONENT and ACPI_MODULE_NAME() definitions that are not use
ACPI: button: Clean up printing messages
Replace the ACPI_DEBUG_PRINT() instance in button.c with an acpi_handle_debug() call, drop the _COMPONENT and ACPI_MODULE_NAME() definitions that are not used any more, drop the no longer needed ACPI_BUTTON_COMPONENT definition from the headers and update the documentation accordingly.
While at it, replace the direct printk() invocations with pr_info() (that changes the excessive log level for some of them too) and drop the unneeded PREFIX sybmbol definition from battery.c.
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com> Reviewed-by: Hanjun Guo <guohanjun@huawei.com> Reviewed-by: Hans de Goede <hdegoede@redhat.com>
show more ...
|
Revision tags: v5.10 |
|
#
7daaa063 |
| 07-Nov-2020 |
Hans de Goede <hdegoede@redhat.com> |
ACPI: button: Add DMI quirk for Medion Akoya E2228T
The Medion Akoya E2228T's ACPI _LID implementation is quite broken, it has the same issues as the one from the Medion Akoya E2215T:
1. For notifi
ACPI: button: Add DMI quirk for Medion Akoya E2228T
The Medion Akoya E2228T's ACPI _LID implementation is quite broken, it has the same issues as the one from the Medion Akoya E2215T:
1. For notifications it uses an ActiveLow Edge GpioInt, rather then an ActiveBoth one, meaning that the device is only notified when the lid is closed, not when it is opened.
2. Matching with this its _LID method simply always returns 0 (closed)
In order for the Linux LID code to work properly with this implementation, the lid_init_state selection needs to be set to ACPI_BUTTON_LID_INIT_OPEN, add a DMI quirk for this.
While working on this I also found out that the MD60### part of the model number differs per country/batch while all of the E2215T and E2228T models have this issue, so also remove the " MD60198" part from the E2215T quirk.
Signed-off-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
show more ...
|
Revision tags: v5.8.17 |
|
#
136a4dfe |
| 26-Oct-2020 |
Hans de Goede <hdegoede@redhat.com> |
ACPI: button: Drop no longer necessary Acer SW5-012 lid_init_state quirk
Commit 78a5b53e9fb4 ("Input: soc_button_array - work around DSDTs which modify the irqflags") adds a workaround for DSDTs wit
ACPI: button: Drop no longer necessary Acer SW5-012 lid_init_state quirk
Commit 78a5b53e9fb4 ("Input: soc_button_array - work around DSDTs which modify the irqflags") adds a workaround for DSDTs with a _LID method which play tricks with the irqflags, assuming that the OS is using an irq-type of IRQ_TYPE_LEVEL_LOW.
Now that this workaround is in place, we no longer need to disable the lid functionality on the Acer SW5-012.
Fixes: 78a5b53e9fb4 ("Input: soc_button_array - work around DSDTs which modify the irqflags") Signed-off-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
show more ...
|
Revision tags: v5.8.16, v5.8.15, v5.9, v5.8.14 |
|
#
21988a8e |
| 05-Oct-2020 |
dmitry.torokhov@gmail.com <dmitry.torokhov@gmail.com> |
ACPI: button: fix handling lid state changes when input device closed
The original intent of 84d3f6b76447 was to delay evaluating lid state until all drivers have been loaded, with input device bein
ACPI: button: fix handling lid state changes when input device closed
The original intent of 84d3f6b76447 was to delay evaluating lid state until all drivers have been loaded, with input device being opened from userspace serving as a signal for this condition. Let's ensure that state updates happen even if userspace closed (or in the future inhibited) input device.
Note that if we go through suspend/resume cycle we assume the system has been fully initialized even if LID input device has not been opened yet.
This has a side-effect of fixing access to input->users outside of input->mutex protections by the way of eliminating said accesses and using driver private flag.
Fixes: 84d3f6b76447 ("ACPI / button: Delay acpi_lid_initialize_state() until first user space open") Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com> Reviewed-by: Hans de Goede <hdegoede@redhat.com> Cc: 4.15+ <stable@vger.kernel.org> # 4.15+ Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
show more ...
|
Revision tags: v5.8.13, v5.8.12, v5.8.11, v5.8.10, v5.8.9, v5.8.8, v5.8.7, v5.8.6, v5.4.62, v5.8.5, v5.8.4, v5.4.61, v5.8.3, v5.4.60, v5.8.2, v5.4.59, v5.8.1, v5.4.58, v5.4.57, v5.4.56, v5.8, v5.7.12, v5.4.55, v5.7.11, v5.4.54, v5.7.10, v5.4.53, v5.4.52, v5.7.9, v5.7.8, v5.4.51 |
|
#
57d2dd4b |
| 07-Jul-2020 |
Gustavo A. R. Silva <gustavoars@kernel.org> |
ACPI: Use fallthrough pseudo-keyword
Replace the existing /* fall through */ comments and its variants with the new pseudo-keyword macro fallthrough[1]. Also, remove unnecessary fall-through marking
ACPI: Use fallthrough pseudo-keyword
Replace the existing /* fall through */ comments and its variants with the new pseudo-keyword macro fallthrough[1]. Also, remove unnecessary fall-through markings when it is the case.
Link: https://www.kernel.org/doc/html/latest/process/deprecated.html?highlight=fallthrough#implicit-switch-case-fall-through # [1] Signed-off-by: Gustavo A. R. Silva <gustavoars@kernel.org> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
show more ...
|
Revision tags: v5.4.50, v5.7.7, v5.4.49, v5.7.6, v5.7.5, v5.4.48, v5.7.4, v5.7.3, v5.4.47, v5.4.46, v5.7.2, v5.4.45, v5.7.1, v5.4.44, v5.7, v5.4.43, v5.4.42, v5.4.41 |
|
#
a10660f7 |
| 10-May-2020 |
Pascal Terjan <pterjan@google.com> |
ACPI: Delete unused proc filename macros
Those were used to create files in /proc/acpi long ago and were missed when that code was deleted.
Signed-off-by: Pascal Terjan <pterjan@google.com> Signed-
ACPI: Delete unused proc filename macros
Those were used to create files in /proc/acpi long ago and were missed when that code was deleted.
Signed-off-by: Pascal Terjan <pterjan@google.com> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
show more ...
|
Revision tags: v5.4.40, v5.4.39, v5.4.38, v5.4.37, v5.4.36, v5.4.35, v5.4.34 |
|
#
2b6022a3 |
| 19-Apr-2020 |
Hans de Goede <hdegoede@redhat.com> |
ACPI: button: Drop no longer necessary Asus T200TA lid_init_state quirk
Commit 17e5888e4e18 ("x86: Select HARDIRQS_SW_RESEND on x86") fixes the edge-triggered embedded-controller (WC) IRQ not being
ACPI: button: Drop no longer necessary Asus T200TA lid_init_state quirk
Commit 17e5888e4e18 ("x86: Select HARDIRQS_SW_RESEND on x86") fixes the edge-triggered embedded-controller (WC) IRQ not being replayed after resume when woken by opening the lid, which gets signaled by the EC.
This means that the lid_init_state=ACPI_BUTTON_LID_INIT_OPEN quirk for the Asus T200TA is no longer necessary, the lid now works properly without it, so drop the quirk.
Fixes: 17e5888e4e18 ("x86: Select HARDIRQS_SW_RESEND on x86") Signed-off-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
show more ...
|
Revision tags: v5.4.33, v5.4.32, v5.4.31, v5.4.30, v5.4.29, v5.6, v5.4.28, v5.4.27, v5.4.26, v5.4.25, v5.4.24, v5.4.23, v5.4.22, v5.4.21, v5.4.20 |
|
#
ac1cc6b4 |
| 11-Feb-2020 |
Josh Triplett <josh@joshtriplett.org> |
ACPI: button: move HIDs to acpi/button.h
This makes it possible to use ACPI_BUTTON_HID_POWER in another driver.
Signed-off-by: Josh Triplett <josh@joshtriplett.org> Signed-off-by: Rafael J. Wysocki
ACPI: button: move HIDs to acpi/button.h
This makes it possible to use ACPI_BUTTON_HID_POWER in another driver.
Signed-off-by: Josh Triplett <josh@joshtriplett.org> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
show more ...
|
Revision tags: v5.4.19, v5.4.18, v5.4.17, v5.4.16, v5.5, v5.4.15, v5.4.14, v5.4.13, v5.4.12, v5.4.11, v5.4.10, v5.4.9, v5.4.8 |
|
#
05289049 |
| 02-Jan-2020 |
Jason Ekstrand <jason@jlekstrand.net> |
ACPI: button: Add DMI quirk for Razer Blade Stealth 13 late 2019 lid switch
Running evemu-record on the lid switch event shows that the lid reports the first "close" but then never reports an "open"
ACPI: button: Add DMI quirk for Razer Blade Stealth 13 late 2019 lid switch
Running evemu-record on the lid switch event shows that the lid reports the first "close" but then never reports an "open". This causes systemd to continuously re-suspend the laptop every 30s. Resetting the _LID to "open" fixes the issue.
Signed-off-by: Jason Ekstrand <jason@jlekstrand.net> Reviewed-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
show more ...
|
Revision tags: v5.4.7, v5.4.6, v5.4.5, v5.4.4, v5.4.3, v5.3.15, v5.4.2, v5.4.1, v5.3.14, v5.4, v5.3.13, v5.3.12 |
|
#
90ed9c63 |
| 18-Nov-2019 |
Hans de Goede <hdegoede@redhat.com> |
ACPI: button: Add DMI quirk for Acer Switch 10 SW5-032 lid-switch
The Acer Switch 10 SW5-032 _LID method is quite broken, it looks like this:
Method (_LID, 0, NotSerialized) // _LID: L
ACPI: button: Add DMI quirk for Acer Switch 10 SW5-032 lid-switch
The Acer Switch 10 SW5-032 _LID method is quite broken, it looks like this:
Method (_LID, 0, NotSerialized) // _LID: Lid Status { If ((STAS & One)) { Local0 = One PBCG |= 0x05000000 HMCG |= 0x05000000 } Else { Local0 = Zero PBCG &= 0xF0FFFFFF HMCG &= 0xF0FFFFFF }
^^PCI0.GFX0.CLID = Local0 Return (Local0) }
The problem here is the accesses to the PBCG and HMCG, these are the pinconf0 registers for the power, resp. the home button GPIO, e.g. PBCG is declared as:
OperationRegion (PWBT, SystemMemory, 0xFED0E080, 0x10) Field (PWBT, DWordAcc, NoLock, Preserve) { PBCG, 32, PBV1, 32, PBSA, 32, PBV2, 32 }
Where 0xFED0E000 is the base address of the GPO2 device and 0x80 is the offset for the pin used for the powerbutton.
The problem here is this line in _LID: PBCG |= 0x05000000
This changes the trigger flags of the GPIO, changing when it generates interrupts. Note it does not clear the original flags. Linux uses an edge triggered interrupt on both positive and negative edges. This |= adds the BYT_TRIG_LVL flag to this, so now it is turned into a level interrupt which fires both when low and high, iow it simply always fires leading to an interrupt storm, the tablet immediately waking up from suspend again, etc.
There is nothing we can do to fix this, except for a DSDT override, which the user needs to do manually. The only thing we can do is never call _LID, which requires disabling the lid-switch functionality altogether.
This commit adds a quirk for this, as no lid-switch function is better then the interrupt storm. A user manually applying a DSDT override can also override the quirk on the kernel cmdline.
Signed-off-by: Hans de Goede <hdegoede@redhat.com> Reviewed-by: Mika Westerberg <mika.westerberg@linux.intel.com> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
show more ...
|
Revision tags: v5.3.11, v5.3.10, v5.3.9, v5.3.8 |
|
#
e346d0cf |
| 26-Oct-2019 |
Hans de Goede <hdegoede@redhat.com> |
ACPI: button: Remove unused acpi_lid_notifier_[un]register() functions
There are no users of the acpi_lid_notifier_[un]register functions, so lets remove them.
Reviewed-by: Andy Shevchenko <andriy.
ACPI: button: Remove unused acpi_lid_notifier_[un]register() functions
There are no users of the acpi_lid_notifier_[un]register functions, so lets remove them.
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Signed-off-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
show more ...
|
#
00e25036 |
| 26-Oct-2019 |
Hans de Goede <hdegoede@redhat.com> |
ACPI: button: Add DMI quirk for Asus T200TA
The Asus T200TA lid has some weird behavior where _LID keeps reporting closed after every second openening of the lid. Causing immediate re-suspend after
ACPI: button: Add DMI quirk for Asus T200TA
The Asus T200TA lid has some weird behavior where _LID keeps reporting closed after every second openening of the lid. Causing immediate re-suspend after opening every other open.
I've looked at the AML code but it involves talking to the EC and we have no idea what the EC is doing. Setting lid_init_state to ACPI_BUTTON_LID_INIT_OPEN fixes the unwanted behavior, so this commit adds a DMI based quirk to use ACPI_BUTTON_LID_INIT_OPEN on the T200TA.
Signed-off-by: Hans de Goede <hdegoede@redhat.com> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
show more ...
|
#
932e1ba4 |
| 26-Oct-2019 |
Hans de Goede <hdegoede@redhat.com> |
ACPI: button: Add DMI quirk for Medion Akoya E2215T
The Medion Akoya E2215T's ACPI _LID implementation is quite broken:
1. For notifications it uses an ActiveLow Edge GpioInt, rather then an A
ACPI: button: Add DMI quirk for Medion Akoya E2215T
The Medion Akoya E2215T's ACPI _LID implementation is quite broken:
1. For notifications it uses an ActiveLow Edge GpioInt, rather then an ActiveBoth one, meaning that the device is only notified when the lid is closed, not when it is opened.
2. Matching with this its _LID method simply always returns 0 (closed)
In order for the Linux LID code to work properly with this implementation, the lid_init_state selection needs to be set to ACPI_BUTTON_LID_INIT_OPEN.
This commit adds a DMI quirk for this.
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Signed-off-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
show more ...
|
#
d7cd0823 |
| 26-Oct-2019 |
Hans de Goede <hdegoede@redhat.com> |
ACPI: button: Turn lid_blacklst DMI table into a generic quirk table
Commit 3540c32a9ae4 ("ACPI / button: Add quirks for initial lid state notification") added 3 different modes to the LID handling
ACPI: button: Turn lid_blacklst DMI table into a generic quirk table
Commit 3540c32a9ae4 ("ACPI / button: Add quirks for initial lid state notification") added 3 different modes to the LID handling code to deal with various buggy implementations.
Until now users which need one of the 2 non-default modes to get their HW to work have to pass a kernel commandline option for this.
E.g. https://bugzilla.kernel.org/show_bug.cgi?id=106151 was closed with a note that the user has to add "button.lid_init_state=open" to the kernel commandline to get the LID code to not cause undesirable suspends on his Samsung N210 Plus.
This commit modifies the existing lid_blacklst DMI table so that it can be used not only to completely disable the LID code on devices where the ACPI tables are broken beyond repair, but also to select one of the 2 non default LID handling modes on devices where this is necessary.
This will allow us to add quirks to make the LID work OOTB on broken devices. Getting this working OOTB is esp. important because the typical breakage is false LID closed reporting, causing undesirable suspends which basically make the system unusable.
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Signed-off-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
show more ...
|
#
593681e2 |
| 26-Oct-2019 |
Hans de Goede <hdegoede@redhat.com> |
ACPI: button: Allow disabling LID support with the lid_init_state module option
Add a new "disabled" value for the lid_init_state module option, which can be used to disable LID support on devices w
ACPI: button: Allow disabling LID support with the lid_init_state module option
Add a new "disabled" value for the lid_init_state module option, which can be used to disable LID support on devices where it is completely broken.
Sometimes devices seem to spontaneously suspend and the cause for this is not clear. The LID switch is known to be one possible cause for this, this commit allows easily disabling the LID switch for testing if it is the cause.
For example some devices which do not even have a lid, still have a LID device in their ACPI tables, pointing to a floating GPIO.
This is not really related to the initial LID state, but re-using the existing option keeps things simple and it will make it much easier to add DMI quirks which can either disable the LID completely or set another non-default lid_init_state value, both of which are necessary on some devices.
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Signed-off-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
show more ...
|
#
065bd4d3 |
| 26-Oct-2019 |
Hans de Goede <hdegoede@redhat.com> |
ACPI: button: Refactor lid_init_state module parsing code
Replace the weird strncmp() calls in param_set_lid_init_state(), which look to me like they will also accept things like "opennnn" to use sy
ACPI: button: Refactor lid_init_state module parsing code
Replace the weird strncmp() calls in param_set_lid_init_state(), which look to me like they will also accept things like "opennnn" to use sysfs_match_string instead.
Also rewrite param_get_lid_init_state() using the new lid_init_state_str array. Instead of doing a straightforward one line replacement, e.g. : return sprintf(buffer, lid_init_state_str[lid_init_state]); print all possible values, putting [] around the selected value, so that users can easily find out what the possible values are.
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Signed-off-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
show more ...
|
Revision tags: v5.3.7, v5.3.6, v5.3.5, v5.3.4, v5.3.3, v5.3.2, v5.3.1, v5.3, v5.2.14, v5.3-rc8, v5.2.13, v5.2.12, v5.2.11, v5.2.10, v5.2.9, v5.2.8, v5.2.7, v5.2.6, v5.2.5, v5.2.4, v5.2.3, v5.2.2, v5.2.1, v5.2, v5.1.16, v5.1.15, v5.1.14, v5.1.13, v5.1.12, v5.1.11, v5.1.10, v5.1.9, v5.1.8, v5.1.7, v5.1.6 |
|
#
c942fddf |
| 27-May-2019 |
Thomas Gleixner <tglx@linutronix.de> |
treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 157
Based on 3 normalized pattern(s):
this program is free software you can redistribute it and or modify it under the terms of th
treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 157
Based on 3 normalized pattern(s):
this program is free software you can redistribute it and or modify it under the terms of the gnu general public license as published by the free software foundation either version 2 of the license or at your option any later version this program is distributed in the hope that it will be useful but without any warranty without even the implied warranty of merchantability or fitness for a particular purpose see the gnu general public license for more details
this program is free software you can redistribute it and or modify it under the terms of the gnu general public license as published by the free software foundation either version 2 of the license or at your option any later version [author] [kishon] [vijay] [abraham] [i] [kishon]@[ti] [com] this program is distributed in the hope that it will be useful but without any warranty without even the implied warranty of merchantability or fitness for a particular purpose see the gnu general public license for more details
this program is free software you can redistribute it and or modify it under the terms of the gnu general public license as published by the free software foundation either version 2 of the license or at your option any later version [author] [graeme] [gregory] [gg]@[slimlogic] [co] [uk] [author] [kishon] [vijay] [abraham] [i] [kishon]@[ti] [com] [based] [on] [twl6030]_[usb] [c] [author] [hema] [hk] [hemahk]@[ti] [com] this program is distributed in the hope that it will be useful but without any warranty without even the implied warranty of merchantability or fitness for a particular purpose see the gnu general public license for more details
extracted by the scancode license scanner the SPDX license identifier
GPL-2.0-or-later
has been chosen to replace the boilerplate/reference in 1105 file(s).
Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Reviewed-by: Allison Randal <allison@lohutok.net> Reviewed-by: Richard Fontana <rfontana@redhat.com> Reviewed-by: Kate Stewart <kstewart@linuxfoundation.org> Cc: linux-spdx@vger.kernel.org Link: https://lkml.kernel.org/r/20190527070033.202006027@linutronix.de Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
show more ...
|
Revision tags: v5.1.5, v5.1.4, v5.1.3, v5.1.2, v5.1.1, v5.0.14, v5.1, v5.0.13, v5.0.12, v5.0.11, v5.0.10, v5.0.9, v5.0.8, v5.0.7, v5.0.6 |
|
#
13e96214 |
| 02-Apr-2019 |
Zhang Rui <rui.zhang@intel.com> |
ACPI: button: reinitialize button state upon resume
With commit dfa46c50f65b ("ACPI / button: Fix an issue in button.lid_init_state=ignore mode"), the lid device is considered to be not compliant to
ACPI: button: reinitialize button state upon resume
With commit dfa46c50f65b ("ACPI / button: Fix an issue in button.lid_init_state=ignore mode"), the lid device is considered to be not compliant to SW_LID if the Lid state is unchanged when updating it.
This is not wrong, but we overlooked the resume case, where Lid state is updated unconditionally in the button driver .resume() callback. And this results in warning message "ACPI: button: The lid device is not compliant to SW_LID." after resume, if the machine is suspended with Lid opened and then resumed with Lid opened.
Fix this by flushing the cached lid state before updating the Lid device in .resume() callback.
Fixes: dfa46c50f65b ("ACPI / button: Fix an issue in button.lid_init_state=ignore mode") Reported-and-tested-by: Zhao Lijian <lijian.zhao@intel.com> Signed-off-by: Zhang Rui <rui.zhang@intel.com> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
show more ...
|
Revision tags: v5.0.5, v5.0.4, v5.0.3, v4.19.29, v5.0.2, v4.19.28, v5.0.1, v4.19.27, v5.0, v4.19.26, v4.19.25, v4.19.24, v4.19.23, v4.19.22, v4.19.21, v4.19.20, v4.19.19, v4.19.18, v4.19.17, v4.19.16, v4.19.15, v4.19.14, v4.19.13, v4.19.12, v4.19.11, v4.19.10, v4.19.9, v4.19.8, v4.19.7, v4.19.6, v4.19.5, v4.19.4, v4.18.20, v4.19.3, v4.18.19, v4.19.2, v4.18.18, v4.18.17, v4.19.1, v4.19, v4.18.16, v4.18.15, v4.18.14, v4.18.13, v4.18.12, v4.18.11, v4.18.10, v4.18.9, v4.18.7, v4.18.6, v4.18.5, v4.17.18, v4.18.4, v4.18.3, v4.17.17, v4.18.2, v4.17.16, v4.17.15, v4.18.1, v4.18, v4.17.14, v4.17.13, v4.17.12, v4.17.11, v4.17.10, v4.17.9, v4.17.8, v4.17.7, v4.17.6, v4.17.5 |
|
#
2c4c2a71 |
| 07-Jul-2018 |
Randy Dunlap <rdunlap@infradead.org> |
ACPI / button: fix defined but not used warning
Fix a build warning in the ACPI button driver when CONFIG_PROC_FS is not enabled by marking the unused function as __maybe_unused.
../drivers/acpi/bu
ACPI / button: fix defined but not used warning
Fix a build warning in the ACPI button driver when CONFIG_PROC_FS is not enabled by marking the unused function as __maybe_unused.
../drivers/acpi/button.c:252:12: warning: 'acpi_button_state_seq_show' defined but not used [-Wunused-function]
Signed-off-by: Randy Dunlap <rdunlap@infradead.org> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
show more ...
|