summaryrefslogtreecommitdiff
path: root/include/linux/platform_data
diff options
context:
space:
mode:
authorGwendal Grignou <gwendal@chromium.org>2026-01-30 00:13:50 -0800
committerTzung-Bi Shih <tzungbi@kernel.org>2026-01-30 08:29:52 +0000
commit2d8251d98ce0be96d79aec708aa70cab2b4f6f17 (patch)
tree136ea0ac9ec176cccc2b48b5d133e3a1524785d3 /include/linux/platform_data
parentec0dd36dbf8b0b209e63d0cd795451fa2203c736 (diff)
platform/chrome: lightbar: Report number of segments
Add attribue `num_segments` to return the number of exposed LED segments in the lightbar. It can be smaller than the number of physical leds in the lightbar. Test: Check the attribute is present and returns a value when read. Signed-off-by: Gwendal Grignou <gwendal@google.com> Link: https://lore.kernel.org/r/20260130081351.487517-1-gwendal@google.com Signed-off-by: Tzung-Bi Shih <tzungbi@kernel.org>
Diffstat (limited to 'include/linux/platform_data')
-rw-r--r--include/linux/platform_data/cros_ec_commands.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/include/linux/platform_data/cros_ec_commands.h b/include/linux/platform_data/cros_ec_commands.h
index 69294f79cc88..9cbf024f56c3 100644
--- a/include/linux/platform_data/cros_ec_commands.h
+++ b/include/linux/platform_data/cros_ec_commands.h
@@ -2005,6 +2005,14 @@ struct lightbar_params_v2_colors {
struct rgb_s color[8]; /* 0-3 are Google colors */
} __ec_todo_packed;
+struct lightbar_params_v3 {
+ /*
+ * Number of LEDs reported by the EC.
+ * May be less than the actual number of LEDs in the lightbar.
+ */
+ uint8_t reported_led_num;
+} __ec_todo_packed;
+
/* Lightbar program. */
#define EC_LB_PROG_LEN 192
struct lightbar_program {
@@ -2086,6 +2094,8 @@ struct ec_response_lightbar {
struct lightbar_params_v2_thresholds get_params_v2_thlds;
struct lightbar_params_v2_colors get_params_v2_colors;
+ struct lightbar_params_v3 get_params_v3;
+
struct __ec_todo_unpacked {
uint32_t num;
uint32_t flags;
@@ -2143,6 +2153,7 @@ enum lightbar_command {
LIGHTBAR_CMD_SET_PARAMS_V2_THRESHOLDS = 31,
LIGHTBAR_CMD_GET_PARAMS_V2_COLORS = 32,
LIGHTBAR_CMD_SET_PARAMS_V2_COLORS = 33,
+ LIGHTBAR_CMD_GET_PARAMS_V3 = 34,
LIGHTBAR_NUM_CMDS
};