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() */ 10*01ec46dfSLars Poeschel unsigned long hd44780_common_flags; 1171ff701bSLars Poeschel void (*write_data)(struct hd44780_common *hdc, int data); 122c6a82f2SLars Poeschel void (*write_cmd)(struct hd44780_common *hdc, int cmd); 132c6a82f2SLars Poeschel /* write_cmd_raw4 is for 4-bit connected displays only */ 142c6a82f2SLars Poeschel void (*write_cmd_raw4)(struct hd44780_common *hdc, int cmd); 15718e05edSLars Poeschel void *hd44780; 16718e05edSLars Poeschel }; 17718e05edSLars Poeschel 18b26deabbSLars Poeschel int hd44780_common_print(struct charlcd *lcd, int c); 19d3a2fb81SLars Poeschel int hd44780_common_gotoxy(struct charlcd *lcd); 2088645a86SLars Poeschel int hd44780_common_home(struct charlcd *lcd); 2145421ffeSLars Poeschel int hd44780_common_clear_display(struct charlcd *lcd); 22*01ec46dfSLars Poeschel int hd44780_common_init_display(struct charlcd *lcd); 23718e05edSLars Poeschel struct hd44780_common *hd44780_common_alloc(void); 24