diff options
author | Geert Uytterhoeven <geert@linux-m68k.org> | 2017-03-10 15:15:18 +0100 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2017-03-17 15:10:49 +0900 |
commit | ac201479cc695cb0140e425b9ca8ab2ecdcd2f0d (patch) | |
tree | 78929b3866d2bc0af026c538cd20b72de477c5da /include/misc/charlcd.h | |
parent | 39f8ea46724efbed3ca021863a22337c31be264c (diff) | |
download | linux-ac201479cc695cb0140e425b9ca8ab2ecdcd2f0d.tar.bz2 |
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/charlcd.h')
-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 { const struct charlcd_ops *ops; const unsigned char *char_conv; /* Optional */ + int ifwidth; /* 4-bit or 8-bit (default) */ int height; int width; int bwidth; /* Default set by charlcd_alloc() */ @@ -28,6 +29,7 @@ struct charlcd_ops { void (*write_data)(struct charlcd *lcd, int data); /* Optional */ + void (*write_cmd_raw4)(struct charlcd *lcd, int cmd); /* 4-bit only */ void (*clear_fast)(struct charlcd *lcd); void (*backlight)(struct charlcd *lcd, int on); }; |