]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - arch/arm/mach-omap1/board-palmte.c
ARM: OMAP: No need to include board-palm*.h from hardware.h
[linux-2.6-omap-h63xx.git] / arch / arm / mach-omap1 / board-palmte.c
index b067b137949be55f226d3723648969edc52681c9..886b4c0569bddb0958a5766273da6b600c3268d8 100644 (file)
 #include <mach/irda.h>
 #include <mach/keypad.h>
 #include <mach/common.h>
-#include <mach/gpio-switch.h>
+
+#define PALMTE_USBDETECT_GPIO  0
+#define PALMTE_USB_OR_DC_GPIO  1
+#define PALMTE_TSC_GPIO                4
+#define PALMTE_PINTDAV_GPIO    6
+#define PALMTE_MMC_WP_GPIO     8
+#define PALMTE_MMC_POWER_GPIO  9
+#define PALMTE_HDQ_GPIO                11
+#define PALMTE_HEADPHONES_GPIO 14
+#define PALMTE_SPEAKER_GPIO    15
+#define PALMTE_DC_GPIO         OMAP_MPUIO(2)
+#define PALMTE_MMC_SWITCH_GPIO OMAP_MPUIO(4)
+#define PALMTE_MMC1_GPIO       OMAP_MPUIO(6)
+#define PALMTE_MMC2_GPIO       OMAP_MPUIO(7)
+#define PALMTE_MMC3_GPIO       OMAP_MPUIO(11)
 
 static void __init omap_palmte_init_irq(void)
 {
@@ -287,7 +301,6 @@ static void palmte_get_power_status(struct apm_power_info *info, int *battery)
 #endif
 
 static struct omap_board_config_kernel palmte_config[] __initdata = {
-       { OMAP_TAG_USB,         &palmte_usb_config },
        { OMAP_TAG_LCD,         &palmte_lcd_config },
        { OMAP_TAG_UART,        &palmte_uart_config },
 };
@@ -315,37 +328,6 @@ static void palmte_headphones_detect(void *data, int state)
        }
 }
 
-static struct omap_gpio_switch palmte_switches[] __initdata = {
-       /* Speaker-enable pin is an output */
-       {
-               .name   = "speaker-enable",
-               .gpio   = PALMTE_SPEAKER_GPIO,
-               .type   = OMAP_GPIO_SWITCH_TYPE_ACTIVITY,
-               .flags  = OMAP_GPIO_SWITCH_FLAG_OUTPUT |
-                       OMAP_GPIO_SWITCH_FLAG_INVERTED,
-       },
-       /* Indicates whether power is from DC-IN or battery */
-       {
-               .name   = "dc-in",
-               .gpio   = PALMTE_DC_GPIO,
-               .type   = OMAP_GPIO_SWITCH_TYPE_CONNECTION,
-               .flags  = OMAP_GPIO_SWITCH_FLAG_INVERTED,
-       },
-       /* Indicates whether a USB host is on the other end of the cable */
-       {
-               .name   = "usb",
-               .gpio   = PALMTE_USBDETECT_GPIO,
-               .type   = OMAP_GPIO_SWITCH_TYPE_CONNECTION,
-       },
-       /* High when headphones jack is plugged in */
-       {
-               .name   = "headphones",
-               .gpio   = PALMTE_HEADPHONES_GPIO,
-               .type   = OMAP_GPIO_SWITCH_TYPE_CONNECTION,
-               .notify = palmte_headphones_detect,
-       },
-};
-
 static void __init palmte_misc_gpio_setup(void)
 {
        /* Set TSC2102 PINTDAV pin as input (used by TSC2102 driver) */
@@ -371,12 +353,9 @@ static void __init omap_palmte_init(void)
        platform_add_devices(palmte_devices, ARRAY_SIZE(palmte_devices));
 
        spi_register_board_info(palmte_spi_info, ARRAY_SIZE(palmte_spi_info));
-
-       omap_register_gpio_switches(palmte_switches,
-                       ARRAY_SIZE(palmte_switches));
-
        palmte_misc_gpio_setup();
        omap_serial_init();
+       omap_usb_init(&palmte_usb_config);
        omap_register_i2c_bus(1, 100, NULL, 0);
 }