mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
synced 2024-12-29 09:12:07 +00:00
ACPI updates for 6.12-rc2
- Add a quirk for Dell OptiPlex 5480 AIO to the ACPI backlight (video) driver (Hans de Goede). - Prevent the ACPI battery driver from crashing when unregistering a battery hook and simplify battery hook locking in it (Armin Wolf). - Fix up the ACPI IRQ override quirk list and add quirks for Asus Vivobook X1704VAP and Asus ExpertBook B2502CVA to it (Hans de Goede). -----BEGIN PGP SIGNATURE----- iQJGBAABCAAwFiEE4fcc61cGeeHD/fCwgsRv/nhiVHEFAmcAJUISHHJqd0Byand5 c29ja2kubmV0AAoJEILEb/54YlRxUuAP/j+HbIc+2wgCZKQlbdJVU/L/ZTUwKQ6i C6HeaTH7zEy226OVkwwOxqoQMIS/UdBa+lum2b7H8XXBokLzv3wAIvjORkrQWBHm +xHhywHeQkp1ysYbBD5moxqKQyE+cpPLd+L1ck2vZlixo5pJkXhatGNP7Ew8MwmQ +mquDyt14swi8M8TiMxoHpEKBIaSqxb+cVYQZ+XdhfhbADCV8DbdVmPfvGLZ/2td uFlBt5CdUxgMN/us4ZQmsB9myWqSRhpgDyckhurRaNzJmFKhWtHldXFsJwACsdvb YJIan+c3OAq3GkyLPYRMSekCKJVxQKPD9R3v6QWc6az45sS4YlD028qGHYm30UxM VJZfnJWm/IfDMYol27+I41LSeTEWk125Gv0yRnht7jw0xNuSnha0Gi3USgXwQpKc aN2pxpoz4PpHVxsfjO7wB5IjXv7JbSnFwFMkN//3QhYk1wApOQ/KwpxP5TgWj8OC Jmt09bdOSesSNCGIi2gCSCQ4YDEUNYGJkNPtHIPcf2KbIjcbNYLBEGl+gl32wreT vahgTS0SakmotvXPaY6cvgc8Ab2+cQUeSVPV+Hhc/s+JXSPesdBvLaLdtIx4CzYf ulKMLofWiKyZ9jaMwOmVoHOgAdeVlpOgcuSGw1ATOhY8YIkJE7mMm75WLPGNVIhp v4nhRQp+Fu57 =EzOq -----END PGP SIGNATURE----- Merge tag 'acpi-6.12-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm Pull ACPI fixes from Rafael Wysocki: "These fix up the ACPI IRQ override quirk list and add two new entries to it, add a new quirk to the ACPI backlight (video) driver, and fix the ACPI battery driver. Specifics: - Add a quirk for Dell OptiPlex 5480 AIO to the ACPI backlight (video) driver (Hans de Goede) - Prevent the ACPI battery driver from crashing when unregistering a battery hook and simplify battery hook locking in it (Armin Wolf) - Fix up the ACPI IRQ override quirk list and add quirks for Asus Vivobook X1704VAP and Asus ExpertBook B2502CVA to it (Hans de Goede)" * tag 'acpi-6.12-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm: ACPI: battery: Fix possible crash when unregistering a battery hook ACPI: battery: Simplify battery hook locking ACPI: video: Add backlight=native quirk for Dell OptiPlex 5480 AIO ACPI: resource: Add Asus ExpertBook B2502CVA to irq1_level_low_skip_override[] ACPI: resource: Add Asus Vivobook X1704VAP to irq1_level_low_skip_override[] ACPI: resource: Loosen the Asus E1404GAB DMI match to also cover the E1404GA ACPI: resource: Remove duplicate Asus E1504GAB IRQ override
This commit is contained in:
commit
e1043b6765
@ -703,28 +703,35 @@ static LIST_HEAD(acpi_battery_list);
|
||||
static LIST_HEAD(battery_hook_list);
|
||||
static DEFINE_MUTEX(hook_mutex);
|
||||
|
||||
static void __battery_hook_unregister(struct acpi_battery_hook *hook, int lock)
|
||||
static void battery_hook_unregister_unlocked(struct acpi_battery_hook *hook)
|
||||
{
|
||||
struct acpi_battery *battery;
|
||||
|
||||
/*
|
||||
* In order to remove a hook, we first need to
|
||||
* de-register all the batteries that are registered.
|
||||
*/
|
||||
if (lock)
|
||||
mutex_lock(&hook_mutex);
|
||||
list_for_each_entry(battery, &acpi_battery_list, list) {
|
||||
if (!hook->remove_battery(battery->bat, hook))
|
||||
power_supply_changed(battery->bat);
|
||||
}
|
||||
list_del(&hook->list);
|
||||
if (lock)
|
||||
mutex_unlock(&hook_mutex);
|
||||
list_del_init(&hook->list);
|
||||
|
||||
pr_info("extension unregistered: %s\n", hook->name);
|
||||
}
|
||||
|
||||
void battery_hook_unregister(struct acpi_battery_hook *hook)
|
||||
{
|
||||
__battery_hook_unregister(hook, 1);
|
||||
mutex_lock(&hook_mutex);
|
||||
/*
|
||||
* Ignore already unregistered battery hooks. This might happen
|
||||
* if a battery hook was previously unloaded due to an error when
|
||||
* adding a new battery.
|
||||
*/
|
||||
if (!list_empty(&hook->list))
|
||||
battery_hook_unregister_unlocked(hook);
|
||||
|
||||
mutex_unlock(&hook_mutex);
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(battery_hook_unregister);
|
||||
|
||||
@ -733,7 +740,6 @@ void battery_hook_register(struct acpi_battery_hook *hook)
|
||||
struct acpi_battery *battery;
|
||||
|
||||
mutex_lock(&hook_mutex);
|
||||
INIT_LIST_HEAD(&hook->list);
|
||||
list_add(&hook->list, &battery_hook_list);
|
||||
/*
|
||||
* Now that the driver is registered, we need
|
||||
@ -750,7 +756,7 @@ void battery_hook_register(struct acpi_battery_hook *hook)
|
||||
* hooks.
|
||||
*/
|
||||
pr_err("extension failed to load: %s", hook->name);
|
||||
__battery_hook_unregister(hook, 0);
|
||||
battery_hook_unregister_unlocked(hook);
|
||||
goto end;
|
||||
}
|
||||
|
||||
@ -804,7 +810,7 @@ static void battery_hook_add_battery(struct acpi_battery *battery)
|
||||
*/
|
||||
pr_err("error in extension, unloading: %s",
|
||||
hook_node->name);
|
||||
__battery_hook_unregister(hook_node, 0);
|
||||
battery_hook_unregister_unlocked(hook_node);
|
||||
}
|
||||
}
|
||||
mutex_unlock(&hook_mutex);
|
||||
@ -837,7 +843,7 @@ static void __exit battery_hook_exit(void)
|
||||
* need to remove the hooks.
|
||||
*/
|
||||
list_for_each_entry_safe(hook, ptr, &battery_hook_list, list) {
|
||||
__battery_hook_unregister(hook, 1);
|
||||
battery_hook_unregister(hook);
|
||||
}
|
||||
mutex_destroy(&hook_mutex);
|
||||
}
|
||||
|
@ -440,6 +440,13 @@ static const struct dmi_system_id irq1_level_low_skip_override[] = {
|
||||
DMI_MATCH(DMI_BOARD_NAME, "S5602ZA"),
|
||||
},
|
||||
},
|
||||
{
|
||||
/* Asus Vivobook X1704VAP */
|
||||
.matches = {
|
||||
DMI_MATCH(DMI_SYS_VENDOR, "ASUSTeK COMPUTER INC."),
|
||||
DMI_MATCH(DMI_BOARD_NAME, "X1704VAP"),
|
||||
},
|
||||
},
|
||||
{
|
||||
/* Asus ExpertBook B1402CBA */
|
||||
.matches = {
|
||||
@ -504,26 +511,26 @@ static const struct dmi_system_id irq1_level_low_skip_override[] = {
|
||||
},
|
||||
},
|
||||
{
|
||||
/* Asus Vivobook Go E1404GAB */
|
||||
/* Asus ExpertBook B2502CVA */
|
||||
.matches = {
|
||||
DMI_MATCH(DMI_SYS_VENDOR, "ASUSTeK COMPUTER INC."),
|
||||
DMI_MATCH(DMI_BOARD_NAME, "E1404GAB"),
|
||||
DMI_MATCH(DMI_BOARD_NAME, "B2502CVA"),
|
||||
},
|
||||
},
|
||||
{
|
||||
/* Asus Vivobook E1504GA */
|
||||
/* Asus Vivobook Go E1404GA* */
|
||||
.matches = {
|
||||
DMI_MATCH(DMI_SYS_VENDOR, "ASUSTeK COMPUTER INC."),
|
||||
DMI_MATCH(DMI_BOARD_NAME, "E1404GA"),
|
||||
},
|
||||
},
|
||||
{
|
||||
/* Asus Vivobook E1504GA* */
|
||||
.matches = {
|
||||
DMI_MATCH(DMI_SYS_VENDOR, "ASUSTeK COMPUTER INC."),
|
||||
DMI_MATCH(DMI_BOARD_NAME, "E1504GA"),
|
||||
},
|
||||
},
|
||||
{
|
||||
/* Asus Vivobook E1504GAB */
|
||||
.matches = {
|
||||
DMI_MATCH(DMI_SYS_VENDOR, "ASUSTeK COMPUTER INC."),
|
||||
DMI_MATCH(DMI_BOARD_NAME, "E1504GAB"),
|
||||
},
|
||||
},
|
||||
{
|
||||
/* Asus Vivobook Pro N6506MV */
|
||||
.matches = {
|
||||
|
@ -844,6 +844,15 @@ static const struct dmi_system_id video_detect_dmi_table[] = {
|
||||
* controller board in their ACPI tables (and may even have one), but
|
||||
* which need native backlight control nevertheless.
|
||||
*/
|
||||
{
|
||||
/* https://github.com/zabbly/linux/issues/26 */
|
||||
.callback = video_detect_force_native,
|
||||
/* Dell OptiPlex 5480 AIO */
|
||||
.matches = {
|
||||
DMI_MATCH(DMI_SYS_VENDOR, "Dell Inc."),
|
||||
DMI_MATCH(DMI_PRODUCT_NAME, "OptiPlex 5480 AIO"),
|
||||
},
|
||||
},
|
||||
{
|
||||
/* https://bugzilla.redhat.com/show_bug.cgi?id=2303936 */
|
||||
.callback = video_detect_force_native,
|
||||
|
Loading…
Reference in New Issue
Block a user