23 #include <linux/kernel.h>
28 #include <linux/input.h>
60 #define D2NET_V2_GPIO_PUSH_BUTTON 34
61 #define D2NET_V2_GPIO_POWER_SWITCH_ON 13
62 #define D2NET_V2_GPIO_POWER_SWITCH_OFF 15
64 #define D2NET_V2_SWITCH_POWER_ON 0x1
65 #define D2NET_V2_SWITCH_POWER_OFF 0x2
72 .desc =
"Back power switch (on|auto)",
79 .desc =
"Back power switch (auto|off)",
85 .desc =
"Front Push Button",
91 .buttons = d2net_v2_buttons,
99 .platform_data = &d2net_v2_button_data,
107 #define D2NET_V2_GPIO_RED_LED 12
109 static struct gpio_led d2net_v2_gpio_led_pins[] = {
111 .name =
"d2net_v2:red:fail",
117 .num_leds =
ARRAY_SIZE(d2net_v2_gpio_led_pins),
118 .leds = d2net_v2_gpio_led_pins,
125 .platform_data = &d2net_v2_gpio_leds_data,
133 #define D2NET_V2_GPIO_BLUE_LED_SLOW 29
134 #define D2NET_V2_GPIO_BLUE_LED_CMD 30
136 static struct ns2_led d2net_v2_led_pins[] = {
138 .name =
"d2net_v2:blue:sata",
146 .leds = d2net_v2_led_pins,
153 .platform_data = &d2net_v2_leds_data,
161 static unsigned int d2net_v2_mpp_config[]
__initdata = {
188 #define D2NET_V2_GPIO_POWER_OFF 7
190 static void d2net_v2_power_off(
void)
195 static void __init d2net_v2_init(
void)
220 pr_err(
"d2net_v2: failed to configure power-off GPIO\n");
224 .atag_offset = 0x100,
225 .init_machine = d2net_v2_init,