0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012 #ifndef _LEDS_LP55XX_H
0013 #define _LEDS_LP55XX_H
0014
0015 #include <linux/gpio/consumer.h>
0016 #include <linux/led-class-multicolor.h>
0017
0018
0019 #define LP55XX_CLOCK_AUTO 0
0020 #define LP55XX_CLOCK_INT 1
0021 #define LP55XX_CLOCK_EXT 2
0022
0023 #define LP55XX_MAX_GROUPED_CHAN 4
0024
0025 struct lp55xx_led_config {
0026 const char *name;
0027 const char *default_trigger;
0028 u8 chan_nr;
0029 u8 led_current;
0030 u8 max_current;
0031 int num_colors;
0032 unsigned int max_channel;
0033 int color_id[LED_COLOR_ID_MAX];
0034 int output_num[LED_COLOR_ID_MAX];
0035 };
0036
0037 struct lp55xx_predef_pattern {
0038 const u8 *r;
0039 const u8 *g;
0040 const u8 *b;
0041 u8 size_r;
0042 u8 size_g;
0043 u8 size_b;
0044 };
0045
0046 enum lp8501_pwr_sel {
0047 LP8501_ALL_VDD,
0048 LP8501_6VDD_3VOUT,
0049 LP8501_3VDD_6VOUT,
0050 LP8501_ALL_VOUT,
0051 };
0052
0053
0054
0055
0056
0057
0058
0059
0060
0061
0062
0063
0064
0065
0066 struct lp55xx_platform_data {
0067
0068
0069 struct lp55xx_led_config *led_config;
0070 u8 num_channels;
0071 const char *label;
0072
0073
0074 u8 clock_mode;
0075
0076
0077 struct gpio_desc *enable_gpiod;
0078
0079
0080 struct lp55xx_predef_pattern *patterns;
0081 unsigned int num_patterns;
0082
0083
0084 enum lp8501_pwr_sel pwr_sel;
0085 };
0086
0087 #endif