From 3b847c3eeb275330d98283db5362da62765dea3c Mon Sep 17 00:00:00 2001 From: Jesse Gilles Date: Fri, 1 Mar 2013 17:11:20 -0600 Subject: add led-a to led-f for MTOCGD3 --- io-module/mts_io.c | 76 ++++++++++++++++++++++++++++++++++++++++++++++++++---- 1 file changed, 71 insertions(+), 5 deletions(-) diff --git a/io-module/mts_io.c b/io-module/mts_io.c index 6aacf74..ae2764d 100644 --- a/io-module/mts_io.c +++ b/io-module/mts_io.c @@ -442,6 +442,7 @@ static struct gpio_pin gpio_pins_mtr2_0_0[] = { .direction = GPIO_DIR_OUTPUT, .output_value = 1, .use_pullup = 0, + .active_low = 1, }, { .name = "LED7", @@ -452,6 +453,15 @@ static struct gpio_pin gpio_pins_mtr2_0_0[] = { .use_pullup = 0, .active_low = 1, }, + { + .name = "LED7", + .attr_name = "led-c", + .pin = AT91_PIN_PA25, + .direction = GPIO_DIR_OUTPUT, + .output_value = 1, + .use_pullup = 0, + .active_low = 1, + }, { .name = "LED10", .attr_name = "led-sig1", @@ -461,6 +471,15 @@ static struct gpio_pin gpio_pins_mtr2_0_0[] = { .use_pullup = 0, .active_low = 1, }, + { + .name = "LED10", + .attr_name = "led-d", + .pin = AT91_PIN_PA26, + .direction = GPIO_DIR_OUTPUT, + .output_value = 1, + .use_pullup = 0, + .active_low = 1, + }, { .name = "LED11", .attr_name = "led-sig2", @@ -470,6 +489,15 @@ static struct gpio_pin gpio_pins_mtr2_0_0[] = { .use_pullup = 0, .active_low = 1, }, + { + .name = "LED11", + .attr_name = "led-e", + .pin = AT91_PIN_PA27, + .direction = GPIO_DIR_OUTPUT, + .output_value = 1, + .use_pullup = 0, + .active_low = 1, + }, { .name = "LED12", .attr_name = "led-sig3", @@ -479,6 +507,15 @@ static struct gpio_pin gpio_pins_mtr2_0_0[] = { .use_pullup = 0, .active_low = 1, }, + { + .name = "LED12", + .attr_name = "led-f", + .pin = AT91_PIN_PA28, + .direction = GPIO_DIR_OUTPUT, + .output_value = 1, + .use_pullup = 0, + .active_low = 1, + }, { .name = "LED13", .attr_name = "led-wifi", @@ -488,6 +525,15 @@ static struct gpio_pin gpio_pins_mtr2_0_0[] = { .use_pullup = 0, .active_low = 1, }, + { + .name = "LED13", + .attr_name = "led-b", + .pin = AT91_PIN_PA29, + .direction = GPIO_DIR_OUTPUT, + .output_value = 1, + .use_pullup = 0, + .active_low = 1, + }, { .name = "UART3_DTR", .attr_name = "extserial-dtr", @@ -1548,6 +1594,8 @@ static ssize_t mts_attr_store_led_status(struct device *dev, static DEVICE_ATTR_MTS(dev_attr_led_status, "led-status", mts_attr_show_led_status, mts_attr_store_led_status); +static DEVICE_ATTR_MTS(dev_attr_led_a_gpio, "led-a", + mts_attr_show_led_status, mts_attr_store_led_status); #if LED_STATUS_CONTROLLABLE_MTCDP static DEVICE_ATTR_MTS(dev_attr_led_sdk_a, "led-sdk-a", @@ -1562,6 +1610,16 @@ static DEVICE_ATTR_RO_MTS(dev_attr_led_ls, "led-ls", mts_attr_show_gpio_pin); #endif +static DEVICE_ATTR_MTS(dev_attr_led_wifi_gpio, "led-wifi", + mts_attr_show_gpio_pin, mts_attr_store_gpio_pin); +static DEVICE_ATTR_MTS(dev_attr_led_b_gpio, "led-b", + mts_attr_show_gpio_pin, mts_attr_store_gpio_pin); + +static DEVICE_ATTR_MTS(dev_attr_led_cd_gpio, "led-cd", + mts_attr_show_gpio_pin, mts_attr_store_gpio_pin); +static DEVICE_ATTR_MTS(dev_attr_led_c_gpio, "led-c", + mts_attr_show_gpio_pin, mts_attr_store_gpio_pin); + static DEVICE_ATTR_MTS(dev_attr_led_sig1_gpio, "led-sig1", mts_attr_show_gpio_pin, mts_attr_store_gpio_pin); static DEVICE_ATTR_MTS(dev_attr_led_sig2_gpio, "led-sig2", @@ -1569,10 +1627,11 @@ static DEVICE_ATTR_MTS(dev_attr_led_sig2_gpio, "led-sig2", static DEVICE_ATTR_MTS(dev_attr_led_sig3_gpio, "led-sig3", mts_attr_show_gpio_pin, mts_attr_store_gpio_pin); -static DEVICE_ATTR_MTS(dev_attr_led_cd_gpio, "led-cd", +static DEVICE_ATTR_MTS(dev_attr_led_d_gpio, "led-d", mts_attr_show_gpio_pin, mts_attr_store_gpio_pin); - -static DEVICE_ATTR_MTS(dev_attr_led_wifi_gpio, "led-wifi", +static DEVICE_ATTR_MTS(dev_attr_led_e_gpio, "led-e", + mts_attr_show_gpio_pin, mts_attr_store_gpio_pin); +static DEVICE_ATTR_MTS(dev_attr_led_f_gpio, "led-f", mts_attr_show_gpio_pin, mts_attr_store_gpio_pin); static DEVICE_ATTR_RO_MTS(dev_attr_reset, "reset", mts_attr_show_gpio_pin); @@ -1903,11 +1962,18 @@ static struct attribute *mtr2_platform_attributes[] = { &dev_attr_rs4xx_term_res.attr, &dev_attr_led_status.attr, + &dev_attr_led_wifi_gpio.attr, + &dev_attr_led_cd_gpio.attr, &dev_attr_led_sig1_gpio.attr, &dev_attr_led_sig2_gpio.attr, &dev_attr_led_sig3_gpio.attr, - &dev_attr_led_cd_gpio.attr, - &dev_attr_led_wifi_gpio.attr, + + &dev_attr_led_a_gpio.attr, + &dev_attr_led_b_gpio.attr, + &dev_attr_led_c_gpio.attr, + &dev_attr_led_d_gpio.attr, + &dev_attr_led_e_gpio.attr, + &dev_attr_led_f_gpio.attr, &dev_attr_board_temperature.attr, -- cgit v1.2.3