diff options
| -rw-r--r-- | drivers/auxdisplay/Kconfig | 21 | ||||
| -rw-r--r-- | drivers/auxdisplay/charlcd.c | 10 |
2 files changed, 30 insertions, 1 deletions
diff --git a/drivers/auxdisplay/Kconfig b/drivers/auxdisplay/Kconfig index 7d3fe27d6868..c52c738e554a 100644 --- a/drivers/auxdisplay/Kconfig +++ b/drivers/auxdisplay/Kconfig | |||
| @@ -445,6 +445,27 @@ config PANEL_BOOT_MESSAGE | |||
| 445 | An empty message will only clear the display at driver init time. Any other | 445 | An empty message will only clear the display at driver init time. Any other |
| 446 | printf()-formatted message is valid with newline and escape codes. | 446 | printf()-formatted message is valid with newline and escape codes. |
| 447 | 447 | ||
| 448 | choice | ||
| 449 | prompt "Backlight initial state" | ||
| 450 | default CHARLCD_BL_FLASH | ||
| 451 | |||
| 452 | config CHARLCD_BL_OFF | ||
| 453 | bool "Off" | ||
| 454 | help | ||
| 455 | Backlight is initially turned off | ||
| 456 | |||
| 457 | config CHARLCD_BL_ON | ||
| 458 | bool "On" | ||
| 459 | help | ||
| 460 | Backlight is initially turned on | ||
| 461 | |||
| 462 | config CHARLCD_BL_FLASH | ||
| 463 | bool "Flash" | ||
| 464 | help | ||
| 465 | Backlight is flashed briefly on init | ||
| 466 | |||
| 467 | endchoice | ||
| 468 | |||
| 448 | endif # AUXDISPLAY | 469 | endif # AUXDISPLAY |
| 449 | 470 | ||
| 450 | config PANEL | 471 | config PANEL |
diff --git a/drivers/auxdisplay/charlcd.c b/drivers/auxdisplay/charlcd.c index 5212675564d7..92745efefb54 100644 --- a/drivers/auxdisplay/charlcd.c +++ b/drivers/auxdisplay/charlcd.c | |||
| @@ -769,6 +769,14 @@ static void charlcd_puts(struct charlcd *lcd, const char *s) | |||
| 769 | #define LCD_INIT_TEXT "Linux-" UTS_RELEASE "\n" | 769 | #define LCD_INIT_TEXT "Linux-" UTS_RELEASE "\n" |
| 770 | #endif | 770 | #endif |
| 771 | 771 | ||
| 772 | #ifdef CONFIG_CHARLCD_BL_ON | ||
| 773 | #define LCD_INIT_BL "\x1b[L+" | ||
| 774 | #elif defined(CONFIG_CHARLCD_BL_FLASH) | ||
| 775 | #define LCD_INIT_BL "\x1b[L*" | ||
| 776 | #else | ||
| 777 | #define LCD_INIT_BL "\x1b[L-" | ||
| 778 | #endif | ||
| 779 | |||
| 772 | /* initialize the LCD driver */ | 780 | /* initialize the LCD driver */ |
| 773 | static int charlcd_init(struct charlcd *lcd) | 781 | static int charlcd_init(struct charlcd *lcd) |
| 774 | { | 782 | { |
| @@ -790,7 +798,7 @@ static int charlcd_init(struct charlcd *lcd) | |||
| 790 | return ret; | 798 | return ret; |
| 791 | 799 | ||
| 792 | /* display a short message */ | 800 | /* display a short message */ |
| 793 | charlcd_puts(lcd, "\x1b[Lc\x1b[Lb\x1b[L*" LCD_INIT_TEXT); | 801 | charlcd_puts(lcd, "\x1b[Lc\x1b[Lb" LCD_INIT_BL LCD_INIT_TEXT); |
| 794 | 802 | ||
| 795 | /* clear the display on the next device opening */ | 803 | /* clear the display on the next device opening */ |
| 796 | priv->must_clear = true; | 804 | priv->must_clear = true; |
