aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/leds/leds-lp5521.c
diff options
context:
space:
mode:
authorMilo(Woogyom) Kim <milo.kim@ti.com>2013-02-05 05:24:37 -0500
committerBryan Wu <cooloney@gmail.com>2013-02-06 18:59:30 -0500
commit93ca4093adb757d5140071e72b2e9bfbb519b6c1 (patch)
treeb4a569d4d3986f65608979c784c95441f968f791 /drivers/leds/leds-lp5521.c
parent87cc4bde2a97cd8acccf34f333d0980dc5c2aa8a (diff)
leds-lp55xx: clean up unused data and functions
Old data structures and I2C function are not used any more. Each driver uses the lp55xx common data and functions. Signed-off-by: Milo(Woogyom) Kim <milo.kim@ti.com> Signed-off-by: Bryan Wu <cooloney@gmail.com>
Diffstat (limited to 'drivers/leds/leds-lp5521.c')
-rw-r--r--drivers/leds/leds-lp5521.c32
1 files changed, 0 insertions, 32 deletions
diff --git a/drivers/leds/leds-lp5521.c b/drivers/leds/leds-lp5521.c
index 46721c3a8e8b..f05eb6e31d58 100644
--- a/drivers/leds/leds-lp5521.c
+++ b/drivers/leds/leds-lp5521.c
@@ -125,25 +125,6 @@
125#define LP5521_RUN_G 0x08 125#define LP5521_RUN_G 0x08
126#define LP5521_RUN_B 0x02 126#define LP5521_RUN_B 0x02
127 127
128struct lp5521_led {
129 int id;
130 u8 chan_nr;
131 u8 led_current;
132 u8 max_current;
133 struct led_classdev cdev;
134 struct work_struct brightness_work;
135 u8 brightness;
136};
137
138struct lp5521_chip {
139 struct lp5521_platform_data *pdata;
140 struct mutex lock; /* Serialize control */
141 struct i2c_client *client;
142 struct lp5521_led leds[LP5521_MAX_LEDS];
143 u8 num_channels;
144 u8 num_leds;
145};
146
147static inline void lp5521_wait_opmode_done(void) 128static inline void lp5521_wait_opmode_done(void)
148{ 129{
149 /* operation mode change needs to be longer than 153 us */ 130 /* operation mode change needs to be longer than 153 us */
@@ -163,11 +144,6 @@ static void lp5521_set_led_current(struct lp55xx_led *led, u8 led_current)
163 led_current); 144 led_current);
164} 145}
165 146
166static inline int lp5521_write(struct i2c_client *client, u8 reg, u8 value)
167{
168 return i2c_smbus_write_byte_data(client, reg, value);
169}
170
171static void lp5521_load_engine(struct lp55xx_chip *chip) 147static void lp5521_load_engine(struct lp55xx_chip *chip)
172{ 148{
173 enum lp55xx_engine_index idx = chip->engine_idx; 149 enum lp55xx_engine_index idx = chip->engine_idx;
@@ -412,14 +388,6 @@ static ssize_t lp5521_selftest(struct device *dev,
412 return sprintf(buf, "%s\n", ret ? "FAIL" : "OK"); 388 return sprintf(buf, "%s\n", ret ? "FAIL" : "OK");
413} 389}
414 390
415static inline struct lp5521_led_pattern *lp5521_get_pattern
416 (struct lp5521_chip *chip, u8 offset)
417{
418 struct lp5521_led_pattern *ptn;
419 ptn = chip->pdata->patterns + (offset - 1);
420 return ptn;
421}
422
423/* device attributes */ 391/* device attributes */
424static DEVICE_ATTR(selftest, S_IRUGO, lp5521_selftest, NULL); 392static DEVICE_ATTR(selftest, S_IRUGO, lp5521_selftest, NULL);
425 393