1 /* SPDX-License-Identifier: GPL-2.0-only */
2 /* drivers/video/backlight/ili9320.h
4 * ILI9320 LCD controller driver core.
6 * Copyright 2007 Simtec Electronics
7 * Ben Dooks <ben@simtec.co.uk>
9 * http://armlinux.simtec.co.uk/
12 /* Holder for register and value pairs. */
14 unsigned short address
;
20 struct ili9320_client
{
22 int (*init
)(struct ili9320
*ili
, struct ili9320_platdata
*cfg
);
25 /* Device attached via an SPI bus. */
27 struct spi_device
*dev
;
28 struct spi_message message
;
29 struct spi_transfer xfer
[2];
32 unsigned char buffer_addr
[4];
33 unsigned char buffer_data
[4];
36 /* ILI9320 device state. */
39 struct ili9320_spi spi
; /* SPI attachged device. */
40 } access
; /* Register access method. */
43 struct lcd_device
*lcd
; /* LCD device we created. */
44 struct ili9320_client
*client
;
45 struct ili9320_platdata
*platdata
;
47 int power
; /* current power state. */
50 unsigned short display1
;
51 unsigned short power1
;
53 int (*write
)(struct ili9320
*ili
, unsigned int reg
, unsigned int val
);
57 /* ILI9320 register access routines */
59 extern int ili9320_write(struct ili9320
*ili
,
60 unsigned int reg
, unsigned int value
);
62 extern int ili9320_write_regs(struct ili9320
*ili
,
63 const struct ili9320_reg
*values
,
68 extern int ili9320_probe_spi(struct spi_device
*spi
,
69 struct ili9320_client
*cli
);
71 extern int ili9320_remove(struct ili9320
*lcd
);
72 extern void ili9320_shutdown(struct ili9320
*lcd
);
76 extern int ili9320_suspend(struct ili9320
*lcd
);
77 extern int ili9320_resume(struct ili9320
*lcd
);