diff options
author | Linus Walleij <linus.walleij@linaro.org> | 2020-06-27 00:40:11 +0200 |
---|---|---|
committer | Pavel Machek <pavel@ucw.cz> | 2020-07-12 09:52:22 +0200 |
commit | ac219bf3c9bdf9200767e8c98a56ad42c75e5cd5 (patch) | |
tree | 8ce6b5b074223c73c36d92ebe73a8aa7947dac34 /include | |
parent | e190f57df3c7e7713687905c14e72fbcbd81c5e4 (diff) |
leds: lp55xx: Convert to use GPIO descriptors
The LP55xx driver is already using the of_gpio() functions to
pick a global GPIO number for "enable" from the device tree and
request the line. Simplify it by just using a GPIO descriptor.
Make sure to keep the enable GPIO line optional, change the
naming from "lp5523_enable" to "LP55xx enable" to reflect that
this is used on all LP55xx LED drivers.
Cc: Milo Kim <milo.kim@ti.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Pavel Machek <pavel@ucw.cz>
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/platform_data/leds-lp55xx.h | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/include/linux/platform_data/leds-lp55xx.h b/include/linux/platform_data/leds-lp55xx.h index 96a787100fda..00492d6ff018 100644 --- a/include/linux/platform_data/leds-lp55xx.h +++ b/include/linux/platform_data/leds-lp55xx.h @@ -12,6 +12,8 @@ #ifndef _LEDS_LP55XX_H #define _LEDS_LP55XX_H +#include <linux/gpio/consumer.h> + /* Clock configuration */ #define LP55XX_CLOCK_AUTO 0 #define LP55XX_CLOCK_INT 1 @@ -49,7 +51,7 @@ enum lp8501_pwr_sel { * @clock_mode : Input clock mode. LP55XX_CLOCK_AUTO or _INT or _EXT * @setup_resources : Platform specific function before enabling the chip * @release_resources : Platform specific function after disabling the chip - * @enable : EN pin control by platform side + * @enable_gpiod : enable GPIO descriptor * @patterns : Predefined pattern data for RGB channels * @num_patterns : Number of patterns * @update_config : Value of CONFIG register @@ -65,7 +67,7 @@ struct lp55xx_platform_data { u8 clock_mode; /* optional enable GPIO */ - int enable_gpio; + struct gpio_desc *enable_gpiod; /* Predefined pattern data */ struct lp55xx_predef_pattern *patterns; |