diff options
author | John Crispin <john@openwrt.org> | 2016-02-25 10:14:05 +0000 |
---|---|---|
committer | John Crispin <john@openwrt.org> | 2016-02-25 10:14:05 +0000 |
commit | 0834f9f07631a8857a96614e37cb21e1dc84ffb4 (patch) | |
tree | c62e777de69d8397ed7870991bc46d5648a20046 /target/linux/brcm2708/patches-4.1/0055-Fix-LED-input-trigger-implementation-for-3.19.patch | |
parent | b3dc9566a46efa67951ff6ae28e4397da9db92af (diff) | |
download | master-31e0f0ae-0834f9f07631a8857a96614e37cb21e1dc84ffb4.tar.gz master-31e0f0ae-0834f9f07631a8857a96614e37cb21e1dc84ffb4.tar.bz2 master-31e0f0ae-0834f9f07631a8857a96614e37cb21e1dc84ffb4.zip |
brcm2708: remove linux 4.1 support
Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
SVN-Revision: 48766
Diffstat (limited to 'target/linux/brcm2708/patches-4.1/0055-Fix-LED-input-trigger-implementation-for-3.19.patch')
-rw-r--r-- | target/linux/brcm2708/patches-4.1/0055-Fix-LED-input-trigger-implementation-for-3.19.patch | 83 |
1 files changed, 0 insertions, 83 deletions
diff --git a/target/linux/brcm2708/patches-4.1/0055-Fix-LED-input-trigger-implementation-for-3.19.patch b/target/linux/brcm2708/patches-4.1/0055-Fix-LED-input-trigger-implementation-for-3.19.patch deleted file mode 100644 index 4ed3ec23be..0000000000 --- a/target/linux/brcm2708/patches-4.1/0055-Fix-LED-input-trigger-implementation-for-3.19.patch +++ /dev/null @@ -1,83 +0,0 @@ -From f70193e9a8918b67e119a7f105781e2f4a7a8693 Mon Sep 17 00:00:00 2001 -From: Phil Elwell <phil@raspberrypi.org> -Date: Thu, 12 Feb 2015 11:17:53 +0000 -Subject: [PATCH 055/222] Fix LED "input" trigger implementation for 3.19 - ---- - drivers/leds/leds-gpio.c | 10 +++++++++- - drivers/leds/trigger/ledtrig-input.c | 19 ++++--------------- - include/linux/leds.h | 3 +++ - 3 files changed, 16 insertions(+), 16 deletions(-) - ---- a/drivers/leds/leds-gpio.c -+++ b/drivers/leds/leds-gpio.c -@@ -41,6 +41,13 @@ static void gpio_led_work(struct work_st - led_dat->platform_gpio_blink_set(led_dat->gpiod, - led_dat->new_level, NULL, NULL); - led_dat->blinking = 0; -+ } else if (led_dat->cdev.flags & SET_GPIO_INPUT) { -+ gpiod_direction_input(led_dat->gpiod); -+ led_dat->cdev.flags &= ~SET_GPIO_INPUT; -+ } -+ else if (led_dat->cdev.flags & SET_GPIO_OUTPUT) { -+ gpiod_direction_output(led_dat->gpiod, led_dat->new_level); -+ led_dat->cdev.flags &= ~SET_GPIO_OUTPUT; - } else - gpiod_set_value_cansleep(led_dat->gpiod, led_dat->new_level); - } -@@ -61,7 +68,8 @@ static void gpio_led_set(struct led_clas - * seem to have a reliable way to know if we're already in one; so - * let's just assume the worst. - */ -- if (led_dat->can_sleep) { -+ if (led_dat->can_sleep || -+ (led_dat->cdev.flags & (SET_GPIO_INPUT | SET_GPIO_OUTPUT) )) { - led_dat->new_level = level; - schedule_work(&led_dat->work); - } else { ---- a/drivers/leds/trigger/ledtrig-input.c -+++ b/drivers/leds/trigger/ledtrig-input.c -@@ -18,27 +18,16 @@ - #include <linux/gpio.h> - #include "../leds.h" - --/* This is a hack to get at the private 'gpio' member */ -- --struct gpio_led_data { -- struct led_classdev cdev; -- unsigned gpio; --}; -- - static void input_trig_activate(struct led_classdev *led_cdev) - { -- struct gpio_led_data *led_dat = -- container_of(led_cdev, struct gpio_led_data, cdev); -- if (gpio_is_valid(led_dat->gpio)) -- gpio_direction_input(led_dat->gpio); -+ led_cdev->flags |= SET_GPIO_INPUT; -+ led_set_brightness_async(led_cdev, 0); - } - - static void input_trig_deactivate(struct led_classdev *led_cdev) - { -- struct gpio_led_data *led_dat = -- container_of(led_cdev, struct gpio_led_data, cdev); -- if (gpio_is_valid(led_dat->gpio)) -- gpio_direction_output(led_dat->gpio, 0); -+ led_cdev->flags |= SET_GPIO_OUTPUT; -+ led_set_brightness_async(led_cdev, 0); - } - - static struct led_trigger input_led_trigger = { ---- a/include/linux/leds.h -+++ b/include/linux/leds.h -@@ -47,6 +47,9 @@ struct led_classdev { - #define SET_BRIGHTNESS_ASYNC (1 << 21) - #define SET_BRIGHTNESS_SYNC (1 << 22) - #define LED_DEV_CAP_FLASH (1 << 23) -+ /* Additions for Raspberry Pi PWR LED */ -+#define SET_GPIO_INPUT (1 << 30) -+#define SET_GPIO_OUTPUT (1 << 31) - - /* Set LED brightness level */ - /* Must not sleep, use a workqueue if needed */ |