[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20201005130128.3430804-11-poeschel@lemonage.de>
Date: Mon, 5 Oct 2020 15:01:19 +0200
From: poeschel@...onage.de
To: Miguel Ojeda Sandonis <miguel.ojeda.sandonis@...il.com>,
linux-kernel@...r.kernel.org (open list)
Cc: Lars Poeschel <poeschel@...onage.de>, Willy Tarreau <w@....eu>
Subject: [PATCH v4 23/32] auxdisplay: Remove unnecessary hd44780 from charlcd
From: Lars Poeschel <poeschel@...onage.de>
The last two commits made another chunk of hd44780 code unnecessary
which we remove here.
Reviewed-by: Willy Tarreau <w@....eu>
Signed-off-by: Lars Poeschel <poeschel@...onage.de>
---
drivers/auxdisplay/charlcd.c | 17 +----------------
1 file changed, 1 insertion(+), 16 deletions(-)
diff --git a/drivers/auxdisplay/charlcd.c b/drivers/auxdisplay/charlcd.c
index d672e4c371e1..29737c3e18f6 100644
--- a/drivers/auxdisplay/charlcd.c
+++ b/drivers/auxdisplay/charlcd.c
@@ -25,16 +25,8 @@
/* Keep the backlight on this many seconds for each flash */
#define LCD_BL_TEMPO_PERIOD 4
-/* LCD commands */
-#define LCD_CMD_FUNCTION_SET 0x20 /* Set function */
-#define LCD_CMD_DATA_LEN_8BITS 0x10 /* Set data length to 8 bits */
-#define LCD_CMD_TWO_LINES 0x08 /* Set to two display lines */
-#define LCD_CMD_FONT_5X10_DOTS 0x04 /* Set char font to 5x10 dots */
-
#define LCD_CMD_SET_CGRAM_ADDR 0x40 /* Set char generator RAM address */
-#define LCD_CMD_SET_DDRAM_ADDR 0x80 /* Set display data RAM address */
-
#define LCD_ESCAPE_LEN 24 /* Max chars for LCD escape command */
#define LCD_ESCAPE_CHAR 27 /* Use char 27 for escape command */
@@ -426,14 +418,7 @@ static inline int handle_lcd_special_code(struct charlcd *lcd)
if (oldflags == priv->flags)
return processed;
- if ((oldflags ^ priv->flags) & (LCD_FLAG_F | LCD_FLAG_N))
- hdc->write_cmd(hdc,
- LCD_CMD_FUNCTION_SET |
- ((hdc->ifwidth == 8) ? LCD_CMD_DATA_LEN_8BITS : 0) |
- ((priv->flags & LCD_FLAG_F) ? LCD_CMD_FONT_5X10_DOTS : 0) |
- ((priv->flags & LCD_FLAG_N) ? LCD_CMD_TWO_LINES : 0));
- /* check whether L flag was changed */
- else if ((oldflags ^ priv->flags) & LCD_FLAG_L)
+ if ((oldflags ^ priv->flags) & LCD_FLAG_L)
charlcd_backlight(lcd, !!(priv->flags & LCD_FLAG_L));
return processed;
--
2.28.0
Powered by blists - more mailing lists