ARM: tegra: roth: remove spi and touch driver
Laxman Dewangan [Fri, 16 Nov 2012 09:56:39 +0000 (04:56 -0500)]
Reviewed-on: http://git-master/r/164310
(cherry picked from commit ca626370ea10649723541ccd2d68584a7412b1ae)
Change-Id: I74b23d78ee4634f06d78e3fe332e56663b037ef7
Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Signed-off-by: Vikram Kanigiri <vkanigiri@nvidia.com>
Reviewed-on: http://git-master/r/164899
Reviewed-by: Rohan Somvanshi <rsomvanshi@nvidia.com>
Tested-by: Rohan Somvanshi <rsomvanshi@nvidia.com>

arch/arm/mach-tegra/board-roth.c

index 9a5189f..5d7e05c 100644 (file)
 #include <linux/gpio.h>
 #include <linux/input.h>
 #include <linux/platform_data/tegra_usb.h>
-#include <linux/spi/spi.h>
-#include <linux/spi/rm31080a_ts.h>
 #include <linux/tegra_uart.h>
 #include <linux/memblock.h>
-#include <linux/spi-tegra.h>
 #include <linux/rfkill-gpio.h>
 #include <linux/skbuff.h>
 #include <linux/ti_wilink_st.h>
@@ -64,7 +61,6 @@
 #include <mach/tegra_fiq_debugger.h>
 #include <mach/edp.h>
 
-#include "board-touch-raydium.h"
 #include "board.h"
 #include "board-common.h"
 #include "clock.h"
@@ -490,99 +486,6 @@ static void roth_audio_init(void)
 }
 
 
-static struct platform_device *roth_spi_devices[] __initdata = {
-        &tegra11_spi_device4,
-};
-
-struct spi_clk_parent spi_parent_clk_roth[] = {
-        [0] = {.name = "pll_p"},
-#ifndef CONFIG_TEGRA_PLLM_RESTRICTED
-        [1] = {.name = "pll_m"},
-        [2] = {.name = "clk_m"},
-#else
-        [1] = {.name = "clk_m"},
-#endif
-};
-
-static struct tegra_spi_platform_data roth_spi_pdata = {
-       .is_dma_based           = false,
-       .max_dma_buffer         = 16 * 1024,
-        .is_clkon_always        = false,
-        .max_rate               = 25000000,
-};
-
-static void __init roth_spi_init(void)
-{
-        int i;
-        struct clk *c;
-        struct board_info board_info, display_board_info;
-
-        tegra_get_board_info(&board_info);
-        tegra_get_display_board_info(&display_board_info);
-
-        for (i = 0; i < ARRAY_SIZE(spi_parent_clk_roth); ++i) {
-                c = tegra_get_clock_by_name(spi_parent_clk_roth[i].name);
-                if (IS_ERR_OR_NULL(c)) {
-                        pr_err("Not able to get the clock for %s\n",
-                                                spi_parent_clk_roth[i].name);
-                        continue;
-                }
-                spi_parent_clk_roth[i].parent_clk = c;
-                spi_parent_clk_roth[i].fixed_clk_rate = clk_get_rate(c);
-        }
-        roth_spi_pdata.parent_clk_list = spi_parent_clk_roth;
-        roth_spi_pdata.parent_clk_count = ARRAY_SIZE(spi_parent_clk_roth);
-       tegra11_spi_device4.dev.platform_data = &roth_spi_pdata;
-        platform_add_devices(roth_spi_devices,
-                                ARRAY_SIZE(roth_spi_devices));
-}
-
-static __initdata struct tegra_clk_init_table touch_clk_init_table[] = {
-       /* name         parent          rate            enabled */
-       { "extern2",    "pll_p",        41000000,       true},
-       { "clk_out_2",  "extern2",      40800000,       true},
-       { NULL,         NULL,           0,              0},
-};
-
-struct rm_spi_ts_platform_data rm31080ts_roth_data = {
-       .gpio_reset = 0,
-       .config = 0,
-};
-
-static struct tegra_spi_device_controller_data dev_cdata = {
-       .rx_clk_tap_delay = 0,
-       .tx_clk_tap_delay = 0,
-};
-
-struct spi_board_info rm31080a_roth_spi_board[1] = {
-       {
-        .modalias = "rm_ts_spidev",
-        .bus_num = 3,
-        .chip_select = 2,
-        .max_speed_hz = 12 * 1000 * 1000,
-        .mode = SPI_MODE_0,
-        .controller_data = &dev_cdata,
-        .platform_data = &rm31080ts_roth_data,
-        },
-};
-
-static int __init roth_touch_init(void)
-{
-       struct board_info board_info;
-
-       tegra_get_display_board_info(&board_info);
-       tegra_clk_init_from_table(touch_clk_init_table);
-       clk_enable(tegra_get_clock_by_name("clk_out_2"));
-       rm31080ts_roth_data.platform_id = RM_PLATFORM_P005;
-       rm31080a_roth_spi_board[0].irq = gpio_to_irq(TOUCH_GPIO_IRQ_RAYDIUM_SPI);
-       touch_init_raydium(TOUCH_GPIO_IRQ_RAYDIUM_SPI,
-                               TOUCH_GPIO_RST_RAYDIUM_SPI,
-                               &rm31080ts_roth_data,
-                               &rm31080a_roth_spi_board[0],
-                               ARRAY_SIZE(rm31080a_roth_spi_board));
-       return 0;
-}
-
 static void __init tegra_roth_init(void)
 {
 
@@ -592,7 +495,6 @@ static void __init tegra_roth_init(void)
        tegra_enable_pinmux();
        roth_pinmux_init();
        roth_i2c_init();
-       roth_spi_init();
        roth_usb_init();
        roth_uart_init();
        roth_audio_init();