1718e05edSLars Poeschel /* SPDX-License-Identifier: GPL-2.0-or-later */ 2718e05edSLars Poeschel 32545c1c9SLars Poeschel #define DEFAULT_LCD_BWIDTH 40 42545c1c9SLars Poeschel #define DEFAULT_LCD_HWIDTH 64 52545c1c9SLars Poeschel 6718e05edSLars Poeschel struct hd44780_common { 73fc04dd7SLars Poeschel int ifwidth; /* 4-bit or 8-bit (default) */ 82545c1c9SLars Poeschel int bwidth; /* Default set by hd44780_alloc() */ 92545c1c9SLars Poeschel int hwidth; /* Default set by hd44780_alloc() */ 1071ff701bSLars Poeschel void (*write_data)(struct hd44780_common *hdc, int data); 112c6a82f2SLars Poeschel void (*write_cmd)(struct hd44780_common *hdc, int cmd); 122c6a82f2SLars Poeschel /* write_cmd_raw4 is for 4-bit connected displays only */ 132c6a82f2SLars Poeschel void (*write_cmd_raw4)(struct hd44780_common *hdc, int cmd); 14718e05edSLars Poeschel void *hd44780; 15718e05edSLars Poeschel }; 16718e05edSLars Poeschel 17b26deabbSLars Poeschel int hd44780_common_print(struct charlcd *lcd, int c); 18d3a2fb81SLars Poeschel int hd44780_common_gotoxy(struct charlcd *lcd); 1988645a86SLars Poeschel int hd44780_common_home(struct charlcd *lcd); 20*45421ffeSLars Poeschel int hd44780_common_clear_display(struct charlcd *lcd); 21718e05edSLars Poeschel struct hd44780_common *hd44780_common_alloc(void); 22