aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-pxa/tosa.c
diff options
context:
space:
mode:
authorDmitry Baryshkov <dbaryshkov@gmail.com>2008-09-13 13:06:41 -0400
committerRichard Purdie <rpurdie@linux.intel.com>2008-10-20 19:19:49 -0400
commit14b7b4018f90bc5e306adc59bfe8887934367ac2 (patch)
treed93a23c17fb67ea85e3f8742723855a860a4800e /arch/arm/mach-pxa/tosa.c
parentfbd1b17b43b8783a5408ec18c293dd8ebdc7e2cd (diff)
tosa: add support for bl/lcd driver
Signed-off-by: Dmitry Baryshkov <dbaryshkov@gmail.com>
Diffstat (limited to 'arch/arm/mach-pxa/tosa.c')
-rw-r--r--arch/arm/mach-pxa/tosa.c21
1 files changed, 20 insertions, 1 deletions
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 @@
31#include <linux/gpio.h> 31#include <linux/gpio.h>
32#include <linux/pda_power.h> 32#include <linux/pda_power.h>
33#include <linux/rfkill.h> 33#include <linux/rfkill.h>
34#include <linux/spi/spi.h>
34 35
35#include <asm/setup.h> 36#include <asm/setup.h>
36#include <asm/mach-types.h> 37#include <asm/mach-types.h>
@@ -42,6 +43,7 @@
42#include <mach/mmc.h> 43#include <mach/mmc.h>
43#include <mach/udc.h> 44#include <mach/udc.h>
44#include <mach/tosa_bt.h> 45#include <mach/tosa_bt.h>
46#include <mach/pxa2xx_spi.h>
45 47
46#include <asm/mach/arch.h> 48#include <asm/mach/arch.h>
47#include <mach/tosa.h> 49#include <mach/tosa.h>
@@ -612,7 +614,7 @@ static int tosa_tc6393xb_enable(struct platform_device *dev)
612 rc = gpio_request(TOSA_GPIO_TC6393XB_SUSPEND, "tc6393xb #suspend"); 614 rc = gpio_request(TOSA_GPIO_TC6393XB_SUSPEND, "tc6393xb #suspend");
613 if (rc) 615 if (rc)
614 goto err_req_suspend; 616 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");
616 if (rc) 618 if (rc)
617 goto err_req_l3v; 619 goto err_req_l3v;
618 rc = gpio_direction_output(TOSA_GPIO_TC6393XB_L3V_ON, 0); 620 rc = gpio_direction_output(TOSA_GPIO_TC6393XB_L3V_ON, 0);
@@ -772,6 +774,20 @@ static struct platform_device tosa_bt_device = {
772 .dev.platform_data = &tosa_bt_data, 774 .dev.platform_data = &tosa_bt_data,
773}; 775};
774 776
777static struct pxa2xx_spi_master pxa_ssp_master_info = {
778 .num_chipselect = 1,
779};
780
781static 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};
775 791
776static struct platform_device *devices[] __initdata = { 792static struct platform_device *devices[] __initdata = {
777 &tosascoop_device, 793 &tosascoop_device,
@@ -826,6 +842,9 @@ static void __init tosa_init(void)
826 pxa_set_i2c_info(NULL); 842 pxa_set_i2c_info(NULL);
827 platform_scoop_config = &tosa_pcmcia_config; 843 platform_scoop_config = &tosa_pcmcia_config;
828 844
845 pxa2xx_set_spi_info(2, &pxa_ssp_master_info);
846 spi_register_board_info(spi_board_info, ARRAY_SIZE(spi_board_info));
847
829 clk_add_alias("CLK_CK3P6MI", &tc6393xb_device.dev, "GPIO11_CLK", NULL); 848 clk_add_alias("CLK_CK3P6MI", &tc6393xb_device.dev, "GPIO11_CLK", NULL);
830 849
831 platform_add_devices(devices, ARRAY_SIZE(devices)); 850 platform_add_devices(devices, ARRAY_SIZE(devices));