LEDs changes for 5.9-rc1.
Okay, so... this one is interesting. RGB LEDs are very common, and we need to have some kind of support for them. Multicolor is for arbitrary set of LEDs in one package, RGB is for LEDs that can produce full range of colors. We do not have real multicolor LED that is not RGB in the pipeline, so that one is disabled for now. You can expect this saga to continue with next pull requests. -----BEGIN PGP SIGNATURE----- iF0EABECAB0WIQRPfPO7r0eAhk010v0w5/Bqldv68gUCXyskqQAKCRAw5/Bqldv6 8ge0AJ9JRTa/0Xkl7JuKUpC93jAnvjpK+ACgsDijb77H5zmtwC8xa0kXiDsbh3E= =aSJX -----END PGP SIGNATURE----- Merge tag 'leds-5.9-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/pavel/linux-leds Pull LED updates from Pavel Machek: "Okay, so... this one is interesting. RGB LEDs are very common, and we need to have some kind of support for them. Multicolor is for arbitrary set of LEDs in one package, RGB is for LEDs that can produce full range of colors. We do not have real multicolor LED that is not RGB in the pipeline, so that one is disabled for now. You can expect this saga to continue with next pull requests" * tag 'leds-5.9-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/pavel/linux-leds: (37 commits) MAINTAINERS: Remove myself as LED subsystem maintainer leds: disallow /sys/class/leds/*:multi:* for now leds: add RGB color option, as that is different from multicolor. Make LEDS_LP55XX_COMMON depend on I2C to fix build errors: Documentation: ABI: leds-turris-omnia: document sysfs attribute leds: initial support for Turris Omnia LEDs dt-bindings: leds: add cznic,turris-omnia-leds binding leds: pattern trigger -- check pattern for validity leds: Replace HTTP links with HTTPS ones leds: trigger: add support for LED-private device triggers leds: lp5521: Add multicolor framework multicolor brightness support leds: lp5523: Update the lp5523 code to add multicolor brightness function leds: lp55xx: Add multicolor framework support to lp55xx leds: lp55xx: Convert LED class registration to devm_* dt-bindings: leds: Convert leds-lp55xx to yaml leds: multicolor: Introduce a multicolor class definition leds: Add multicolor ID to the color ID list dt: bindings: Add multicolor class dt bindings documention leds: lp5523: Fix various formatting issues in the code leds: lp55xx: Fix file permissions to use DEVICE_ATTR macros ...
This commit is contained in:
commit
e4a7b2dc35
50 changed files with 1644 additions and 457 deletions
|
|
@ -12,17 +12,26 @@
|
|||
#ifndef _LEDS_LP55XX_H
|
||||
#define _LEDS_LP55XX_H
|
||||
|
||||
#include <linux/gpio/consumer.h>
|
||||
#include <linux/led-class-multicolor.h>
|
||||
|
||||
/* Clock configuration */
|
||||
#define LP55XX_CLOCK_AUTO 0
|
||||
#define LP55XX_CLOCK_INT 1
|
||||
#define LP55XX_CLOCK_EXT 2
|
||||
|
||||
#define LP55XX_MAX_GROUPED_CHAN 4
|
||||
|
||||
struct lp55xx_led_config {
|
||||
const char *name;
|
||||
const char *default_trigger;
|
||||
u8 chan_nr;
|
||||
u8 led_current; /* mA x10, 0 if led is not connected */
|
||||
u8 max_current;
|
||||
int num_colors;
|
||||
unsigned int max_channel;
|
||||
int color_id[LED_COLOR_ID_MAX];
|
||||
int output_num[LED_COLOR_ID_MAX];
|
||||
};
|
||||
|
||||
struct lp55xx_predef_pattern {
|
||||
|
|
@ -49,7 +58,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 +74,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;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue