On 2021-03-22 15:48, Geert Uytterhoeven wrote:
Extract the character line display core support from the simple ASCII LCD driver for the MIPS Boston, Malta & SEAD3 development boards into its own subdriver, so it can be reused for other displays. Note that this moves the "message" device attribute in sysfs in a "linedisp.N" subdirectory. Signed-off-by: Geert Uytterhoeven <geert@xxxxxxxxxxxxxx> --- Changes to img-ascii-lcd.c are untested due to lack of hardware. --- drivers/auxdisplay/Kconfig | 8 + drivers/auxdisplay/Makefile | 1 + drivers/auxdisplay/img-ascii-lcd.c | 198 +++---------------------- drivers/auxdisplay/line-display.c | 231 +++++++++++++++++++++++++++++ drivers/auxdisplay/line-display.h | 43 ++++++ 5 files changed, 304 insertions(+), 177 deletions(-) create mode 100644 drivers/auxdisplay/line-display.c create mode 100644 drivers/auxdisplay/line-display.h diff --git a/drivers/auxdisplay/Kconfig b/drivers/auxdisplay/Kconfig index 1509cb74705a30ad..42fc7b155de09dbc 100644 --- a/drivers/auxdisplay/Kconfig +++ b/drivers/auxdisplay/Kconfig @@ -25,6 +25,12 @@ config CHARLCD This is some character LCD core interface that multiple drivers can use. +config LINEDISP + tristate "Character line display core support" if COMPILE_TEST + help + This is the core support for single-line character displays, to be + selected by drivers that use it. + config HD44780_COMMON tristate "Common functions for HD44780 (and compatibles) LCD displays" if COMPILE_TEST select CHARLCD @@ -155,6 +161,7 @@ config IMG_ASCII_LCD depends on HAS_IOMEM default y if MIPS_MALTA select MFD_SYSCON + select LINEDISP help Enable this to support the simple ASCII LCD displays found on development boards such as the MIPS Boston, MIPS Malta & MIPS SEAD3 @@ -169,6 +176,7 @@ config HT16K33 select FB_SYS_IMAGEBLIT select INPUT_MATRIXKMAP select FB_BACKLIGHT + select LINEDISP
At this point in your patch stack it's not used by the ht16k33 driver. I think it would be nicer to add this dependency when the code actually starts depending on it. So that when this patch stack gets applied partially or not in one go the chunks
would be independent.