2 * LP55XX Platform Data Header
4 * Copyright (C) 2012 Texas Instruments
6 * Author: Milo(Woogyom) Kim <milo.kim@ti.com>
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.
12 * Derived from leds-lp5521.h, leds-lp5523.h
15 #ifndef _LEDS_LP55XX_H
16 #define _LEDS_LP55XX_H
18 /* Clock configuration */
19 #define LP55XX_CLOCK_AUTO 0
20 #define LP55XX_CLOCK_INT 1
21 #define LP55XX_CLOCK_EXT 2
23 struct lp55xx_led_config
{
26 u8 led_current
; /* mA x10, 0 if led is not connected */
30 struct lp55xx_predef_pattern
{
40 LP8501_ALL_VDD
, /* D1~9 are connected to VDD */
41 LP8501_6VDD_3VOUT
, /* D1~6 with VDD, D7~9 with VOUT */
42 LP8501_3VDD_6VOUT
, /* D1~6 with VOUT, D7~9 with VDD */
43 LP8501_ALL_VOUT
, /* D1~9 are connected to VOUT */
47 * struct lp55xx_platform_data
48 * @led_config : Configurable led class device
49 * @num_channels : Number of LED channels
50 * @label : Used for naming LEDs
51 * @clock_mode : Input clock mode. LP55XX_CLOCK_AUTO or _INT or _EXT
52 * @setup_resources : Platform specific function before enabling the chip
53 * @release_resources : Platform specific function after disabling the chip
54 * @enable : EN pin control by platform side
55 * @patterns : Predefined pattern data for RGB channels
56 * @num_patterns : Number of patterns
57 * @update_config : Value of CONFIG register
59 struct lp55xx_platform_data
{
61 /* LED channel configuration */
62 struct lp55xx_led_config
*led_config
;
66 /* Clock configuration */
69 /* Platform specific functions */
70 int (*setup_resources
)(void);
71 void (*release_resources
)(void);
72 void (*enable
)(bool state
);
74 /* Predefined pattern data */
75 struct lp55xx_predef_pattern
*patterns
;
76 unsigned int num_patterns
;
79 enum lp8501_pwr_sel pwr_sel
;
82 #endif /* _LEDS_LP55XX_H */
This page took 0.034967 seconds and 5 git commands to generate.