0007-serial-8250_exar-Adjust-IOT2000-matching.patch 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. From df74e188ffc38176d4caba969e104d2ab2e4e609 Mon Sep 17 00:00:00 2001
  2. From: Su Bao Cheng <baocheng.su@siemens.com>
  3. Date: Fri, 12 Oct 2018 15:12:37 +0200
  4. Subject: [PATCH 07/18] serial: 8250_exar: Adjust IOT2000 matching
  5. Since there are more IOT2040 variants with identical hardware but
  6. different asset tags, the asset tag matching should be adjusted to
  7. support them.
  8. As only the IOT2040 variants have the Exar chip on board, matching on
  9. their board name is enough. In the future there will be no other devices
  10. with the "SIMATIC IOT2000" DMI board name but different hardware.
  11. Signed-off-by: Su Bao Cheng <baocheng.su@siemens.com>
  12. Reviewed-by: Jan Kiszka <jan.kiszka@siemens.com>
  13. ---
  14. drivers/tty/serial/8250/8250_exar.c | 7 +++++--
  15. 1 file changed, 5 insertions(+), 2 deletions(-)
  16. diff --git a/drivers/tty/serial/8250/8250_exar.c b/drivers/tty/serial/8250/8250_exar.c
  17. index be82707d6cb8..3eb3a7674a0f 100644
  18. --- a/drivers/tty/serial/8250/8250_exar.c
  19. +++ b/drivers/tty/serial/8250/8250_exar.c
  20. @@ -338,12 +338,15 @@ static const struct exar8250_platform iot2040_platform = {
  21. .register_gpio = iot2040_register_gpio,
  22. };
  23. +/*
  24. + * For SIMATIC IOT2000, only IOT2040 and its variants have the Exar device,
  25. + * IOT2020 doesn't have. Therefore it is sufficient to match on the common
  26. + * board name after the device was found.
  27. + */
  28. static const struct dmi_system_id exar_platforms[] = {
  29. {
  30. .matches = {
  31. DMI_EXACT_MATCH(DMI_BOARD_NAME, "SIMATIC IOT2000"),
  32. - DMI_EXACT_MATCH(DMI_BOARD_ASSET_TAG,
  33. - "6ES7647-0AA00-1YA2"),
  34. },
  35. .driver_data = (void *)&iot2040_platform,
  36. },
  37. --
  38. 2.16.4