hc
2024-05-10 748e4f3d702def1a4bff191e0cf93b6a05340f01
kernel/include/linux/platform_data/leds-lp55xx.h
....@@ -1,3 +1,4 @@
1
+/* SPDX-License-Identifier: GPL-2.0-only */
12 /*
23 * LP55XX Platform Data Header
34 *
....@@ -5,20 +6,21 @@
56 *
67 * Author: Milo(Woogyom) Kim <milo.kim@ti.com>
78 *
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
- *
129 * Derived from leds-lp5521.h, leds-lp5523.h
1310 */
1411
1512 #ifndef _LEDS_LP55XX_H
1613 #define _LEDS_LP55XX_H
1714
15
+#include <linux/gpio/consumer.h>
16
+#include <linux/led-class-multicolor.h>
17
+
1818 /* Clock configuration */
1919 #define LP55XX_CLOCK_AUTO 0
2020 #define LP55XX_CLOCK_INT 1
2121 #define LP55XX_CLOCK_EXT 2
22
+
23
+#define LP55XX_MAX_GROUPED_CHAN 4
2224
2325 struct lp55xx_led_config {
2426 const char *name;
....@@ -26,6 +28,10 @@
2628 u8 chan_nr;
2729 u8 led_current; /* mA x10, 0 if led is not connected */
2830 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];
2935 };
3036
3137 struct lp55xx_predef_pattern {
....@@ -52,7 +58,7 @@
5258 * @clock_mode : Input clock mode. LP55XX_CLOCK_AUTO or _INT or _EXT
5359 * @setup_resources : Platform specific function before enabling the chip
5460 * @release_resources : Platform specific function after disabling the chip
55
- * @enable : EN pin control by platform side
61
+ * @enable_gpiod : enable GPIO descriptor
5662 * @patterns : Predefined pattern data for RGB channels
5763 * @num_patterns : Number of patterns
5864 * @update_config : Value of CONFIG register
....@@ -68,7 +74,7 @@
6874 u8 clock_mode;
6975
7076 /* optional enable GPIO */
71
- int enable_gpio;
77
+ struct gpio_desc *enable_gpiod;
7278
7379 /* Predefined pattern data */
7480 struct lp55xx_predef_pattern *patterns;