fbdev: imsttfb: Fix use after free bug in imsttfb_probe
[linux-block.git] / drivers / auxdisplay / hd44780_common.h
CommitLineData
718e05ed
LP
1/* SPDX-License-Identifier: GPL-2.0-or-later */
2
2545c1c9
LP
3#define DEFAULT_LCD_BWIDTH 40
4#define DEFAULT_LCD_HWIDTH 64
5
718e05ed 6struct hd44780_common {
3fc04dd7 7 int ifwidth; /* 4-bit or 8-bit (default) */
2545c1c9
LP
8 int bwidth; /* Default set by hd44780_alloc() */
9 int hwidth; /* Default set by hd44780_alloc() */
01ec46df 10 unsigned long hd44780_common_flags;
71ff701b 11 void (*write_data)(struct hd44780_common *hdc, int data);
2c6a82f2
LP
12 void (*write_cmd)(struct hd44780_common *hdc, int cmd);
13 /* write_cmd_raw4 is for 4-bit connected displays only */
14 void (*write_cmd_raw4)(struct hd44780_common *hdc, int cmd);
718e05ed
LP
15 void *hd44780;
16};
17
b26deabb 18int hd44780_common_print(struct charlcd *lcd, int c);
40c2b72e 19int hd44780_common_gotoxy(struct charlcd *lcd, unsigned int x, unsigned int y);
88645a86 20int hd44780_common_home(struct charlcd *lcd);
45421ffe 21int hd44780_common_clear_display(struct charlcd *lcd);
01ec46df 22int hd44780_common_init_display(struct charlcd *lcd);
d2f2187e
LP
23int hd44780_common_shift_cursor(struct charlcd *lcd,
24 enum charlcd_shift_dir dir);
25int hd44780_common_shift_display(struct charlcd *lcd,
26 enum charlcd_shift_dir dir);
27int hd44780_common_display(struct charlcd *lcd, enum charlcd_onoff on);
28int hd44780_common_cursor(struct charlcd *lcd, enum charlcd_onoff on);
29int hd44780_common_blink(struct charlcd *lcd, enum charlcd_onoff on);
30int hd44780_common_fontsize(struct charlcd *lcd, enum charlcd_fontsize size);
31int hd44780_common_lines(struct charlcd *lcd, enum charlcd_lines lines);
339acb08 32int hd44780_common_redefine_char(struct charlcd *lcd, char *esc);
718e05ed 33struct hd44780_common *hd44780_common_alloc(void);