0027-iot2000-hack-Work-around-DSDT-mistake.patch 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. From c9125348a22f695fa543c96e8f6beca8cb26d6d7 Mon Sep 17 00:00:00 2001
  2. From: Jan Kiszka <jan.kiszka@siemens.com>
  3. Date: Thu, 25 May 2017 11:09:42 +0200
  4. Subject: [PATCH 27/27] iot2000-hack: Work around DSDT mistake
  5. Until we have a new firmware revision, fix up the incorrect GPIO
  6. interrupt pin in software.
  7. Nothing for upstream.
  8. Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
  9. ---
  10. drivers/gpio/gpiolib-acpi.c | 8 ++++++++
  11. 1 file changed, 8 insertions(+)
  12. diff --git a/drivers/gpio/gpiolib-acpi.c b/drivers/gpio/gpiolib-acpi.c
  13. index cbbb67a6f1d6..ec1a092e9911 100644
  14. --- a/drivers/gpio/gpiolib-acpi.c
  15. +++ b/drivers/gpio/gpiolib-acpi.c
  16. @@ -10,6 +10,7 @@
  17. * published by the Free Software Foundation.
  18. */
  19. +#include <linux/dmi.h>
  20. #include <linux/errno.h>
  21. #include <linux/gpio.h>
  22. #include <linux/gpio/consumer.h>
  23. @@ -408,6 +409,13 @@ static int acpi_find_gpio(struct acpi_resource *ares, void *data)
  24. if (pin_index >= agpio->pin_table_length)
  25. return 1;
  26. + if (!strcmp(dmi_get_system_info(DMI_BOARD_NAME),
  27. + "SIMATIC IOT2000") &&
  28. + !strcmp(agpio->resource_source.string_ptr,
  29. + "\\_SB.PCI0.GIP0.GPO") &&
  30. + agpio->pin_table[pin_index] == 9)
  31. + agpio->pin_table[pin_index] = 1;
  32. +
  33. lookup->desc = acpi_get_gpiod(agpio->resource_source.string_ptr,
  34. agpio->pin_table[pin_index]);
  35. lookup->info.gpioint =
  36. --
  37. 2.12.0