|
@@ -243,3 +243,85 @@ static struct pxamci_platform_data vpac270_mci_platform_data = {
|
|
|
.gpio_card_ro = GPIO52_VPAC270_SD_READONLY,
|
|
|
.detect_delay_ms = 200,
|
|
|
};
|
|
|
+
|
|
|
+static void __init vpac270_mmc_init(void)
|
|
|
+{
|
|
|
+ pxa_set_mci_info(&vpac270_mci_platform_data);
|
|
|
+}
|
|
|
+#else
|
|
|
+static inline void vpac270_mmc_init(void) {}
|
|
|
+#endif
|
|
|
+
|
|
|
+/******************************************************************************
|
|
|
+ * GPIO keys
|
|
|
+ ******************************************************************************/
|
|
|
+#if defined(CONFIG_KEYBOARD_GPIO) || defined(CONFIG_KEYBOARD_GPIO_MODULE)
|
|
|
+static struct gpio_keys_button vpac270_pxa_buttons[] = {
|
|
|
+ {KEY_POWER, GPIO1_VPAC270_USER_BTN, 0, "USER BTN"},
|
|
|
+};
|
|
|
+
|
|
|
+static struct gpio_keys_platform_data vpac270_pxa_keys_data = {
|
|
|
+ .buttons = vpac270_pxa_buttons,
|
|
|
+ .nbuttons = ARRAY_SIZE(vpac270_pxa_buttons),
|
|
|
+};
|
|
|
+
|
|
|
+static struct platform_device vpac270_pxa_keys = {
|
|
|
+ .name = "gpio-keys",
|
|
|
+ .id = -1,
|
|
|
+ .dev = {
|
|
|
+ .platform_data = &vpac270_pxa_keys_data,
|
|
|
+ },
|
|
|
+};
|
|
|
+
|
|
|
+static void __init vpac270_keys_init(void)
|
|
|
+{
|
|
|
+ platform_device_register(&vpac270_pxa_keys);
|
|
|
+}
|
|
|
+#else
|
|
|
+static inline void vpac270_keys_init(void) {}
|
|
|
+#endif
|
|
|
+
|
|
|
+/******************************************************************************
|
|
|
+ * LED
|
|
|
+ ******************************************************************************/
|
|
|
+#if defined(CONFIG_LEDS_GPIO) || defined(CONFIG_LEDS_GPIO_MODULE)
|
|
|
+struct gpio_led vpac270_gpio_leds[] = {
|
|
|
+{
|
|
|
+ .name = "vpac270:orange:user",
|
|
|
+ .default_trigger = "none",
|
|
|
+ .gpio = GPIO15_VPAC270_LED_ORANGE,
|
|
|
+ .active_low = 1,
|
|
|
+}
|
|
|
+};
|
|
|
+
|
|
|
+static struct gpio_led_platform_data vpac270_gpio_led_info = {
|
|
|
+ .leds = vpac270_gpio_leds,
|
|
|
+ .num_leds = ARRAY_SIZE(vpac270_gpio_leds),
|
|
|
+};
|
|
|
+
|
|
|
+static struct platform_device vpac270_leds = {
|
|
|
+ .name = "leds-gpio",
|
|
|
+ .id = -1,
|
|
|
+ .dev = {
|
|
|
+ .platform_data = &vpac270_gpio_led_info,
|
|
|
+ }
|
|
|
+};
|
|
|
+
|
|
|
+static void __init vpac270_leds_init(void)
|
|
|
+{
|
|
|
+ platform_device_register(&vpac270_leds);
|
|
|
+}
|
|
|
+#else
|
|
|
+static inline void vpac270_leds_init(void) {}
|
|
|
+#endif
|
|
|
+
|
|
|
+/******************************************************************************
|
|
|
+ * USB Host
|
|
|
+ ******************************************************************************/
|
|
|
+#if defined(CONFIG_USB_OHCI_HCD) || defined(CONFIG_USB_OHCI_HCD_MODULE)
|
|
|
+static int vpac270_ohci_init(struct device *dev)
|
|
|
+{
|
|
|
+ UP2OCR = UP2OCR_HXS | UP2OCR_HXOE | UP2OCR_DPPDE | UP2OCR_DMPDE;
|
|
|
+ return 0;
|
|
|
+}
|
|
|
+
|