xref: /openbmc/linux/drivers/auxdisplay/charlcd.h (revision 2c6a82f2)
1 /* SPDX-License-Identifier: GPL-2.0-or-later */
2 /*
3  * Character LCD driver for Linux
4  *
5  * Copyright (C) 2000-2008, Willy Tarreau <w@1wt.eu>
6  * Copyright (C) 2016-2017 Glider bvba
7  */
8 
9 #ifndef _CHARLCD_H
10 #define _CHARLCD_H
11 
12 enum charlcd_onoff {
13 	CHARLCD_OFF = 0,
14 	CHARLCD_ON,
15 };
16 
17 struct charlcd {
18 	const struct charlcd_ops *ops;
19 	const unsigned char *char_conv;	/* Optional */
20 
21 	int height;
22 	int width;
23 
24 	void *drvdata;
25 };
26 
27 struct charlcd_ops {
28 	void (*clear_fast)(struct charlcd *lcd);
29 	void (*backlight)(struct charlcd *lcd, enum charlcd_onoff on);
30 };
31 
32 struct charlcd *charlcd_alloc(void);
33 void charlcd_free(struct charlcd *lcd);
34 
35 int charlcd_register(struct charlcd *lcd);
36 int charlcd_unregister(struct charlcd *lcd);
37 
38 void charlcd_poke(struct charlcd *lcd);
39 
40 #endif /* CHARLCD_H */
41