Skip to content

staging: fbtft: add and use macro FBTFT_REGISTER_SPI_DRIVER

Heiner Kallweit dri-devel linux-fbdev linux-staging 1 version New

Get series with b4
b4 am [email protected]

Versions newest first

  1. v2 Latest2 patches 0 repliesNew

Changes in v2 from the cover letter

- consider that spi id_table name consists of device part of compatible string only
- instead of changing the existing macro, add a new one and make fb_sh1106 the first user

Patches in v2 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/2staging: fbtft: add macro FBTFT_REGISTER_SPI_DRIVERdrivers/staging/fbtft/fbtft.h+41 -00 replies
2/2staging: fbtft: sh1106: use new macro FBTFT_REGISTER_SPI_DRIVERdrivers/staging/fbtft/fb_sh1106.c+1 -60 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v2 yet.

Read the v2 thread

Cover letter [PATCH v2 0/2] staging: fbtft: add and use macro FBTFT_REGISTER_SPI_DRIVER

After 5fa6863ba692 ("spi: Check we have a spi_device_id for each DT compatible") we need to add spi id_tables. Changing existing macro FBTFT_REGISTER_DRIVER would have meant to change arguments and therefore adjust all fbtft drivers.

This series adds a new and simplified macro FBTFT_REGISTER_SPI_DRIVER that includes a spi id_table, and in addition to that:
- does not define a platform driver
- uses macro module_spi_driver()

Also the MODULE_ALIASes can be removed.

Works for me with a SH1106-based OLED display incl. module autoload. For now I changed this driver only because I have hw to test it.

v2:
- consider that spi id_table name consists of device part of compatible string only
- instead of changing the existing macro, add a new one and make fb_sh1106 the first user

Heiner Kallweit (2):
staging: fbtft: add macro FBTFT_REGISTER_SPI_DRIVER
staging: fbtft: sh1106: use new macro FBTFT_REGISTER_SPI_DRIVER

 drivers/staging/fbtft/fb_sh1106.c |  7 +-----
 drivers/staging/fbtft/fbtft.h     | 41 +++++++++++++++++++++++++++++++
 2 files changed, 42 insertions(+), 6 deletions(-)
Signature · 1 line
2.34.1