950-0837-input-ads7846-Add-missing-spi_device_id-strings.patch 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. From 50c5a8558f4aaa54a3c4f5a8c2b6053f641d94eb Mon Sep 17 00:00:00 2001
  2. From: Dave Stevenson <[email protected]>
  3. Date: Fri, 1 Sep 2023 12:23:30 +0100
  4. Subject: [PATCH] input: ads7846: Add missing spi_device_id strings
  5. The SPI core logs error messages if a compatible string device
  6. name is not also present as an spi_device_id.
  7. No spi_device_id values are specified by the driver, therefore
  8. we get 4 log lines every time it is loaded:
  9. SPI driver ads7846 has no spi_device_id for ti,tsc2046
  10. SPI driver ads7846 has no spi_device_id for ti,ads7843
  11. SPI driver ads7846 has no spi_device_id for ti,ads7845
  12. SPI driver ads7846 has no spi_device_id for ti,ads7873
  13. Add the spi_device_id values for these devices.
  14. Signed-off-by: Dave Stevenson <[email protected]>
  15. ---
  16. drivers/input/touchscreen/ads7846.c | 12 ++++++++++++
  17. 1 file changed, 12 insertions(+)
  18. --- a/drivers/input/touchscreen/ads7846.c
  19. +++ b/drivers/input/touchscreen/ads7846.c
  20. @@ -1127,6 +1127,17 @@ static const struct of_device_id ads7846
  21. };
  22. MODULE_DEVICE_TABLE(of, ads7846_dt_ids);
  23. +static const struct spi_device_id ads7846_spi_ids[] = {
  24. + { "tsc2046", 0 },
  25. + { "ads7843", 0 },
  26. + { "ads7843", 0 },
  27. + { "ads7845", 0 },
  28. + { "ads7846", 0 },
  29. + { "ads7873", 0 },
  30. + { }
  31. +};
  32. +MODULE_DEVICE_TABLE(spi, ads7846_spi_ids);
  33. +
  34. static const struct ads7846_platform_data *ads7846_probe_dt(struct device *dev)
  35. {
  36. struct ads7846_platform_data *pdata;
  37. @@ -1424,6 +1435,7 @@ static struct spi_driver ads7846_driver
  38. .pm = &ads7846_pm,
  39. .of_match_table = of_match_ptr(ads7846_dt_ids),
  40. },
  41. + .id_table = ads7846_spi_ids,
  42. .probe = ads7846_probe,
  43. .remove = ads7846_remove,
  44. };