From fbd1b17b43b8783a5408ec18c293dd8ebdc7e2cd Mon Sep 17 00:00:00 2001 From: Dmitry Baryshkov Date: Sat, 13 Sep 2008 20:58:51 +0400 Subject: backlight: add support for Sharp SL-6000 LCD and backlight drivers On Sharp SL-6000 lcd/backlight is a bit complex, so add two drivers one for lcd-driving chip, other one for dac regulating the backlight LEDS. Signed-off-by: Dmitry Baryshkov Cc: Richard Purdie --- arch/arm/mach-pxa/include/mach/tosa.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'arch') diff --git a/arch/arm/mach-pxa/include/mach/tosa.h b/arch/arm/mach-pxa/include/mach/tosa.h index 8bce6d8615b9..4df2d38507dc 100644 --- a/arch/arm/mach-pxa/include/mach/tosa.h +++ b/arch/arm/mach-pxa/include/mach/tosa.h @@ -193,4 +193,7 @@ #define TOSA_KEY_MAIL KEY_MAIL #endif +struct spi_device; +extern int tosa_bl_enable(struct spi_device *spi, int enable); + #endif /* _ASM_ARCH_TOSA_H_ */ -- cgit v1.2.3 From 14b7b4018f90bc5e306adc59bfe8887934367ac2 Mon Sep 17 00:00:00 2001 From: Dmitry Baryshkov Date: Sat, 13 Sep 2008 21:06:41 +0400 Subject: tosa: add support for bl/lcd driver Signed-off-by: Dmitry Baryshkov --- arch/arm/mach-pxa/tosa.c | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) (limited to 'arch') diff --git a/arch/arm/mach-pxa/tosa.c b/arch/arm/mach-pxa/tosa.c index a6c4694359ca..224897a67d15 100644 --- a/arch/arm/mach-pxa/tosa.c +++ b/arch/arm/mach-pxa/tosa.c @@ -31,6 +31,7 @@ #include #include #include +#include #include #include @@ -42,6 +43,7 @@ #include #include #include +#include #include #include @@ -612,7 +614,7 @@ static int tosa_tc6393xb_enable(struct platform_device *dev) rc = gpio_request(TOSA_GPIO_TC6393XB_SUSPEND, "tc6393xb #suspend"); if (rc) goto err_req_suspend; - rc = gpio_request(TOSA_GPIO_TC6393XB_L3V_ON, "l3v"); + rc = gpio_request(TOSA_GPIO_TC6393XB_L3V_ON, "tc6393xb l3v"); if (rc) goto err_req_l3v; rc = gpio_direction_output(TOSA_GPIO_TC6393XB_L3V_ON, 0); @@ -772,6 +774,20 @@ static struct platform_device tosa_bt_device = { .dev.platform_data = &tosa_bt_data, }; +static struct pxa2xx_spi_master pxa_ssp_master_info = { + .num_chipselect = 1, +}; + +static struct spi_board_info spi_board_info[] __initdata = { + { + .modalias = "tosa-lcd", + // .platform_data + .max_speed_hz = 28750, + .bus_num = 2, + .chip_select = 0, + .mode = SPI_MODE_0, + }, +}; static struct platform_device *devices[] __initdata = { &tosascoop_device, @@ -826,6 +842,9 @@ static void __init tosa_init(void) pxa_set_i2c_info(NULL); platform_scoop_config = &tosa_pcmcia_config; + pxa2xx_set_spi_info(2, &pxa_ssp_master_info); + spi_register_board_info(spi_board_info, ARRAY_SIZE(spi_board_info)); + clk_add_alias("CLK_CK3P6MI", &tc6393xb_device.dev, "GPIO11_CLK", NULL); platform_add_devices(devices, ARRAY_SIZE(devices)); -- cgit v1.2.3