1 /* drivers/video/backlight/ili9320.h
3 * ILI9320 LCD controller driver core.
5 * Copyright 2007 Simtec Electronics
6 * Ben Dooks <ben@simtec.co.uk>
8 * http://armlinux.simtec.co.uk/
10 * This program is free software; you can redistribute it and/or modify
11 * it under the terms of the GNU General Public License version 2 as
12 * published by the Free Software Foundation.
15 /* Holder for register and value pairs. */
17 unsigned short address
;
23 struct ili9320_client
{
25 int (*init
)(struct ili9320
*ili
, struct ili9320_platdata
*cfg
);
28 /* Device attached via an SPI bus. */
30 struct spi_device
*dev
;
31 struct spi_message message
;
32 struct spi_transfer xfer
[2];
35 unsigned char buffer_addr
[4];
36 unsigned char buffer_data
[4];
39 /* ILI9320 device state. */
42 struct ili9320_spi spi
; /* SPI attachged device. */
43 } access
; /* Register access method. */
46 struct lcd_device
*lcd
; /* LCD device we created. */
47 struct ili9320_client
*client
;
48 struct ili9320_platdata
*platdata
;
50 int power
; /* current power state. */
53 unsigned short display1
;
54 unsigned short power1
;
56 int (*write
)(struct ili9320
*ili
, unsigned int reg
, unsigned int val
);
60 /* ILI9320 register access routines */
62 extern int ili9320_write(struct ili9320
*ili
,
63 unsigned int reg
, unsigned int value
);
65 extern int ili9320_write_regs(struct ili9320
*ili
,
66 const struct ili9320_reg
*values
,
71 extern int ili9320_probe_spi(struct spi_device
*spi
,
72 struct ili9320_client
*cli
);
74 extern int ili9320_remove(struct ili9320
*lcd
);
75 extern void ili9320_shutdown(struct ili9320
*lcd
);
79 extern int ili9320_suspend(struct ili9320
*lcd
);
80 extern int ili9320_resume(struct ili9320
*lcd
);