]> git.proxmox.com Git - mirror_ubuntu-jammy-kernel.git/blame - include/misc/charlcd.h
Merge branch 'timers-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel...
[mirror_ubuntu-jammy-kernel.git] / include / misc / 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
9struct charlcd {
10 const struct charlcd_ops *ops;
11 const unsigned char *char_conv; /* Optional */
12
ac201479 13 int ifwidth; /* 4-bit or 8-bit (default) */
39f8ea46
GU
14 int height;
15 int width;
16 int bwidth; /* Default set by charlcd_alloc() */
17 int hwidth; /* Default set by charlcd_alloc() */
18
19 void *drvdata; /* Set by charlcd_alloc() */
20};
21
22struct charlcd_ops {
23 /* Required */
24 void (*write_cmd)(struct charlcd *lcd, int cmd);
25 void (*write_data)(struct charlcd *lcd, int data);
26
27 /* Optional */
ac201479 28 void (*write_cmd_raw4)(struct charlcd *lcd, int cmd); /* 4-bit only */
39f8ea46
GU
29 void (*clear_fast)(struct charlcd *lcd);
30 void (*backlight)(struct charlcd *lcd, int on);
31};
32
33struct charlcd *charlcd_alloc(unsigned int drvdata_size);
8e44fc85 34void charlcd_free(struct charlcd *lcd);
39f8ea46
GU
35
36int charlcd_register(struct charlcd *lcd);
37int charlcd_unregister(struct charlcd *lcd);
38
39void charlcd_poke(struct charlcd *lcd);