mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
synced 2025-01-07 14:32:23 +00:00
01ec46dfa6
The init_display function is moved over to hd44780_common. charlcd uses it via its ops function pointer and drivers initialize the ops with the common hd44780_common_init_display function. Reviewed-by: Willy Tarreau <w@1wt.eu> Signed-off-by: Lars Poeschel <poeschel@lemonage.de> Signed-off-by: Miguel Ojeda <ojeda@kernel.org>
24 lines
897 B
C
24 lines
897 B
C
/* SPDX-License-Identifier: GPL-2.0-or-later */
|
|
|
|
#define DEFAULT_LCD_BWIDTH 40
|
|
#define DEFAULT_LCD_HWIDTH 64
|
|
|
|
struct hd44780_common {
|
|
int ifwidth; /* 4-bit or 8-bit (default) */
|
|
int bwidth; /* Default set by hd44780_alloc() */
|
|
int hwidth; /* Default set by hd44780_alloc() */
|
|
unsigned long hd44780_common_flags;
|
|
void (*write_data)(struct hd44780_common *hdc, int data);
|
|
void (*write_cmd)(struct hd44780_common *hdc, int cmd);
|
|
/* write_cmd_raw4 is for 4-bit connected displays only */
|
|
void (*write_cmd_raw4)(struct hd44780_common *hdc, int cmd);
|
|
void *hd44780;
|
|
};
|
|
|
|
int hd44780_common_print(struct charlcd *lcd, int c);
|
|
int hd44780_common_gotoxy(struct charlcd *lcd);
|
|
int hd44780_common_home(struct charlcd *lcd);
|
|
int hd44780_common_clear_display(struct charlcd *lcd);
|
|
int hd44780_common_init_display(struct charlcd *lcd);
|
|
struct hd44780_common *hd44780_common_alloc(void);
|