.. | .. |
---|
| 1 | +/* SPDX-License-Identifier: GPL-2.0-only */ |
---|
1 | 2 | /* |
---|
2 | 3 | * LP55XX Platform Data Header |
---|
3 | 4 | * |
---|
.. | .. |
---|
5 | 6 | * |
---|
6 | 7 | * Author: Milo(Woogyom) Kim <milo.kim@ti.com> |
---|
7 | 8 | * |
---|
8 | | - * This program is free software; you can redistribute it and/or |
---|
9 | | - * modify it under the terms of the GNU General Public License |
---|
10 | | - * version 2 as published by the Free Software Foundation. |
---|
11 | | - * |
---|
12 | 9 | * Derived from leds-lp5521.h, leds-lp5523.h |
---|
13 | 10 | */ |
---|
14 | 11 | |
---|
15 | 12 | #ifndef _LEDS_LP55XX_H |
---|
16 | 13 | #define _LEDS_LP55XX_H |
---|
17 | 14 | |
---|
| 15 | +#include <linux/gpio/consumer.h> |
---|
| 16 | +#include <linux/led-class-multicolor.h> |
---|
| 17 | + |
---|
18 | 18 | /* Clock configuration */ |
---|
19 | 19 | #define LP55XX_CLOCK_AUTO 0 |
---|
20 | 20 | #define LP55XX_CLOCK_INT 1 |
---|
21 | 21 | #define LP55XX_CLOCK_EXT 2 |
---|
| 22 | + |
---|
| 23 | +#define LP55XX_MAX_GROUPED_CHAN 4 |
---|
22 | 24 | |
---|
23 | 25 | struct lp55xx_led_config { |
---|
24 | 26 | const char *name; |
---|
.. | .. |
---|
26 | 28 | u8 chan_nr; |
---|
27 | 29 | u8 led_current; /* mA x10, 0 if led is not connected */ |
---|
28 | 30 | u8 max_current; |
---|
| 31 | + int num_colors; |
---|
| 32 | + unsigned int max_channel; |
---|
| 33 | + int color_id[LED_COLOR_ID_MAX]; |
---|
| 34 | + int output_num[LED_COLOR_ID_MAX]; |
---|
29 | 35 | }; |
---|
30 | 36 | |
---|
31 | 37 | struct lp55xx_predef_pattern { |
---|
.. | .. |
---|
52 | 58 | * @clock_mode : Input clock mode. LP55XX_CLOCK_AUTO or _INT or _EXT |
---|
53 | 59 | * @setup_resources : Platform specific function before enabling the chip |
---|
54 | 60 | * @release_resources : Platform specific function after disabling the chip |
---|
55 | | - * @enable : EN pin control by platform side |
---|
| 61 | + * @enable_gpiod : enable GPIO descriptor |
---|
56 | 62 | * @patterns : Predefined pattern data for RGB channels |
---|
57 | 63 | * @num_patterns : Number of patterns |
---|
58 | 64 | * @update_config : Value of CONFIG register |
---|
.. | .. |
---|
68 | 74 | u8 clock_mode; |
---|
69 | 75 | |
---|
70 | 76 | /* optional enable GPIO */ |
---|
71 | | - int enable_gpio; |
---|
| 77 | + struct gpio_desc *enable_gpiod; |
---|
72 | 78 | |
---|
73 | 79 | /* Predefined pattern data */ |
---|
74 | 80 | struct lp55xx_predef_pattern *patterns; |
---|