diff options
author | Geert Uytterhoeven <geert@linux-m68k.org> | 2017-03-10 09:15:18 -0500 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2017-03-17 02:10:49 -0400 |
commit | ac201479cc695cb0140e425b9ca8ab2ecdcd2f0d (patch) | |
tree | 78929b3866d2bc0af026c538cd20b72de477c5da /include/misc | |
parent | 39f8ea46724efbed3ca021863a22337c31be264c (diff) |
auxdisplay: charlcd: Add support for 4-bit interfaces
In 4-bit mode, 8-bit commands and data are written using two raw writes
to the data interface: high nibble first, low nibble last. This must be
handled by the low-level driver.
However, as we don't know in which mode (4-bit or 8-bit) nor 4-bit phase
the LCD was left, initialization must always be handled using raw
writes, and needs to configure the LCD for 8-bit mode first.
Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'include/misc')
-rw-r--r-- | include/misc/charlcd.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/include/misc/charlcd.h b/include/misc/charlcd.h index c40047b673c9..23f61850f363 100644 --- a/include/misc/charlcd.h +++ b/include/misc/charlcd.h | |||
@@ -14,6 +14,7 @@ struct charlcd { | |||
14 | const struct charlcd_ops *ops; | 14 | const struct charlcd_ops *ops; |
15 | const unsigned char *char_conv; /* Optional */ | 15 | const unsigned char *char_conv; /* Optional */ |
16 | 16 | ||
17 | int ifwidth; /* 4-bit or 8-bit (default) */ | ||
17 | int height; | 18 | int height; |
18 | int width; | 19 | int width; |
19 | int bwidth; /* Default set by charlcd_alloc() */ | 20 | int bwidth; /* Default set by charlcd_alloc() */ |
@@ -28,6 +29,7 @@ struct charlcd_ops { | |||
28 | void (*write_data)(struct charlcd *lcd, int data); | 29 | void (*write_data)(struct charlcd *lcd, int data); |
29 | 30 | ||
30 | /* Optional */ | 31 | /* Optional */ |
32 | void (*write_cmd_raw4)(struct charlcd *lcd, int cmd); /* 4-bit only */ | ||
31 | void (*clear_fast)(struct charlcd *lcd); | 33 | void (*clear_fast)(struct charlcd *lcd); |
32 | void (*backlight)(struct charlcd *lcd, int on); | 34 | void (*backlight)(struct charlcd *lcd, int on); |
33 | }; | 35 | }; |