24 #include <linux/kernel.h>
29 #include <linux/input.h>
62 #define NETSPACE_V2_PUSH_BUTTON 32
68 .desc =
"Power push button",
74 .buttons = netspace_v2_buttons,
82 .platform_data = &netspace_v2_button_data,
90 #define NETSPACE_V2_GPIO_RED_LED 12
92 static struct gpio_led netspace_v2_gpio_led_pins[] = {
94 .name =
"ns_v2:red:fail",
100 .num_leds =
ARRAY_SIZE(netspace_v2_gpio_led_pins),
101 .leds = netspace_v2_gpio_led_pins,
108 .platform_data = &netspace_v2_gpio_leds_data,
116 #define NETSPACE_V2_GPIO_BLUE_LED_SLOW 29
117 #define NETSPACE_V2_GPIO_BLUE_LED_CMD 30
119 static struct ns2_led netspace_v2_led_pins[] = {
121 .name =
"ns_v2:blue:sata",
129 .leds = netspace_v2_led_pins,
136 .platform_data = &netspace_v2_leds_data,
157 static unsigned netspace_max_v2_fan_ctrl[] = { 22, 7, 33, 23 };
165 .num_ctrl =
ARRAY_SIZE(netspace_max_v2_fan_ctrl),
166 .ctrl = netspace_max_v2_fan_ctrl,
167 .alarm = &netspace_max_v2_fan_alarm,
168 .num_speed =
ARRAY_SIZE(netspace_max_v2_fan_speed),
169 .speed = netspace_max_v2_fan_speed,
176 .platform_data = &netspace_max_v2_fan_data,
184 static unsigned int netspace_v2_mpp_config[]
__initdata = {
219 #define NETSPACE_V2_GPIO_POWER_OFF 31
221 static void netspace_v2_power_off(
void)
226 static void __init netspace_v2_init(
void)
234 if (machine_is_netspace_max_v2())
249 if (machine_is_netspace_max_v2())
256 pr_err(
"netspace_v2: failed to configure power-off GPIO\n");
259 #ifdef CONFIG_MACH_NETSPACE_V2
261 .atag_offset = 0x100,
262 .init_machine = netspace_v2_init,
271 #ifdef CONFIG_MACH_INETSPACE_V2
273 .atag_offset = 0x100,
274 .init_machine = netspace_v2_init,
283 #ifdef CONFIG_MACH_NETSPACE_MAX_V2
285 .atag_offset = 0x100,
286 .init_machine = netspace_v2_init,