From 88645a86e3420cddfe5bb9cd8d7c15aff8f54b46 Mon Sep 17 00:00:00 2001 From: Lars Poeschel Date: Tue, 3 Nov 2020 10:58:13 +0100 Subject: auxdisplay: add home to charlcd_ops This adds a home function to the charlcd_ops struct and offer an implementation for hd44780_common. This implementation is used by our two hd44780 drivers. This is to make charlcd device independent. Reviewed-by: Willy Tarreau Signed-off-by: Lars Poeschel Signed-off-by: Miguel Ojeda --- drivers/auxdisplay/hd44780_common.c | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'drivers/auxdisplay/hd44780_common.c') diff --git a/drivers/auxdisplay/hd44780_common.c b/drivers/auxdisplay/hd44780_common.c index f86eb2f27cee..ea62beada9d8 100644 --- a/drivers/auxdisplay/hd44780_common.c +++ b/drivers/auxdisplay/hd44780_common.c @@ -41,6 +41,14 @@ int hd44780_common_gotoxy(struct charlcd *lcd) } EXPORT_SYMBOL_GPL(hd44780_common_gotoxy); +int hd44780_common_home(struct charlcd *lcd) +{ + lcd->addr.x = 0; + lcd->addr.y = 0; + return hd44780_common_gotoxy(lcd); +} +EXPORT_SYMBOL_GPL(hd44780_common_home); + struct hd44780_common *hd44780_common_alloc(void) { struct hd44780_common *hd; -- cgit v1.2.3