Skip to content

Commit 14b7b40

Browse files
lumagrpurdie
authored andcommitted
tosa: add support for bl/lcd driver
Signed-off-by: Dmitry Baryshkov <[email protected]>
1 parent fbd1b17 commit 14b7b40

File tree

1 file changed

+20
-1
lines changed

1 file changed

+20
-1
lines changed

arch/arm/mach-pxa/tosa.c

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@
3131
#include <linux/gpio.h>
3232
#include <linux/pda_power.h>
3333
#include <linux/rfkill.h>
34+
#include <linux/spi/spi.h>
3435

3536
#include <asm/setup.h>
3637
#include <asm/mach-types.h>
@@ -42,6 +43,7 @@
4243
#include <mach/mmc.h>
4344
#include <mach/udc.h>
4445
#include <mach/tosa_bt.h>
46+
#include <mach/pxa2xx_spi.h>
4547

4648
#include <asm/mach/arch.h>
4749
#include <mach/tosa.h>
@@ -612,7 +614,7 @@ static int tosa_tc6393xb_enable(struct platform_device *dev)
612614
rc = gpio_request(TOSA_GPIO_TC6393XB_SUSPEND, "tc6393xb #suspend");
613615
if (rc)
614616
goto err_req_suspend;
615-
rc = gpio_request(TOSA_GPIO_TC6393XB_L3V_ON, "l3v");
617+
rc = gpio_request(TOSA_GPIO_TC6393XB_L3V_ON, "tc6393xb l3v");
616618
if (rc)
617619
goto err_req_l3v;
618620
rc = gpio_direction_output(TOSA_GPIO_TC6393XB_L3V_ON, 0);
@@ -772,6 +774,20 @@ static struct platform_device tosa_bt_device = {
772774
.dev.platform_data = &tosa_bt_data,
773775
};
774776

777+
static struct pxa2xx_spi_master pxa_ssp_master_info = {
778+
.num_chipselect = 1,
779+
};
780+
781+
static struct spi_board_info spi_board_info[] __initdata = {
782+
{
783+
.modalias = "tosa-lcd",
784+
// .platform_data
785+
.max_speed_hz = 28750,
786+
.bus_num = 2,
787+
.chip_select = 0,
788+
.mode = SPI_MODE_0,
789+
},
790+
};
775791

776792
static struct platform_device *devices[] __initdata = {
777793
&tosascoop_device,
@@ -826,6 +842,9 @@ static void __init tosa_init(void)
826842
pxa_set_i2c_info(NULL);
827843
platform_scoop_config = &tosa_pcmcia_config;
828844

845+
pxa2xx_set_spi_info(2, &pxa_ssp_master_info);
846+
spi_register_board_info(spi_board_info, ARRAY_SIZE(spi_board_info));
847+
829848
clk_add_alias("CLK_CK3P6MI", &tc6393xb_device.dev, "GPIO11_CLK", NULL);
830849

831850
platform_add_devices(devices, ARRAY_SIZE(devices));

0 commit comments

Comments
 (0)