bcm27xx: update 6.1 patches to latest version
[openwrt/staging/dangole.git] / target / linux / bcm27xx / patches-6.1 / 950-0836-drm-ili9486-Resolve-clash-in-spi_device_id-names.patch
1 From f59fe2d1bd056af117eb512bb0e9210a943c6d47 Mon Sep 17 00:00:00 2001
2 From: Dave Stevenson <dave.stevenson@raspberrypi.com>
3 Date: Fri, 1 Sep 2023 12:17:38 +0100
4 Subject: [PATCH] drm/ili9486: Resolve clash in spi_device_id names
5
6 For "Really Good Reasons" [1] the SPI core requires a match
7 between compatible device strings and the name in spi_device_id.
8
9 The ili9486 driver uses compatible strings "waveshare,rpi-lcd-35"
10 and "ozzmaker,piscreen", but "rpi-lcd-35" and "piscreen" are missing,
11 so add them.
12
13 Compatible string "ilitek,ili9486" is already used by
14 staging/fbtft/fb_ili9486, therefore leaving it present in ili9486 as an
15 spi_device_id causes the incorrect module to be loaded, therefore remove
16 this id.
17
18 [1] https://elixir.bootlin.com/linux/latest/source/drivers/spi/spi.c#L487
19
20 Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com>
21 ---
22 drivers/gpu/drm/tiny/ili9486.c | 3 ++-
23 1 file changed, 2 insertions(+), 1 deletion(-)
24
25 --- a/drivers/gpu/drm/tiny/ili9486.c
26 +++ b/drivers/gpu/drm/tiny/ili9486.c
27 @@ -187,7 +187,8 @@ static const struct of_device_id ili9486
28 MODULE_DEVICE_TABLE(of, ili9486_of_match);
29
30 static const struct spi_device_id ili9486_id[] = {
31 - { "ili9486", 0 },
32 + { "rpi-lcd-35", 0 },
33 + { "piscreen", 0 },
34 { }
35 };
36 MODULE_DEVICE_TABLE(spi, ili9486_id);