aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/leds
diff options
context:
space:
mode:
authorMarek BehĂșn <marek.behun@nic.cz>2020-09-20 00:15:36 +0200
committerPavel Machek <pavel@ucw.cz>2020-09-30 18:53:12 +0200
commit38b393fec298569c8ec154c750a107299bc8385d (patch)
treed3817971fd4d23fbbac49b700c0d4d1a8d60755b /drivers/leds
parentleds: parse linux,default-trigger DT property in LED core (diff)
downloadlinux-dev-38b393fec298569c8ec154c750a107299bc8385d.tar.xz
linux-dev-38b393fec298569c8ec154c750a107299bc8385d.zip
leds: tca6507: Absorb platform data
The only in-tree usage of this driver is via device-tree. No on else includes linux/leds-tca6507.h, so absorb the definition of platdata structure. Signed-off-by: Marek BehĂșn <marek.behun@nic.cz> Cc: NeilBrown <neilb@suse.de> Reviewed-by: Linus Walleij <linus.walleij@linaro.org> Tested-by: H. Nikolaus Schaller <hns@goldelico.com> Signed-off-by: Pavel Machek <pavel@ucw.cz>
Diffstat (limited to 'drivers/leds')
-rw-r--r--drivers/leds/leds-tca6507.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/drivers/leds/leds-tca6507.c b/drivers/leds/leds-tca6507.c
index a7e9fd85b6dd..b5b5bafe2176 100644
--- a/drivers/leds/leds-tca6507.c
+++ b/drivers/leds/leds-tca6507.c
@@ -95,7 +95,6 @@
#include <linux/i2c.h>
#include <linux/gpio/driver.h>
#include <linux/workqueue.h>
-#include <linux/leds-tca6507.h>
#include <linux/of.h>
/* LED select registers determine the source that drives LED outputs */
@@ -108,6 +107,16 @@
#define TCA6507_LS_BLINK0 0x6 /* Blink at Bank0 rate */
#define TCA6507_LS_BLINK1 0x7 /* Blink at Bank1 rate */
+struct tca6507_platform_data {
+ struct led_platform_data leds;
+#ifdef CONFIG_GPIOLIB
+ int gpio_base;
+ void (*setup)(unsigned gpio_base, unsigned ngpio);
+#endif
+};
+
+#define TCA6507_MAKE_GPIO 1
+
enum {
BANK0,
BANK1,