]> git.baikalelectronics.ru Git - kernel.git/commit
drm/st7735r: Fix module autoloading for Okaya RH128128T
authorJavier Martinez Canillas <javierm@redhat.com>
Fri, 20 May 2022 09:16:02 +0000 (11:16 +0200)
committerJavier Martinez Canillas <javierm@redhat.com>
Mon, 23 May 2022 11:24:04 +0000 (13:24 +0200)
commit70ede75466c0807e453604ca77875f95b4042da2
tree3f57c1d6c19cd8e3d4767cec6d758cfe46813ed7
parent436fea039b91a06667d7c23ab723dc0ce3158d42
drm/st7735r: Fix module autoloading for Okaya RH128128T

The SPI core always reports a "MODALIAS=spi:<foo>", even if the device was
registered via OF. This means that the st7735r.ko module won't autoload if
a DT has a node with a compatible "okaya,rh128128t" string.

In that case, kmod expects a "MODALIAS=of:N*T*Cokaya,rh128128t" uevent but
instead will get a "MODALIAS=spi:rh128128t", which is not present in the
list of aliases:

  $ modinfo drivers/gpu/drm/tiny/st7735r.ko | grep alias
  alias:          of:N*T*Cokaya,rh128128tC*
  alias:          of:N*T*Cokaya,rh128128t
  alias:          of:N*T*Cjianda,jd-t18003-t01C*
  alias:          of:N*T*Cjianda,jd-t18003-t01
  alias:          spi:jd-t18003-t01

To workaround this issue, add in the SPI table an entry for that device.

Fixes: 5bdedda40bf4 ("drm: tiny: st7735r: Add support for Okaya RH128128T")
Signed-off-by: Javier Martinez Canillas <javierm@redhat.com>
Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
Acked-by: David Lechner <david@lechnology.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20220520091602.179078-1-javierm@redhat.com
drivers/gpu/drm/tiny/st7735r.c