Skip to content

Commit

Permalink
Merge pull request #80 from kmihelich/c1_led
Browse files Browse the repository at this point in the history
Set C1 status LED to active low
  • Loading branch information
tobetter committed Jun 11, 2015
2 parents 428e2c7 + ec6a188 commit 5fd2c0a
Showing 1 changed file with 13 additions and 2 deletions.
15 changes: 13 additions & 2 deletions drivers/gpio/gpiolib-of.c
Original file line number Diff line number Diff line change
Expand Up @@ -73,14 +73,25 @@ static int of_gpiochip_find_and_xlate(struct gpio_chip *gc, void *data)
#include <linux/amlogic/aml_gpio_consumer.h>
int of_get_named_gpio_flags(struct device_node *np, const char *propname,
int index __attribute__((unused)),
enum of_gpio_flags *flags __attribute__((unused)))
enum of_gpio_flags *flags)
{
const char *str;
int gpio;

if(of_property_read_string(np, "gpios", &str))
return -EPROBE_DEFER;

return amlogic_gpio_name_map_num(str);
gpio = amlogic_gpio_name_map_num(str);

/* Set ODROID-C1 status LED to active low */
if (flags != NULL) {
if (gpio == 13)
*flags = 1;
else
*flags = 0;
}

return gpio;
}
#else
int of_get_named_gpio_flags(struct device_node *np, const char *propname,
Expand Down

0 comments on commit 5fd2c0a

Please sign in to comment.