]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/blame - include/misc/charlcd.h
Merge tag 'jfs-4.13' of git://github.com/kleikamp/linux-shaggy
[mirror_ubuntu-bionic-kernel.git] / include / misc / charlcd.h
CommitLineData
39f8ea46
GU
1/*
2 * Character LCD driver for Linux
3 *
4 * Copyright (C) 2000-2008, Willy Tarreau <w@1wt.eu>
5 * Copyright (C) 2016-2017 Glider bvba
6 *
7 * This program is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU General Public License
9 * as published by the Free Software Foundation; either version
10 * 2 of the License, or (at your option) any later version.
11 */
12
13struct charlcd {
14 const struct charlcd_ops *ops;
15 const unsigned char *char_conv; /* Optional */
16
ac201479 17 int ifwidth; /* 4-bit or 8-bit (default) */
39f8ea46
GU
18 int height;
19 int width;
20 int bwidth; /* Default set by charlcd_alloc() */
21 int hwidth; /* Default set by charlcd_alloc() */
22
23 void *drvdata; /* Set by charlcd_alloc() */
24};
25
26struct charlcd_ops {
27 /* Required */
28 void (*write_cmd)(struct charlcd *lcd, int cmd);
29 void (*write_data)(struct charlcd *lcd, int data);
30
31 /* Optional */
ac201479 32 void (*write_cmd_raw4)(struct charlcd *lcd, int cmd); /* 4-bit only */
39f8ea46
GU
33 void (*clear_fast)(struct charlcd *lcd);
34 void (*backlight)(struct charlcd *lcd, int on);
35};
36
37struct charlcd *charlcd_alloc(unsigned int drvdata_size);
38
39int charlcd_register(struct charlcd *lcd);
40int charlcd_unregister(struct charlcd *lcd);
41
42void charlcd_poke(struct charlcd *lcd);