Skip to content

Commit 5ea0cf7

Browse files
committed
Merge tag 'auxdisplay-6.6' of https://github.com/ojeda/linux
Pull auxdisplay update from Miguel Ojeda: - hd44780: move cursor home after clear display command The change allows to support displays like the NewHaven NHD-0220DZW-AG5 which has a non-standard controller. * tag 'auxdisplay-6.6' of https://github.com/ojeda/linux: auxdisplay: hd44780: move cursor home after clear display command
2 parents a031fe8 + 35b464e commit 5ea0cf7

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

drivers/auxdisplay/hd44780_common.c

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,15 @@ int hd44780_common_clear_display(struct charlcd *lcd)
8282
hdc->write_cmd(hdc, LCD_CMD_DISPLAY_CLEAR);
8383
/* datasheet says to wait 1,64 milliseconds */
8484
long_sleep(2);
85-
return 0;
85+
86+
/*
87+
* The Hitachi HD44780 controller (and compatible ones) reset the DDRAM
88+
* address when executing the DISPLAY_CLEAR command, thus the
89+
* following call is not required. However, other controllers do not
90+
* (e.g. NewHaven NHD-0220DZW-AG5), thus move the cursor to home
91+
* unconditionally to support both.
92+
*/
93+
return hd44780_common_home(lcd);
8694
}
8795
EXPORT_SYMBOL_GPL(hd44780_common_clear_display);
8896

0 commit comments

Comments
 (0)