]> git.proxmox.com Git - mirror_ubuntu-hirsute-kernel.git/blame - drivers/auxdisplay/charlcd.h
Merge tag 'devicetree-for-5.4' of git://git.kernel.org/pub/scm/linux/kernel/git/robh...
[mirror_ubuntu-hirsute-kernel.git] / drivers / auxdisplay / charlcd.h
CommitLineData
2874c5fd 1/* SPDX-License-Identifier: GPL-2.0-or-later */
39f8ea46
GU
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
39f8ea46
GU
7 */
8
390235c3
MY
9#ifndef _CHARLCD_H
10#define _CHARLCD_H
11
39f8ea46
GU
12struct charlcd {
13 const struct charlcd_ops *ops;
14 const unsigned char *char_conv; /* Optional */
15
ac201479 16 int ifwidth; /* 4-bit or 8-bit (default) */
39f8ea46
GU
17 int height;
18 int width;
19 int bwidth; /* Default set by charlcd_alloc() */
20 int hwidth; /* Default set by charlcd_alloc() */
21
22 void *drvdata; /* Set by charlcd_alloc() */
23};
24
25struct charlcd_ops {
26 /* Required */
27 void (*write_cmd)(struct charlcd *lcd, int cmd);
28 void (*write_data)(struct charlcd *lcd, int data);
29
30 /* Optional */
ac201479 31 void (*write_cmd_raw4)(struct charlcd *lcd, int cmd); /* 4-bit only */
39f8ea46
GU
32 void (*clear_fast)(struct charlcd *lcd);
33 void (*backlight)(struct charlcd *lcd, int on);
34};
35
36struct charlcd *charlcd_alloc(unsigned int drvdata_size);
8e44fc85 37void charlcd_free(struct charlcd *lcd);
39f8ea46
GU
38
39int charlcd_register(struct charlcd *lcd);
40int charlcd_unregister(struct charlcd *lcd);
41
42void charlcd_poke(struct charlcd *lcd);
390235c3
MY
43
44#endif /* CHARLCD_H */