1 /* SPDX-License-Identifier: GPL-2.0-only */
3 * LP55XX Platform Data Header
5 * Copyright (C) 2012 Texas Instruments
7 * Author: Milo(Woogyom) Kim <milo.kim@ti.com>
9 * Derived from leds-lp5521.h, leds-lp5523.h
12 #ifndef _LEDS_LP55XX_H
13 #define _LEDS_LP55XX_H
15 /* Clock configuration */
16 #define LP55XX_CLOCK_AUTO 0
17 #define LP55XX_CLOCK_INT 1
18 #define LP55XX_CLOCK_EXT 2
20 struct lp55xx_led_config {
22 const char *default_trigger;
24 u8 led_current; /* mA x10, 0 if led is not connected */
28 struct lp55xx_predef_pattern {
38 LP8501_ALL_VDD, /* D1~9 are connected to VDD */
39 LP8501_6VDD_3VOUT, /* D1~6 with VDD, D7~9 with VOUT */
40 LP8501_3VDD_6VOUT, /* D1~6 with VOUT, D7~9 with VDD */
41 LP8501_ALL_VOUT, /* D1~9 are connected to VOUT */
45 * struct lp55xx_platform_data
46 * @led_config : Configurable led class device
47 * @num_channels : Number of LED channels
48 * @label : Used for naming LEDs
49 * @clock_mode : Input clock mode. LP55XX_CLOCK_AUTO or _INT or _EXT
50 * @setup_resources : Platform specific function before enabling the chip
51 * @release_resources : Platform specific function after disabling the chip
52 * @enable : EN pin control by platform side
53 * @patterns : Predefined pattern data for RGB channels
54 * @num_patterns : Number of patterns
55 * @update_config : Value of CONFIG register
57 struct lp55xx_platform_data {
59 /* LED channel configuration */
60 struct lp55xx_led_config *led_config;
64 /* Clock configuration */
67 /* optional enable GPIO */
70 /* Predefined pattern data */
71 struct lp55xx_predef_pattern *patterns;
72 unsigned int num_patterns;
75 enum lp8501_pwr_sel pwr_sel;
78 #endif /* _LEDS_LP55XX_H */