mirror of
https://github.com/archlinuxarm/PKGBUILDs.git
synced 2024-11-08 22:45:43 +00:00
43 lines
1.3 KiB
Diff
43 lines
1.3 KiB
Diff
From 6d4c94648494ca604a9676927b3feb573765da41 Mon Sep 17 00:00:00 2001
|
|
From: Kevin Mihelich <kevin@archlinuxarm.org>
|
|
Date: Thu, 22 Jan 2015 22:24:22 -0700
|
|
Subject: [PATCH 1/2] 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 4e3a8de..cba15b1 100644
|
|
--- a/drivers/gpio/gpiolib-of.c
|
|
+++ b/drivers/gpio/gpiolib-of.c
|
|
@@ -73,14 +73,24 @@ 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);
|
|
+
|
|
+ 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.3.2
|
|
|