arm/tegra: Remove useless entries from ventana_pinmux[]
[deliverable/linux.git] / arch / arm / mach-tegra / board-seaboard-pinmux.c
index fbce31daa3c9fd65760fc8d6fcc2b0cbdc92db8e..19b2c206995f433f75e9b466b13c693771fcdc3c 100644 (file)
@@ -16,6 +16,7 @@
 #include <linux/kernel.h>
 #include <linux/init.h>
 #include <linux/gpio.h>
+#include <linux/of.h>
 
 #include <mach/pinmux.h>
 #include <mach/pinmux-t2.h>
@@ -160,12 +161,7 @@ static __initdata struct tegra_pingroup_config seaboard_pinmux[] = {
 };
 
 static __initdata struct tegra_pingroup_config ventana_pinmux[] = {
-       {TEGRA_PINGROUP_DAP3, TEGRA_MUX_DAP3,     TEGRA_PUPD_NORMAL,    TEGRA_TRI_TRISTATE},
        {TEGRA_PINGROUP_DDC,  TEGRA_MUX_RSVD2,    TEGRA_PUPD_NORMAL,    TEGRA_TRI_NORMAL},
-       {TEGRA_PINGROUP_DTA,  TEGRA_MUX_VI,       TEGRA_PUPD_PULL_DOWN, TEGRA_TRI_NORMAL},
-       {TEGRA_PINGROUP_DTB,  TEGRA_MUX_VI,       TEGRA_PUPD_PULL_DOWN, TEGRA_TRI_NORMAL},
-       {TEGRA_PINGROUP_DTC,  TEGRA_MUX_VI,       TEGRA_PUPD_PULL_DOWN, TEGRA_TRI_NORMAL},
-       {TEGRA_PINGROUP_DTD,  TEGRA_MUX_VI,       TEGRA_PUPD_PULL_DOWN, TEGRA_TRI_NORMAL},
        {TEGRA_PINGROUP_GMD,  TEGRA_MUX_SFLASH,   TEGRA_PUPD_NORMAL,    TEGRA_TRI_TRISTATE},
        {TEGRA_PINGROUP_LPW0, TEGRA_MUX_RSVD4,    TEGRA_PUPD_NORMAL,    TEGRA_TRI_NORMAL},
        {TEGRA_PINGROUP_LPW2, TEGRA_MUX_RSVD4,    TEGRA_PUPD_NORMAL,    TEGRA_TRI_NORMAL},
@@ -189,13 +185,26 @@ static struct tegra_gpio_table common_gpio_table[] = {
        { .gpio = TEGRA_GPIO_SD2_CD,            .enable = true },
        { .gpio = TEGRA_GPIO_SD2_WP,            .enable = true },
        { .gpio = TEGRA_GPIO_SD2_POWER,         .enable = true },
+       { .gpio = TEGRA_GPIO_CDC_IRQ,           .enable = true },
+};
+
+static struct tegra_gpio_table seaboard_gpio_table[] = {
        { .gpio = TEGRA_GPIO_LIDSWITCH,         .enable = true },
        { .gpio = TEGRA_GPIO_POWERKEY,          .enable = true },
+       { .gpio = TEGRA_GPIO_HP_DET,            .enable = true },
        { .gpio = TEGRA_GPIO_ISL29018_IRQ,      .enable = true },
-       { .gpio = TEGRA_GPIO_CDC_IRQ,           .enable = true },
        { .gpio = TEGRA_GPIO_USB1,              .enable = true },
 };
 
+static struct tegra_gpio_table ventana_gpio_table[] = {
+       /* hp_det */
+       { .gpio = TEGRA_GPIO_PW2,               .enable = true },
+       /* int_mic_en */
+       { .gpio = TEGRA_GPIO_PX0,               .enable = true },
+       /* ext_mic_en */
+       { .gpio = TEGRA_GPIO_PX1,               .enable = true },
+};
+
 static void __init update_pinmux(struct tegra_pingroup_config *newtbl, int size)
 {
        int i, j;
@@ -218,7 +227,9 @@ static void __init update_pinmux(struct tegra_pingroup_config *newtbl, int size)
 
 void __init seaboard_common_pinmux_init(void)
 {
-       platform_add_devices(pinmux_devices, ARRAY_SIZE(pinmux_devices));
+       if (!of_machine_is_compatible("nvidia,tegra20"))
+               platform_add_devices(pinmux_devices,
+                                       ARRAY_SIZE(pinmux_devices));
 
        tegra_pinmux_config_table(seaboard_pinmux, ARRAY_SIZE(seaboard_pinmux));
 
@@ -231,11 +242,13 @@ void __init seaboard_common_pinmux_init(void)
 void __init seaboard_pinmux_init(void)
 {
        seaboard_common_pinmux_init();
+       tegra_gpio_config(seaboard_gpio_table, ARRAY_SIZE(seaboard_gpio_table));
 }
 
 void __init ventana_pinmux_init(void)
 {
        update_pinmux(ventana_pinmux, ARRAY_SIZE(ventana_pinmux));
        seaboard_common_pinmux_init();
+       tegra_gpio_config(ventana_gpio_table, ARRAY_SIZE(ventana_gpio_table));
 }
 
This page took 0.046691 seconds and 5 git commands to generate.