blob: 88116b493f3ba9d3177c22866df061d7fd449ef7 [file] [log] [blame]
Kim, Milo7be865a2012-03-23 15:02:01 -07001/*
2 * TI LP855x Backlight Driver
3 *
4 * Copyright (C) 2011 Texas Instruments
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License version 2 as
8 * published by the Free Software Foundation.
9 *
10 */
11
12#include <linux/module.h>
13#include <linux/slab.h>
14#include <linux/i2c.h>
15#include <linux/backlight.h>
16#include <linux/err.h>
Kim, Milo4add0662013-04-29 16:18:06 -070017#include <linux/of.h>
Kim, Milof7f95052012-07-30 14:40:53 -070018#include <linux/platform_data/lp855x.h>
Kim, Milo8cc97642012-12-17 16:00:43 -080019#include <linux/pwm.h>
Sean Paul829b0302014-12-02 17:39:12 -080020#include <linux/regulator/consumer.h>
Kim, Milo7be865a2012-03-23 15:02:01 -070021
Kim, Milo26e8ccc2013-02-21 16:44:06 -080022/* LP8550/1/2/3/6 Registers */
23#define LP855X_BRIGHTNESS_CTRL 0x00
24#define LP855X_DEVICE_CTRL 0x01
25#define LP855X_EEPROM_START 0xA0
26#define LP855X_EEPROM_END 0xA7
27#define LP8556_EPROM_START 0xA0
28#define LP8556_EPROM_END 0xAF
29
Milo Kim5812c132013-11-12 15:08:57 -080030/* LP8555/7 Registers */
Kim, Milo26e8ccc2013-02-21 16:44:06 -080031#define LP8557_BL_CMD 0x00
32#define LP8557_BL_MASK 0x01
33#define LP8557_BL_ON 0x01
34#define LP8557_BL_OFF 0x00
35#define LP8557_BRIGHTNESS_CTRL 0x04
36#define LP8557_CONFIG 0x10
Milo Kim5812c132013-11-12 15:08:57 -080037#define LP8555_EPROM_START 0x10
38#define LP8555_EPROM_END 0x7A
Kim, Milo26e8ccc2013-02-21 16:44:06 -080039#define LP8557_EPROM_START 0x10
40#define LP8557_EPROM_END 0x1E
Kim, Milo7be865a2012-03-23 15:02:01 -070041
Kim, Milo7be865a2012-03-23 15:02:01 -070042#define DEFAULT_BL_NAME "lcd-backlight"
43#define MAX_BRIGHTNESS 255
44
Kim, Milo0b818572013-04-29 16:18:03 -070045enum lp855x_brightness_ctrl_mode {
46 PWM_BASED = 1,
47 REGISTER_BASED,
48};
49
Kim, Milo68853bc2013-02-21 16:44:05 -080050struct lp855x;
51
52/*
53 * struct lp855x_device_config
54 * @pre_init_device: init device function call before updating the brightness
55 * @reg_brightness: register address for brigthenss control
56 * @reg_devicectrl: register address for device control
57 * @post_init_device: late init device function call
58 */
59struct lp855x_device_config {
60 int (*pre_init_device)(struct lp855x *);
61 u8 reg_brightness;
62 u8 reg_devicectrl;
63 int (*post_init_device)(struct lp855x *);
64};
65
Kim, Milo7be865a2012-03-23 15:02:01 -070066struct lp855x {
67 const char *chipname;
68 enum lp855x_chip_id chip_id;
Kim, Milo0b818572013-04-29 16:18:03 -070069 enum lp855x_brightness_ctrl_mode mode;
Kim, Milo68853bc2013-02-21 16:44:05 -080070 struct lp855x_device_config *cfg;
Kim, Milo7be865a2012-03-23 15:02:01 -070071 struct i2c_client *client;
72 struct backlight_device *bl;
73 struct device *dev;
Kim, Milo7be865a2012-03-23 15:02:01 -070074 struct lp855x_platform_data *pdata;
Kim, Milo8cc97642012-12-17 16:00:43 -080075 struct pwm_device *pwm;
Kim, Milo7be865a2012-03-23 15:02:01 -070076};
77
Kim, Milo7be865a2012-03-23 15:02:01 -070078static int lp855x_write_byte(struct lp855x *lp, u8 reg, u8 data)
79{
Kim, Miloeaa4d022012-12-17 16:00:45 -080080 return i2c_smbus_write_byte_data(lp->client, reg, data);
Kim, Milo7be865a2012-03-23 15:02:01 -070081}
82
Kim, Milo26e8ccc2013-02-21 16:44:06 -080083static int lp855x_update_bit(struct lp855x *lp, u8 reg, u8 mask, u8 data)
84{
85 int ret;
86 u8 tmp;
87
88 ret = i2c_smbus_read_byte_data(lp->client, reg);
89 if (ret < 0) {
90 dev_err(lp->dev, "failed to read 0x%.2x\n", reg);
91 return ret;
92 }
93
94 tmp = (u8)ret;
95 tmp &= ~mask;
96 tmp |= data & mask;
97
98 return lp855x_write_byte(lp, reg, tmp);
99}
100
Kim, Milo7be865a2012-03-23 15:02:01 -0700101static bool lp855x_is_valid_rom_area(struct lp855x *lp, u8 addr)
102{
103 u8 start, end;
104
105 switch (lp->chip_id) {
106 case LP8550:
107 case LP8551:
108 case LP8552:
109 case LP8553:
Kim, Milo26e8ccc2013-02-21 16:44:06 -0800110 start = LP855X_EEPROM_START;
111 end = LP855X_EEPROM_END;
Kim, Milo7be865a2012-03-23 15:02:01 -0700112 break;
113 case LP8556:
Kim, Milo26e8ccc2013-02-21 16:44:06 -0800114 start = LP8556_EPROM_START;
115 end = LP8556_EPROM_END;
116 break;
Milo Kim5812c132013-11-12 15:08:57 -0800117 case LP8555:
118 start = LP8555_EPROM_START;
119 end = LP8555_EPROM_END;
120 break;
Kim, Milo26e8ccc2013-02-21 16:44:06 -0800121 case LP8557:
122 start = LP8557_EPROM_START;
123 end = LP8557_EPROM_END;
Kim, Milo7be865a2012-03-23 15:02:01 -0700124 break;
125 default:
126 return false;
127 }
128
Jingoo Han2ce23862014-01-23 15:54:32 -0800129 return addr >= start && addr <= end;
Kim, Milo7be865a2012-03-23 15:02:01 -0700130}
131
Kim, Milo26e8ccc2013-02-21 16:44:06 -0800132static int lp8557_bl_off(struct lp855x *lp)
133{
134 /* BL_ON = 0 before updating EPROM settings */
135 return lp855x_update_bit(lp, LP8557_BL_CMD, LP8557_BL_MASK,
136 LP8557_BL_OFF);
137}
138
139static int lp8557_bl_on(struct lp855x *lp)
140{
141 /* BL_ON = 1 after updating EPROM settings */
142 return lp855x_update_bit(lp, LP8557_BL_CMD, LP8557_BL_MASK,
143 LP8557_BL_ON);
144}
145
Kim, Milo68853bc2013-02-21 16:44:05 -0800146static struct lp855x_device_config lp855x_dev_cfg = {
Kim, Milo26e8ccc2013-02-21 16:44:06 -0800147 .reg_brightness = LP855X_BRIGHTNESS_CTRL,
148 .reg_devicectrl = LP855X_DEVICE_CTRL,
149};
150
151static struct lp855x_device_config lp8557_dev_cfg = {
152 .reg_brightness = LP8557_BRIGHTNESS_CTRL,
153 .reg_devicectrl = LP8557_CONFIG,
154 .pre_init_device = lp8557_bl_off,
155 .post_init_device = lp8557_bl_on,
Kim, Milo68853bc2013-02-21 16:44:05 -0800156};
157
158/*
159 * Device specific configuration flow
160 *
161 * a) pre_init_device(optional)
162 * b) update the brightness register
163 * c) update device control register
164 * d) update ROM area(optional)
165 * e) post_init_device(optional)
166 *
167 */
168static int lp855x_configure(struct lp855x *lp)
Kim, Milo7be865a2012-03-23 15:02:01 -0700169{
170 u8 val, addr;
171 int i, ret;
172 struct lp855x_platform_data *pd = lp->pdata;
173
Kim, Milo68853bc2013-02-21 16:44:05 -0800174 switch (lp->chip_id) {
Milo Kim5812c132013-11-12 15:08:57 -0800175 case LP8550:
176 case LP8551:
177 case LP8552:
178 case LP8553:
179 case LP8556:
Kim, Milo68853bc2013-02-21 16:44:05 -0800180 lp->cfg = &lp855x_dev_cfg;
181 break;
Milo Kim5812c132013-11-12 15:08:57 -0800182 case LP8555:
Kim, Milo26e8ccc2013-02-21 16:44:06 -0800183 case LP8557:
184 lp->cfg = &lp8557_dev_cfg;
185 break;
Kim, Milo68853bc2013-02-21 16:44:05 -0800186 default:
187 return -EINVAL;
188 }
189
190 if (lp->cfg->pre_init_device) {
191 ret = lp->cfg->pre_init_device(lp);
192 if (ret) {
193 dev_err(lp->dev, "pre init device err: %d\n", ret);
194 goto err;
195 }
196 }
197
Kim, Milo7be865a2012-03-23 15:02:01 -0700198 val = pd->initial_brightness;
Kim, Milo68853bc2013-02-21 16:44:05 -0800199 ret = lp855x_write_byte(lp, lp->cfg->reg_brightness, val);
Kim, Milo7be865a2012-03-23 15:02:01 -0700200 if (ret)
Kim, Milo68853bc2013-02-21 16:44:05 -0800201 goto err;
Kim, Milo7be865a2012-03-23 15:02:01 -0700202
203 val = pd->device_control;
Kim, Milo68853bc2013-02-21 16:44:05 -0800204 ret = lp855x_write_byte(lp, lp->cfg->reg_devicectrl, val);
Kim, Milo7be865a2012-03-23 15:02:01 -0700205 if (ret)
Kim, Milo68853bc2013-02-21 16:44:05 -0800206 goto err;
Kim, Milo7be865a2012-03-23 15:02:01 -0700207
Kim, Miloc365e592013-04-29 16:18:05 -0700208 if (pd->size_program > 0) {
Kim, Milo7be865a2012-03-23 15:02:01 -0700209 for (i = 0; i < pd->size_program; i++) {
210 addr = pd->rom_data[i].addr;
211 val = pd->rom_data[i].val;
212 if (!lp855x_is_valid_rom_area(lp, addr))
213 continue;
214
215 ret = lp855x_write_byte(lp, addr, val);
216 if (ret)
Kim, Milo68853bc2013-02-21 16:44:05 -0800217 goto err;
Kim, Milo7be865a2012-03-23 15:02:01 -0700218 }
219 }
220
Kim, Milo68853bc2013-02-21 16:44:05 -0800221 if (lp->cfg->post_init_device) {
222 ret = lp->cfg->post_init_device(lp);
223 if (ret) {
224 dev_err(lp->dev, "post init device err: %d\n", ret);
225 goto err;
226 }
227 }
228
229 return 0;
230
231err:
Kim, Milo7be865a2012-03-23 15:02:01 -0700232 return ret;
233}
234
Kim, Milo8cc97642012-12-17 16:00:43 -0800235static void lp855x_pwm_ctrl(struct lp855x *lp, int br, int max_br)
236{
237 unsigned int period = lp->pdata->period_ns;
238 unsigned int duty = br * period / max_br;
239 struct pwm_device *pwm;
240
241 /* request pwm device with the consumer name */
242 if (!lp->pwm) {
243 pwm = devm_pwm_get(lp->dev, lp->chipname);
244 if (IS_ERR(pwm))
245 return;
246
247 lp->pwm = pwm;
248 }
249
250 pwm_config(lp->pwm, duty, period);
251 if (duty)
252 pwm_enable(lp->pwm);
253 else
254 pwm_disable(lp->pwm);
255}
256
Kim, Milo7be865a2012-03-23 15:02:01 -0700257static int lp855x_bl_update_status(struct backlight_device *bl)
258{
259 struct lp855x *lp = bl_get_data(bl);
Sean Paul61c1c612015-05-11 13:32:05 -0700260 int brightness = bl->props.brightness;
Kim, Milo7be865a2012-03-23 15:02:01 -0700261
Shingo Nakao9f0a5112013-07-02 14:15:54 +0200262 if (bl->props.state & (BL_CORE_SUSPENDED | BL_CORE_FBBLANK))
Sean Paul61c1c612015-05-11 13:32:05 -0700263 brightness = 0;
Kim, Milo7be865a2012-03-23 15:02:01 -0700264
Sean Paul61c1c612015-05-11 13:32:05 -0700265 if (lp->mode == PWM_BASED)
266 lp855x_pwm_ctrl(lp, brightness, bl->props.max_brightness);
267 else if (lp->mode == REGISTER_BASED)
268 lp855x_write_byte(lp, lp->cfg->reg_brightness, (u8)brightness);
Kim, Milo7be865a2012-03-23 15:02:01 -0700269
270 return 0;
271}
272
Kim, Milo7be865a2012-03-23 15:02:01 -0700273static const struct backlight_ops lp855x_bl_ops = {
274 .options = BL_CORE_SUSPENDRESUME,
275 .update_status = lp855x_bl_update_status,
Kim, Milo7be865a2012-03-23 15:02:01 -0700276};
277
278static int lp855x_backlight_register(struct lp855x *lp)
279{
280 struct backlight_device *bl;
281 struct backlight_properties props;
282 struct lp855x_platform_data *pdata = lp->pdata;
Kim, Milo600ffd32013-04-29 16:18:02 -0700283 const char *name = pdata->name ? : DEFAULT_BL_NAME;
Kim, Milo7be865a2012-03-23 15:02:01 -0700284
285 props.type = BACKLIGHT_PLATFORM;
286 props.max_brightness = MAX_BRIGHTNESS;
287
288 if (pdata->initial_brightness > props.max_brightness)
289 pdata->initial_brightness = props.max_brightness;
290
291 props.brightness = pdata->initial_brightness;
292
Jingoo Han6255e8e2013-11-12 15:09:19 -0800293 bl = devm_backlight_device_register(lp->dev, name, lp->dev, lp,
Kim, Milo7be865a2012-03-23 15:02:01 -0700294 &lp855x_bl_ops, &props);
295 if (IS_ERR(bl))
296 return PTR_ERR(bl);
297
298 lp->bl = bl;
299
300 return 0;
301}
302
Kim, Milo7be865a2012-03-23 15:02:01 -0700303static ssize_t lp855x_get_chip_id(struct device *dev,
304 struct device_attribute *attr, char *buf)
305{
306 struct lp855x *lp = dev_get_drvdata(dev);
Jingoo Hana94cb122014-08-27 10:12:53 +0900307
Kim, Milo6a7aeb12013-04-29 16:17:52 -0700308 return scnprintf(buf, PAGE_SIZE, "%s\n", lp->chipname);
Kim, Milo7be865a2012-03-23 15:02:01 -0700309}
310
311static ssize_t lp855x_get_bl_ctl_mode(struct device *dev,
312 struct device_attribute *attr, char *buf)
313{
314 struct lp855x *lp = dev_get_drvdata(dev);
Kim, Milo7be865a2012-03-23 15:02:01 -0700315 char *strmode = NULL;
316
Kim, Milo0b818572013-04-29 16:18:03 -0700317 if (lp->mode == PWM_BASED)
Kim, Milo7be865a2012-03-23 15:02:01 -0700318 strmode = "pwm based";
Kim, Milo0b818572013-04-29 16:18:03 -0700319 else if (lp->mode == REGISTER_BASED)
Kim, Milo7be865a2012-03-23 15:02:01 -0700320 strmode = "register based";
321
Kim, Milo6a7aeb12013-04-29 16:17:52 -0700322 return scnprintf(buf, PAGE_SIZE, "%s\n", strmode);
Kim, Milo7be865a2012-03-23 15:02:01 -0700323}
324
325static DEVICE_ATTR(chip_id, S_IRUGO, lp855x_get_chip_id, NULL);
326static DEVICE_ATTR(bl_ctl_mode, S_IRUGO, lp855x_get_bl_ctl_mode, NULL);
327
328static struct attribute *lp855x_attributes[] = {
329 &dev_attr_chip_id.attr,
330 &dev_attr_bl_ctl_mode.attr,
331 NULL,
332};
333
334static const struct attribute_group lp855x_attr_group = {
335 .attrs = lp855x_attributes,
336};
337
Kim, Milo4add0662013-04-29 16:18:06 -0700338#ifdef CONFIG_OF
Sean Paul47726652014-12-02 17:39:11 -0800339static int lp855x_parse_dt(struct lp855x *lp)
Kim, Milo4add0662013-04-29 16:18:06 -0700340{
Sean Paul47726652014-12-02 17:39:11 -0800341 struct device *dev = lp->dev;
342 struct device_node *node = dev->of_node;
Kim, Milo4add0662013-04-29 16:18:06 -0700343 struct lp855x_platform_data *pdata;
344 int rom_length;
345
346 if (!node) {
347 dev_err(dev, "no platform data\n");
348 return -EINVAL;
349 }
350
351 pdata = devm_kzalloc(dev, sizeof(*pdata), GFP_KERNEL);
352 if (!pdata)
353 return -ENOMEM;
354
355 of_property_read_string(node, "bl-name", &pdata->name);
356 of_property_read_u8(node, "dev-ctrl", &pdata->device_control);
357 of_property_read_u8(node, "init-brt", &pdata->initial_brightness);
358 of_property_read_u32(node, "pwm-period", &pdata->period_ns);
359
360 /* Fill ROM platform data if defined */
361 rom_length = of_get_child_count(node);
362 if (rom_length > 0) {
363 struct lp855x_rom_data *rom;
364 struct device_node *child;
365 int i = 0;
366
367 rom = devm_kzalloc(dev, sizeof(*rom) * rom_length, GFP_KERNEL);
368 if (!rom)
369 return -ENOMEM;
370
371 for_each_child_of_node(node, child) {
372 of_property_read_u8(child, "rom-addr", &rom[i].addr);
373 of_property_read_u8(child, "rom-val", &rom[i].val);
374 i++;
375 }
376
377 pdata->size_program = rom_length;
378 pdata->rom_data = &rom[0];
379 }
380
Sean Paul829b0302014-12-02 17:39:12 -0800381 pdata->supply = devm_regulator_get(dev, "power");
382 if (IS_ERR(pdata->supply)) {
383 if (PTR_ERR(pdata->supply) == -EPROBE_DEFER)
384 return -EPROBE_DEFER;
385 pdata->supply = NULL;
386 }
387
Sean Paul47726652014-12-02 17:39:11 -0800388 lp->pdata = pdata;
Kim, Milo4add0662013-04-29 16:18:06 -0700389
390 return 0;
391}
392#else
Sean Paul47726652014-12-02 17:39:11 -0800393static int lp855x_parse_dt(struct lp855x *lp)
Kim, Milo4add0662013-04-29 16:18:06 -0700394{
395 return -EINVAL;
396}
397#endif
398
Kim, Milo7be865a2012-03-23 15:02:01 -0700399static int lp855x_probe(struct i2c_client *cl, const struct i2c_device_id *id)
400{
401 struct lp855x *lp;
Kim, Milo7be865a2012-03-23 15:02:01 -0700402 int ret;
403
Kim, Milo7be865a2012-03-23 15:02:01 -0700404 if (!i2c_check_functionality(cl->adapter, I2C_FUNC_SMBUS_I2C_BLOCK))
405 return -EIO;
406
407 lp = devm_kzalloc(&cl->dev, sizeof(struct lp855x), GFP_KERNEL);
408 if (!lp)
409 return -ENOMEM;
410
Sean Paul47726652014-12-02 17:39:11 -0800411 lp->client = cl;
412 lp->dev = &cl->dev;
413 lp->chipname = id->name;
414 lp->chip_id = id->driver_data;
415 lp->pdata = dev_get_platdata(&cl->dev);
416
417 if (!lp->pdata) {
418 ret = lp855x_parse_dt(lp);
419 if (ret < 0)
420 return ret;
421 }
422
423 if (lp->pdata->period_ns > 0)
Kim, Milo0b818572013-04-29 16:18:03 -0700424 lp->mode = PWM_BASED;
425 else
426 lp->mode = REGISTER_BASED;
427
Sean Paul829b0302014-12-02 17:39:12 -0800428 if (lp->pdata->supply) {
429 ret = regulator_enable(lp->pdata->supply);
430 if (ret < 0) {
431 dev_err(&cl->dev, "failed to enable supply: %d\n", ret);
432 return ret;
433 }
434 }
435
Kim, Milo7be865a2012-03-23 15:02:01 -0700436 i2c_set_clientdata(cl, lp);
437
Kim, Milo68853bc2013-02-21 16:44:05 -0800438 ret = lp855x_configure(lp);
Kim, Milo7be865a2012-03-23 15:02:01 -0700439 if (ret) {
Kim, Milo68853bc2013-02-21 16:44:05 -0800440 dev_err(lp->dev, "device config err: %d", ret);
Jingoo Han6255e8e2013-11-12 15:09:19 -0800441 return ret;
Kim, Milo7be865a2012-03-23 15:02:01 -0700442 }
443
444 ret = lp855x_backlight_register(lp);
445 if (ret) {
446 dev_err(lp->dev,
447 "failed to register backlight. err: %d\n", ret);
Jingoo Han6255e8e2013-11-12 15:09:19 -0800448 return ret;
Kim, Milo7be865a2012-03-23 15:02:01 -0700449 }
450
451 ret = sysfs_create_group(&lp->dev->kobj, &lp855x_attr_group);
452 if (ret) {
453 dev_err(lp->dev, "failed to register sysfs. err: %d\n", ret);
Jingoo Han6255e8e2013-11-12 15:09:19 -0800454 return ret;
Kim, Milo7be865a2012-03-23 15:02:01 -0700455 }
456
457 backlight_update_status(lp->bl);
458 return 0;
Kim, Milo7be865a2012-03-23 15:02:01 -0700459}
460
Bill Pemberton7e4b9d02012-11-19 13:26:34 -0500461static int lp855x_remove(struct i2c_client *cl)
Kim, Milo7be865a2012-03-23 15:02:01 -0700462{
463 struct lp855x *lp = i2c_get_clientdata(cl);
464
465 lp->bl->props.brightness = 0;
466 backlight_update_status(lp->bl);
Sean Paul829b0302014-12-02 17:39:12 -0800467 if (lp->pdata->supply)
468 regulator_disable(lp->pdata->supply);
Kim, Milo7be865a2012-03-23 15:02:01 -0700469 sysfs_remove_group(&lp->dev->kobj, &lp855x_attr_group);
Kim, Milo7be865a2012-03-23 15:02:01 -0700470
471 return 0;
472}
473
Kim, Milo4add0662013-04-29 16:18:06 -0700474static const struct of_device_id lp855x_dt_ids[] = {
475 { .compatible = "ti,lp8550", },
476 { .compatible = "ti,lp8551", },
477 { .compatible = "ti,lp8552", },
478 { .compatible = "ti,lp8553", },
Milo Kim5812c132013-11-12 15:08:57 -0800479 { .compatible = "ti,lp8555", },
Kim, Milo4add0662013-04-29 16:18:06 -0700480 { .compatible = "ti,lp8556", },
481 { .compatible = "ti,lp8557", },
482 { }
483};
484MODULE_DEVICE_TABLE(of, lp855x_dt_ids);
485
Kim, Milo7be865a2012-03-23 15:02:01 -0700486static const struct i2c_device_id lp855x_ids[] = {
487 {"lp8550", LP8550},
488 {"lp8551", LP8551},
489 {"lp8552", LP8552},
490 {"lp8553", LP8553},
Milo Kim5812c132013-11-12 15:08:57 -0800491 {"lp8555", LP8555},
Kim, Milo7be865a2012-03-23 15:02:01 -0700492 {"lp8556", LP8556},
Kim, Milo26e8ccc2013-02-21 16:44:06 -0800493 {"lp8557", LP8557},
Kim, Milo7be865a2012-03-23 15:02:01 -0700494 { }
495};
496MODULE_DEVICE_TABLE(i2c, lp855x_ids);
497
498static struct i2c_driver lp855x_driver = {
499 .driver = {
500 .name = "lp855x",
Kim, Milo4add0662013-04-29 16:18:06 -0700501 .of_match_table = of_match_ptr(lp855x_dt_ids),
Kim, Milo7be865a2012-03-23 15:02:01 -0700502 },
503 .probe = lp855x_probe,
Bill Pembertond1723fa2012-11-19 13:21:09 -0500504 .remove = lp855x_remove,
Kim, Milo7be865a2012-03-23 15:02:01 -0700505 .id_table = lp855x_ids,
506};
507
508module_i2c_driver(lp855x_driver);
509
510MODULE_DESCRIPTION("Texas Instruments LP855x Backlight driver");
511MODULE_AUTHOR("Milo Kim <milo.kim@ti.com>");
512MODULE_LICENSE("GPL");