diff options
| author | Milo(Woogyom) Kim <milo.kim@ti.com> | 2013-02-05 05:26:59 -0500 |
|---|---|---|
| committer | Bryan Wu <cooloney@gmail.com> | 2013-02-06 18:59:30 -0500 |
| commit | df4094d24e6328824a2dfe8e6f641bff9a484d68 (patch) | |
| tree | 8063b08e4f88905f72de640ce70dd8148cf75a44 /include/linux | |
| parent | 79bcc10b8cf3db99958743ecb174e7637e1dd932 (diff) | |
leds-lp5521/5523: use new lp55xx common header
The LP55xx common driver provides a new header, leds-lp55xx.h.
This driver enables removing duplicate code for both drivers and
making coherent driver structure.
LP5521 and LP5523/55231 platform data were merged into one common file.
Therefore, the LP5521/5523 platform code need to be fixed.
This patch has been already acked.
For ux500: https://lkml.org/lkml/2012/10/11/417
Acked-by: Linus Walleij <linus.walleij@linaro.org>
For omap: https://lkml.org/lkml/2012/10/11/334
Acked-by: Tony Lindgren <tony@atomide.com>
Signed-off-by: Milo(Woogyom) Kim <milo.kim@ti.com>
Signed-off-by: Bryan Wu <cooloney@gmail.com>
Diffstat (limited to 'include/linux')
| -rw-r--r-- | include/linux/leds-lp5521.h | 73 | ||||
| -rw-r--r-- | include/linux/leds-lp5523.h | 49 |
2 files changed, 0 insertions, 122 deletions
diff --git a/include/linux/leds-lp5521.h b/include/linux/leds-lp5521.h deleted file mode 100644 index 3f071ec019b2..000000000000 --- a/include/linux/leds-lp5521.h +++ /dev/null | |||
| @@ -1,73 +0,0 @@ | |||
| 1 | /* | ||
| 2 | * LP5521 LED chip driver. | ||
| 3 | * | ||
| 4 | * Copyright (C) 2010 Nokia Corporation | ||
| 5 | * | ||
| 6 | * Contact: Samu Onkalo <samu.p.onkalo@nokia.com> | ||
| 7 | * | ||
| 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 | * | ||
| 12 | * This program is distributed in the hope that it will be useful, but | ||
| 13 | * WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
| 15 | * General Public License for more details. | ||
| 16 | * | ||
| 17 | * You should have received a copy of the GNU General Public License | ||
| 18 | * along with this program; if not, write to the Free Software | ||
| 19 | * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA | ||
| 20 | * 02110-1301 USA | ||
| 21 | */ | ||
| 22 | |||
| 23 | #ifndef __LINUX_LP5521_H | ||
| 24 | #define __LINUX_LP5521_H | ||
| 25 | |||
| 26 | /* See Documentation/leds/leds-lp5521.txt */ | ||
| 27 | |||
| 28 | struct lp5521_led_config { | ||
| 29 | char *name; | ||
| 30 | u8 chan_nr; | ||
| 31 | u8 led_current; /* mA x10, 0 if led is not connected */ | ||
| 32 | u8 max_current; | ||
| 33 | }; | ||
| 34 | |||
| 35 | struct lp5521_led_pattern { | ||
| 36 | u8 *r; | ||
| 37 | u8 *g; | ||
| 38 | u8 *b; | ||
| 39 | u8 size_r; | ||
| 40 | u8 size_g; | ||
| 41 | u8 size_b; | ||
| 42 | }; | ||
| 43 | |||
| 44 | #define LP5521_CLOCK_AUTO 0 | ||
| 45 | #define LP5521_CLOCK_INT 1 | ||
| 46 | #define LP5521_CLOCK_EXT 2 | ||
| 47 | |||
| 48 | /* Bits in CONFIG register */ | ||
| 49 | #define LP5521_PWM_HF 0x40 /* PWM: 0 = 256Hz, 1 = 558Hz */ | ||
| 50 | #define LP5521_PWRSAVE_EN 0x20 /* 1 = Power save mode */ | ||
| 51 | #define LP5521_CP_MODE_OFF 0 /* Charge pump (CP) off */ | ||
| 52 | #define LP5521_CP_MODE_BYPASS 8 /* CP forced to bypass mode */ | ||
| 53 | #define LP5521_CP_MODE_1X5 0x10 /* CP forced to 1.5x mode */ | ||
| 54 | #define LP5521_CP_MODE_AUTO 0x18 /* Automatic mode selection */ | ||
| 55 | #define LP5521_R_TO_BATT 4 /* R out: 0 = CP, 1 = Vbat */ | ||
| 56 | #define LP5521_CLK_SRC_EXT 0 /* Ext-clk source (CLK_32K) */ | ||
| 57 | #define LP5521_CLK_INT 1 /* Internal clock */ | ||
| 58 | #define LP5521_CLK_AUTO 2 /* Automatic clock selection */ | ||
| 59 | |||
| 60 | struct lp5521_platform_data { | ||
| 61 | struct lp5521_led_config *led_config; | ||
| 62 | u8 num_channels; | ||
| 63 | u8 clock_mode; | ||
| 64 | int (*setup_resources)(void); | ||
| 65 | void (*release_resources)(void); | ||
| 66 | void (*enable)(bool state); | ||
| 67 | const char *label; | ||
| 68 | u8 update_config; | ||
| 69 | struct lp5521_led_pattern *patterns; | ||
| 70 | int num_patterns; | ||
| 71 | }; | ||
| 72 | |||
| 73 | #endif /* __LINUX_LP5521_H */ | ||
diff --git a/include/linux/leds-lp5523.h b/include/linux/leds-lp5523.h deleted file mode 100644 index 727877fb406d..000000000000 --- a/include/linux/leds-lp5523.h +++ /dev/null | |||
| @@ -1,49 +0,0 @@ | |||
| 1 | /* | ||
| 2 | * LP5523 LED Driver | ||
| 3 | * | ||
| 4 | * Copyright (C) 2010 Nokia Corporation | ||
| 5 | * | ||
| 6 | * Contact: Samu Onkalo <samu.p.onkalo@nokia.com> | ||
| 7 | * | ||
| 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 | * | ||
| 12 | * This program is distributed in the hope that it will be useful, but | ||
| 13 | * WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
| 15 | * General Public License for more details. | ||
| 16 | * | ||
| 17 | * You should have received a copy of the GNU General Public License | ||
| 18 | * along with this program; if not, write to the Free Software | ||
| 19 | * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA | ||
| 20 | * 02110-1301 USA | ||
| 21 | */ | ||
| 22 | |||
| 23 | #ifndef __LINUX_LP5523_H | ||
| 24 | #define __LINUX_LP5523_H | ||
| 25 | |||
| 26 | /* See Documentation/leds/leds-lp5523.txt */ | ||
| 27 | |||
| 28 | struct lp5523_led_config { | ||
| 29 | const char *name; | ||
| 30 | u8 chan_nr; | ||
| 31 | u8 led_current; /* mA x10, 0 if led is not connected */ | ||
| 32 | u8 max_current; | ||
| 33 | }; | ||
| 34 | |||
| 35 | #define LP5523_CLOCK_AUTO 0 | ||
| 36 | #define LP5523_CLOCK_INT 1 | ||
| 37 | #define LP5523_CLOCK_EXT 2 | ||
| 38 | |||
| 39 | struct lp5523_platform_data { | ||
| 40 | struct lp5523_led_config *led_config; | ||
| 41 | u8 num_channels; | ||
| 42 | u8 clock_mode; | ||
| 43 | int (*setup_resources)(void); | ||
| 44 | void (*release_resources)(void); | ||
| 45 | void (*enable)(bool state); | ||
| 46 | const char *label; | ||
| 47 | }; | ||
| 48 | |||
| 49 | #endif /* __LINUX_LP5523_H */ | ||
