Skip to content

Commit

Permalink
dirty status led active low hack
Browse files Browse the repository at this point in the history
  • Loading branch information
kmihelich committed Jan 23, 2015
1 parent cf1b669 commit ec6a188
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 @@ -66,14 +66,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 ec6a188

Please sign in to comment.