Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Set C1 status LED to active low #80

Merged
merged 1 commit into from
Jun 11, 2015
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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