public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] auxdisplay: linedisp: Support configuring the boot message
@ 2024-05-30 23:20 Chris Packham
  2024-05-31  7:45 ` Geert Uytterhoeven
  2024-05-31 15:35 ` Andy Shevchenko
  0 siblings, 2 replies; 12+ messages in thread
From: Chris Packham @ 2024-05-30 23:20 UTC (permalink / raw)
  To: andy, geert, tzimmermann, ojeda; +Cc: linux-kernel, Chris Packham

Like we do for charlcd, allow the configuration of the initial message
on line-display devices.

Signed-off-by: Chris Packham <chris.packham@alliedtelesis.co.nz>
---
 drivers/auxdisplay/Kconfig        |  2 +-
 drivers/auxdisplay/line-display.c | 10 +++++++++-
 2 files changed, 10 insertions(+), 2 deletions(-)

diff --git a/drivers/auxdisplay/Kconfig b/drivers/auxdisplay/Kconfig
index 69d2138d7efb..21545ffba065 100644
--- a/drivers/auxdisplay/Kconfig
+++ b/drivers/auxdisplay/Kconfig
@@ -316,7 +316,7 @@ endif # PARPORT_PANEL
 
 config PANEL_CHANGE_MESSAGE
 	bool "Change LCD initialization message ?"
-	depends on CHARLCD
+	depends on CHARLCD || LINEDISP
 	help
 	  This allows you to replace the boot message indicating the kernel version
 	  and the driver version with a custom message. This is useful on appliances
diff --git a/drivers/auxdisplay/line-display.c b/drivers/auxdisplay/line-display.c
index e2b546210f8d..837ca63c8368 100644
--- a/drivers/auxdisplay/line-display.c
+++ b/drivers/auxdisplay/line-display.c
@@ -8,7 +8,9 @@
  * Copyright (C) 2021 Glider bv
  */
 
+#ifndef CONFIG_PANEL_BOOT_MESSAGE
 #include <generated/utsrelease.h>
+#endif
 
 #include <linux/container_of.h>
 #include <linux/device.h>
@@ -312,6 +314,12 @@ static int linedisp_init_map(struct linedisp *linedisp)
 	return 0;
 }
 
+#ifdef CONFIG_PANEL_BOOT_MESSAGE
+#define LINE_DISP_INIT_TEXT CONFIG_PANEL_BOOT_MESSAGE
+#else
+#define LINE_DISP_INIT_TEXT "Linux " UTS_RELEASE "       "
+#endif
+
 /**
  * linedisp_register - register a character line display
  * @linedisp: pointer to character line display structure
@@ -359,7 +367,7 @@ int linedisp_register(struct linedisp *linedisp, struct device *parent,
 		goto out_del_timer;
 
 	/* display a default message */
-	err = linedisp_display(linedisp, "Linux " UTS_RELEASE "       ", -1);
+	err = linedisp_display(linedisp, LINE_DISP_INIT_TEXT, -1);
 	if (err)
 		goto out_del_dev;
 
-- 
2.45.1


^ permalink raw reply related	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2024-06-04  7:31 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-05-30 23:20 [PATCH] auxdisplay: linedisp: Support configuring the boot message Chris Packham
2024-05-31  7:45 ` Geert Uytterhoeven
2024-05-31  8:16   ` Andy Shevchenko
2024-05-31  8:22     ` Geert Uytterhoeven
2024-05-31 13:43       ` Andy Shevchenko
2024-05-31 19:12         ` Geert Uytterhoeven
2024-05-31 19:27           ` Andy Shevchenko
2024-05-31 15:35 ` Andy Shevchenko
2024-06-03 21:20   ` Chris Packham
2024-06-03 21:59   ` Chris Packham
2024-06-04  7:27     ` Andy Shevchenko
2024-06-04  7:30       ` Andy Shevchenko

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox