From: Marcus Folkesson Date: Mon, 15 Dec 2025 09:46:47 +0000 (+0100) Subject: drm/sitronix/st7571: split up the driver into a common and an i2c part X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b362de167daf2f1e42a6d5ea2d4e51e8d9d031fd;p=thirdparty%2Fkernel%2Flinux.git drm/sitronix/st7571: split up the driver into a common and an i2c part Split up the driver to make it possible to add support for hw interfaces other than I2C. Reviewed-by: Javier Martinez Canillas Signed-off-by: Marcus Folkesson Link: https://patch.msgid.link/20251215-st7571-split-v3-5-d5f3205c3138@gmail.com Signed-off-by: Javier Martinez Canillas --- diff --git a/MAINTAINERS b/MAINTAINERS index c4bc270679a5..d4a6379812e4 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -8201,6 +8201,7 @@ S: Maintained F: Documentation/devicetree/bindings/display/sitronix,st7567.yaml F: Documentation/devicetree/bindings/display/sitronix,st7571.yaml F: drivers/gpu/drm/sitronix/st7571-i2c.c +F: drivers/gpu/drm/sitronix/st7571.c F: drivers/gpu/drm/sitronix/st7571.h DRM DRIVER FOR SITRONIX ST7701 PANELS diff --git a/drivers/gpu/drm/sitronix/Kconfig b/drivers/gpu/drm/sitronix/Kconfig index 6de7d92d9b74..203c53fff402 100644 --- a/drivers/gpu/drm/sitronix/Kconfig +++ b/drivers/gpu/drm/sitronix/Kconfig @@ -1,13 +1,29 @@ -config DRM_ST7571_I2C - tristate "DRM support for Sitronix ST7571 display panels (I2C)" - depends on DRM && I2C && MMU +config DRM_ST7571 + tristate "DRM support for Sitronix ST7567/ST7571 display panels" + depends on DRM && MMU select DRM_CLIENT_SELECTION select DRM_GEM_SHMEM_HELPER select DRM_KMS_HELPER - select REGMAP_I2C select VIDEOMODE_HELPERS help - DRM driver for Sitronix ST7571 panels controlled over I2C. + Sitronix ST7571 is a driver and controller for 4-level gray + scale and monochrome dot matrix LCD panels. + + DRM driver for Sitronix ST7567/ST7571 panels. + This is only the core driver, a driver for the appropriate bus + transport in your chip also must be selected. + + if M is selected the module will be called st7571. + +config DRM_ST7571_I2C + tristate "DRM support for Sitronix ST7567/ST7571 display panels (I2C)" + depends on DRM_ST7571 && I2C + select REGMAP + help + Sitronix ST7571 is a driver and controller for 4-level gray + scale and monochrome dot matrix LCD panels. + + DRM driver for Sitronix ST7565/ST7571 panels connected via I2C bus. if M is selected the module will be called st7571-i2c. diff --git a/drivers/gpu/drm/sitronix/Makefile b/drivers/gpu/drm/sitronix/Makefile index bd139e5a6995..8073bb776ff9 100644 --- a/drivers/gpu/drm/sitronix/Makefile +++ b/drivers/gpu/drm/sitronix/Makefile @@ -1,3 +1,4 @@ +obj-$(CONFIG_DRM_ST7571) += st7571.o obj-$(CONFIG_DRM_ST7571_I2C) += st7571-i2c.o obj-$(CONFIG_DRM_ST7586) += st7586.o obj-$(CONFIG_DRM_ST7735R) += st7735r.o diff --git a/drivers/gpu/drm/sitronix/st7571-i2c.c b/drivers/gpu/drm/sitronix/st7571-i2c.c index f994ace40739..44bc94be33d6 100644 --- a/drivers/gpu/drm/sitronix/st7571-i2c.c +++ b/drivers/gpu/drm/sitronix/st7571-i2c.c @@ -1,85 +1,16 @@ // SPDX-License-Identifier: GPL-2.0-or-later /* - * Driver for Sitronix ST7571, a 4 level gray scale dot matrix LCD controller + * Driver for Sitronix ST7571 connected via I2C bus. * * Copyright (C) 2025 Marcus Folkesson */ -#include -#include -#include #include #include #include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include