auxdisplay: linedisp: Support configuring the boot message
authorChris Packham <chris.packham@alliedtelesis.co.nz>
Thu, 30 May 2024 23:20:54 +0000 (11:20 +1200)
committerAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Tue, 4 Jun 2024 07:29:36 +0000 (10:29 +0300)
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>
Reviewed-by: Geert Uytterhoeven <geert@linux-m68k.org>
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
drivers/auxdisplay/Kconfig
drivers/auxdisplay/line-display.c

index 69d2138d7efb59d49ddd8414581615f2378fc914..21545ffba0658f6bca1c71436f18c48674dd7e9d 100644 (file)
@@ -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
index e2b546210f8d8d6d20199044699147f307577a2c..978dc457ca5fecf3dc195468355709f2ace3695b 100644 (file)
@@ -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 LINEDISP_INIT_TEXT CONFIG_PANEL_BOOT_MESSAGE
+#else
+#define LINEDISP_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, LINEDISP_INIT_TEXT, -1);
        if (err)
                goto out_del_dev;