|
31 | 31 | #include <linux/gpio.h>
|
32 | 32 | #include <linux/pda_power.h>
|
33 | 33 | #include <linux/rfkill.h>
|
| 34 | +#include <linux/spi/spi.h> |
34 | 35 |
|
35 | 36 | #include <asm/setup.h>
|
36 | 37 | #include <asm/mach-types.h>
|
|
42 | 43 | #include <mach/mmc.h>
|
43 | 44 | #include <mach/udc.h>
|
44 | 45 | #include <mach/tosa_bt.h>
|
| 46 | +#include <mach/pxa2xx_spi.h> |
45 | 47 |
|
46 | 48 | #include <asm/mach/arch.h>
|
47 | 49 | #include <mach/tosa.h>
|
@@ -612,7 +614,7 @@ static int tosa_tc6393xb_enable(struct platform_device *dev)
|
612 | 614 | rc = gpio_request(TOSA_GPIO_TC6393XB_SUSPEND, "tc6393xb #suspend");
|
613 | 615 | if (rc)
|
614 | 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 | 618 | if (rc)
|
617 | 619 | goto err_req_l3v;
|
618 | 620 | rc = gpio_direction_output(TOSA_GPIO_TC6393XB_L3V_ON, 0);
|
@@ -772,6 +774,20 @@ static struct platform_device tosa_bt_device = {
|
772 | 774 | .dev.platform_data = &tosa_bt_data,
|
773 | 775 | };
|
774 | 776 |
|
| 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 | +}; |
775 | 791 |
|
776 | 792 | static struct platform_device *devices[] __initdata = {
|
777 | 793 | &tosascoop_device,
|
@@ -826,6 +842,9 @@ static void __init tosa_init(void)
|
826 | 842 | pxa_set_i2c_info(NULL);
|
827 | 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 | 848 | clk_add_alias("CLK_CK3P6MI", &tc6393xb_device.dev, "GPIO11_CLK", NULL);
|
830 | 849 |
|
831 | 850 | platform_add_devices(devices, ARRAY_SIZE(devices));
|
|
0 commit comments