From e7c973b76ee0059e1e5662c3c6ca60bd6cb69fbb Mon Sep 17 00:00:00 2001 From: Kevin Mihelich Date: Thu, 22 Jan 2015 22:24:22 -0700 Subject: [PATCH] dirty status led active low hack --- drivers/gpio/gpiolib-of.c | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/drivers/gpio/gpiolib-of.c b/drivers/gpio/gpiolib-of.c index f86fe7c..3caf9fe 100644 --- a/drivers/gpio/gpiolib-of.c +++ b/drivers/gpio/gpiolib-of.c @@ -66,14 +66,24 @@ static int of_gpiochip_find_and_xlate(struct gpio_chip *gc, void *data) #include 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); + + 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, -- 2.2.2