mirror of
https://github.com/torvalds/linux.git
synced 2026-07-28 01:55:51 +02:00
intel-gpio for v7.1-1
* Only trigger interrupts that defined ActiveBoth in ACPI on boot -----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEEqaflIX74DDDzMJJtb7wzTHR8rCgFAmn8g2EACgkQb7wzTHR8 rCjtNw//TswGFHB2QezfVbiV6oY3qX7I/XdyDR1OMNDYmd4WcAAQmVnKSosKfWe9 fhntKSaAwoghxHUmmDpTothS11pf6qbif7/I311Z/UU31ue4rDPKmGAqY5kXBufl qPGQqdVdt2zz/ClyCmRuNuUuFn0pruofcwmPCOkpZi2EMqPown6E68LK7jNiLYsh Z5lRm10QNKApeBQ6MH6TYXbmKPDOI80JvBX1WjXarNhZtkhtqu2KJ/ItKhXcUU/N rzous/6pnrL9y4iT6/ZPScdwrFtFbb8WxqxT3PFTtimQH1FNTm8F5nHTw0N9VswL TMalKrzNLHmNODxvCGDW9gWl9VRdur7ZEbGDqbMjZRXUVI87pr3x5e4hc6XuUJhV SbrVX7etnhq5+iUcpo6vqncEvDxgglb5eY4X/imrVTwwsIW3V1ZpijS0VBAUBNZ8 Q8yH/xAXtPZEXxLvPRhMEGNe3lhuZm8qX51xdopIz5+qtUjYnnUAPc9oi9CiQ26z 8k0WNQjj69w5FX0HJAkfzecixd5Aaby4IRx7wWzKAlcjKHTd9Q6d2aC79+mOiPyc YO/Gw5i2b2INRh7XeAaE1u0eXSgT4kfD4YmiehNQV6htQh+rUQRi1xXFHvdv6vuU eoviDdzXhV6VGp+ZRJMtkcOGkHPQK6MvwTpns8O284TZBO6Hb74= =jCBH -----END PGP SIGNATURE----- Merge tag 'intel-gpio-v7.1-1' of git://git.kernel.org/pub/scm/linux/kernel/git/andy/linux-gpio-intel into gpio/for-current intel-gpio for v7.1-1 * Only trigger interrupts that defined ActiveBoth in ACPI on boot
This commit is contained in:
commit
86c04b2960
|
|
@ -229,12 +229,23 @@ static void acpi_gpiochip_request_irq(struct acpi_gpio_chip *acpi_gpio,
|
|||
|
||||
event->irq_requested = true;
|
||||
|
||||
/* Make sure we trigger the initial state of edge-triggered IRQs */
|
||||
/*
|
||||
* Make sure we trigger the initial state of ActiveBoth IRQs.
|
||||
*
|
||||
* According to the Microsoft GPIO documentation, triggering GPIO
|
||||
* interrupts marked as ActiveBoth during initialization is correct
|
||||
* as long as the associated GPIO line is already "asserted"
|
||||
* (logic level low). We should not trigger edge-based GPIO
|
||||
* interrupts not marked as ActiveBoth.
|
||||
*
|
||||
* See: https://learn.microsoft.com/en-us/windows-hardware/drivers/bringup/general-purpose-i-o--gpio-
|
||||
* Section: "GPIO controllers and ActiveBoth interrupts"
|
||||
*/
|
||||
if (acpi_gpio_need_run_edge_events_on_boot() &&
|
||||
(event->irqflags & (IRQF_TRIGGER_RISING | IRQF_TRIGGER_FALLING))) {
|
||||
((event->irqflags & (IRQF_TRIGGER_RISING | IRQF_TRIGGER_FALLING)) ==
|
||||
(IRQF_TRIGGER_RISING | IRQF_TRIGGER_FALLING))) {
|
||||
value = gpiod_get_raw_value_cansleep(event->desc);
|
||||
if (((event->irqflags & IRQF_TRIGGER_RISING) && value == 1) ||
|
||||
((event->irqflags & IRQF_TRIGGER_FALLING) && value == 0))
|
||||
if (value == 0)
|
||||
event->handler(event->irq, event);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user