1
2
3
4
5
6
7
8
9
10
11
12
13struct ili9320_reg {
14 unsigned short address;
15 unsigned short value;
16};
17
18struct ili9320;
19
20struct ili9320_client {
21 const char *name;
22 int (*init)(struct ili9320 *ili, struct ili9320_platdata *cfg);
23
24};
25
26struct ili9320_spi {
27 struct spi_device *dev;
28 struct spi_message message;
29 struct spi_transfer xfer[2];
30
31 unsigned char id;
32 unsigned char buffer_addr[4];
33 unsigned char buffer_data[4];
34};
35
36
37struct ili9320 {
38 union {
39 struct ili9320_spi spi;
40 } access;
41
42 struct device *dev;
43 struct lcd_device *lcd;
44 struct ili9320_client *client;
45 struct ili9320_platdata *platdata;
46
47 int power;
48 int initialised;
49
50 unsigned short display1;
51 unsigned short power1;
52
53 int (*write)(struct ili9320 *ili, unsigned int reg, unsigned int val);
54};
55
56
57
58
59extern int ili9320_write(struct ili9320 *ili,
60 unsigned int reg, unsigned int value);
61
62extern int ili9320_write_regs(struct ili9320 *ili,
63 const struct ili9320_reg *values,
64 int nr_values);
65
66
67
68extern int ili9320_probe_spi(struct spi_device *spi,
69 struct ili9320_client *cli);
70
71extern void ili9320_remove(struct ili9320 *lcd);
72extern void ili9320_shutdown(struct ili9320 *lcd);
73
74
75
76extern int ili9320_suspend(struct ili9320 *lcd);
77extern int ili9320_resume(struct ili9320 *lcd);
78