summaryrefslogtreecommitdiff
path: root/drivers/auxdisplay/charlcd.h
diff options
context:
space:
mode:
authorLars Poeschel <poeschel@lemonage.de>2020-11-03 10:58:12 +0100
committerMiguel Ojeda <ojeda@kernel.org>2020-11-04 11:04:03 +0100
commitd3a2fb810f273b7a2c393d4de28ae91a3f76985d (patch)
tree4d115a26af764f1a08b3a949771d2d1cb451d3bb /drivers/auxdisplay/charlcd.h
parentb26deabb1d915fe87d395081bbd3058b938dee89 (diff)
auxdisplay: provide hd44780_common_gotoxy
Provide a hd44780_common_gotoxy function and a pointer in the ops for charlcd to use to move the cursor. Reviewed-by: Willy Tarreau <w@1wt.eu> Signed-off-by: Lars Poeschel <poeschel@lemonage.de> Signed-off-by: Miguel Ojeda <ojeda@kernel.org>
Diffstat (limited to 'drivers/auxdisplay/charlcd.h')
-rw-r--r--drivers/auxdisplay/charlcd.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/auxdisplay/charlcd.h b/drivers/auxdisplay/charlcd.h
index 94922e3c1c4c..f36cc80ce385 100644
--- a/drivers/auxdisplay/charlcd.h
+++ b/drivers/auxdisplay/charlcd.h
@@ -37,14 +37,16 @@ struct charlcd {
* Optional.
* @backlight: Turn backlight on or off. Optional.
* @print: Print one character to the display at current cursor position.
- * The cursor is advanced by charlcd.
* The buffered cursor position is advanced by charlcd. The cursor should not
* wrap to the next line at the end of a line.
+ * @gotoxy: Set cursor to x, y. The x and y values to set the cursor to are
+ * previously set in addr.x and addr.y by charlcd.
*/
struct charlcd_ops {
void (*clear_fast)(struct charlcd *lcd);
void (*backlight)(struct charlcd *lcd, enum charlcd_onoff on);
int (*print)(struct charlcd *lcd, int c);
+ int (*gotoxy)(struct charlcd *lcd);
};
struct charlcd *charlcd_alloc(void);