gpio fixes for v5.13

- fix wake-up interrupt support on gpio-mxc
 - zero the padding bytes in a structure passed to user-space in the GPIO
   character device
 - select HAS_IOPORT_MAP in two drivers that need it to fix a Kbuild issue
 -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCAAdFiEEFp3rbAvDxGAT0sefEacuoBRx13IFAmDVy5IACgkQEacuoBRx
 13IVwhAAu7+LCkGMb5esTdE/sP73CmLuDGM7frBLg4NOZg1XCapvv8BPsylS66WI
 G756fxMfp1OqG8Y6rnHPX9E8jWyBYBPKop9kvx/IfdTqxjihbzEkTgnixxjPh8I5
 yeEY5RtU9K0vJGKE1PRVXh+kcjW0MGzq5309uNJw4CpWF6bzf2M1q2+f5hg0OjKS
 WXH5A164PqQakCaYZUh/zLzFnjW+lVjLIWRTXrxCSzQxFzDc8p/XZE24gVNNWVfX
 SVfHTdzdVb1RPFbB5I36c8e4tXKAGMoYSwgqGKj2+rQpx+ttpSqtWlAeS6dThtIo
 wZcfp8b7V+4O6dreiChjx8jLN/5lU+++7d0AK1Jw8sffqxsB0HWPLJY+8rL6sVfu
 VIhS3nKLJwnPe+7kulDtHFVoelhKzr3AgqDrz2lYwbfOLjH8+f6naIHMabrrsTH4
 L6ydSnf/NbL0SFzMpdyQ5yFfXMmcNqziFpt/EMol8ChIaOi6QbCT7W/L/3MGPn36
 TuW9QtYegb8ZVZ4OEIph2SwK3zbuxlRWuLrTTQUXT4xnckdlmt8R+7REvYjI7VWn
 fkHyo2LEvwOBvR/dvmedsuWytWwx17O2x2C7NC7Cd1n1hWWU2oZzNf/GqmJYYnwM
 hxJiv16zV/cXpQEswnIRWdhwJixHC1r2KDkm7ETf50JHl5g4uoE=
 =udPz
 -----END PGP SIGNATURE-----

Merge tag 'gpio-fixes-for-v5.13' of git://git.kernel.org/pub/scm/linux/kernel/git/brgl/linux

Pull gpio fixes from Bartosz Golaszewski:

 - fix wake-up interrupt support on gpio-mxc

 - zero the padding bytes in a structure passed to user-space in the
   GPIO character device

 - require HAS_IOPORT_MAP in two drivers that need it to fix a Kbuild
   issue

* tag 'gpio-fixes-for-v5.13' of git://git.kernel.org/pub/scm/linux/kernel/git/brgl/linux:
  gpio: AMD8111 and TQMX86 require HAS_IOPORT_MAP
  gpiolib: cdev: zero padding during conversion to gpioline_info_changed
  gpio: mxc: Fix disabled interrupt wake-up support
This commit is contained in:
Linus Torvalds 2021-06-25 09:32:57 -07:00
commit c13e302133
3 changed files with 4 additions and 1 deletions

View File

@ -1383,6 +1383,7 @@ config GPIO_TPS68470
config GPIO_TQMX86
tristate "TQ-Systems QTMX86 GPIO"
depends on MFD_TQMX86 || COMPILE_TEST
depends on HAS_IOPORT_MAP
select GPIOLIB_IRQCHIP
help
This driver supports GPIO on the TQMX86 IO controller.
@ -1450,6 +1451,7 @@ menu "PCI GPIO expanders"
config GPIO_AMD8111
tristate "AMD 8111 GPIO driver"
depends on X86 || COMPILE_TEST
depends on HAS_IOPORT_MAP
help
The AMD 8111 south bridge contains 32 GPIO pins which can be used.

View File

@ -334,7 +334,7 @@ static int mxc_gpio_init_gc(struct mxc_gpio_port *port, int irq_base)
ct->chip.irq_unmask = irq_gc_mask_set_bit;
ct->chip.irq_set_type = gpio_set_irq_type;
ct->chip.irq_set_wake = gpio_set_wake_irq;
ct->chip.flags = IRQCHIP_MASK_ON_SUSPEND;
ct->chip.flags = IRQCHIP_MASK_ON_SUSPEND | IRQCHIP_ENABLE_WAKEUP_ON_SUSPEND;
ct->regs.ack = GPIO_ISR;
ct->regs.mask = GPIO_IMR;

View File

@ -1880,6 +1880,7 @@ static void gpio_v2_line_info_changed_to_v1(
struct gpio_v2_line_info_changed *lic_v2,
struct gpioline_info_changed *lic_v1)
{
memset(lic_v1, 0, sizeof(*lic_v1));
gpio_v2_line_info_to_v1(&lic_v2->info, &lic_v1->info);
lic_v1->timestamp = lic_v2->timestamp_ns;
lic_v1->event_type = lic_v2->event_type;