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