Commit | Line | Data |
---|---|---|
b1e6b706 SKS |
1 | /* |
2 | * Copyright (C) 2011 ST-Ericsson SA. | |
3 | * Copyright (C) 2009 Motorola, Inc. | |
4 | * | |
5 | * License Terms: GNU General Public License v2 | |
6 | * | |
7 | * Simple driver for National Semiconductor LM3530 Backlight driver chip | |
8 | * | |
9 | * Author: Shreshtha Kumar SAHU <shreshthakumar.sahu@stericsson.com> | |
10 | * based on leds-lm3530.c by Dan Murphy <D.Murphy@motorola.com> | |
11 | */ | |
12 | ||
13 | #include <linux/i2c.h> | |
14 | #include <linux/leds.h> | |
15 | #include <linux/slab.h> | |
16 | #include <linux/platform_device.h> | |
17 | #include <linux/input.h> | |
18 | #include <linux/led-lm3530.h> | |
19 | #include <linux/types.h> | |
9b2da53f | 20 | #include <linux/regulator/consumer.h> |
54f4dedb | 21 | #include <linux/module.h> |
b1e6b706 SKS |
22 | |
23 | #define LM3530_LED_DEV "lcd-backlight" | |
24 | #define LM3530_NAME "lm3530-led" | |
25 | ||
26 | #define LM3530_GEN_CONFIG 0x10 | |
27 | #define LM3530_ALS_CONFIG 0x20 | |
28 | #define LM3530_BRT_RAMP_RATE 0x30 | |
b1e6b706 SKS |
29 | #define LM3530_ALS_IMP_SELECT 0x41 |
30 | #define LM3530_BRT_CTRL_REG 0xA0 | |
31 | #define LM3530_ALS_ZB0_REG 0x60 | |
32 | #define LM3530_ALS_ZB1_REG 0x61 | |
33 | #define LM3530_ALS_ZB2_REG 0x62 | |
34 | #define LM3530_ALS_ZB3_REG 0x63 | |
35 | #define LM3530_ALS_Z0T_REG 0x70 | |
36 | #define LM3530_ALS_Z1T_REG 0x71 | |
37 | #define LM3530_ALS_Z2T_REG 0x72 | |
38 | #define LM3530_ALS_Z3T_REG 0x73 | |
39 | #define LM3530_ALS_Z4T_REG 0x74 | |
8544d0e3 | 40 | #define LM3530_REG_MAX 14 |
b1e6b706 SKS |
41 | |
42 | /* General Control Register */ | |
43 | #define LM3530_EN_I2C_SHIFT (0) | |
44 | #define LM3530_RAMP_LAW_SHIFT (1) | |
45 | #define LM3530_MAX_CURR_SHIFT (2) | |
46 | #define LM3530_EN_PWM_SHIFT (5) | |
47 | #define LM3530_PWM_POL_SHIFT (6) | |
48 | #define LM3530_EN_PWM_SIMPLE_SHIFT (7) | |
49 | ||
50 | #define LM3530_ENABLE_I2C (1 << LM3530_EN_I2C_SHIFT) | |
51 | #define LM3530_ENABLE_PWM (1 << LM3530_EN_PWM_SHIFT) | |
52 | #define LM3530_POL_LOW (1 << LM3530_PWM_POL_SHIFT) | |
53 | #define LM3530_ENABLE_PWM_SIMPLE (1 << LM3530_EN_PWM_SIMPLE_SHIFT) | |
54 | ||
55 | /* ALS Config Register Options */ | |
56 | #define LM3530_ALS_AVG_TIME_SHIFT (0) | |
57 | #define LM3530_EN_ALS_SHIFT (3) | |
58 | #define LM3530_ALS_SEL_SHIFT (5) | |
59 | ||
60 | #define LM3530_ENABLE_ALS (3 << LM3530_EN_ALS_SHIFT) | |
61 | ||
62 | /* Brightness Ramp Rate Register */ | |
63 | #define LM3530_BRT_RAMP_FALL_SHIFT (0) | |
64 | #define LM3530_BRT_RAMP_RISE_SHIFT (3) | |
65 | ||
66 | /* ALS Resistor Select */ | |
67 | #define LM3530_ALS1_IMP_SHIFT (0) | |
68 | #define LM3530_ALS2_IMP_SHIFT (4) | |
69 | ||
70 | /* Zone Boundary Register defaults */ | |
40b1445b SKS |
71 | #define LM3530_ALS_ZB_MAX (4) |
72 | #define LM3530_ALS_WINDOW_mV (1000) | |
73 | #define LM3530_ALS_OFFSET_mV (4) | |
b1e6b706 SKS |
74 | |
75 | /* Zone Target Register defaults */ | |
40b1445b SKS |
76 | #define LM3530_DEF_ZT_0 (0x7F) |
77 | #define LM3530_DEF_ZT_1 (0x66) | |
b1e6b706 | 78 | #define LM3530_DEF_ZT_2 (0x4C) |
40b1445b SKS |
79 | #define LM3530_DEF_ZT_3 (0x33) |
80 | #define LM3530_DEF_ZT_4 (0x19) | |
b1e6b706 | 81 | |
bbe64532 KM |
82 | /* 7 bits are used for the brightness : LM3530_BRT_CTRL_REG */ |
83 | #define MAX_BRIGHTNESS (127) | |
84 | ||
b1e6b706 SKS |
85 | struct lm3530_mode_map { |
86 | const char *mode; | |
87 | enum lm3530_mode mode_val; | |
88 | }; | |
89 | ||
90 | static struct lm3530_mode_map mode_map[] = { | |
91 | { "man", LM3530_BL_MODE_MANUAL }, | |
92 | { "als", LM3530_BL_MODE_ALS }, | |
93 | { "pwm", LM3530_BL_MODE_PWM }, | |
94 | }; | |
95 | ||
96 | /** | |
97 | * struct lm3530_data | |
98 | * @led_dev: led class device | |
99 | * @client: i2c client | |
100 | * @pdata: LM3530 platform data | |
101 | * @mode: mode of operation - manual, ALS, PWM | |
9b2da53f SKS |
102 | * @regulator: regulator |
103 | * @brighness: previous brightness value | |
104 | * @enable: regulator is enabled | |
b1e6b706 SKS |
105 | */ |
106 | struct lm3530_data { | |
107 | struct led_classdev led_dev; | |
108 | struct i2c_client *client; | |
109 | struct lm3530_platform_data *pdata; | |
110 | enum lm3530_mode mode; | |
9b2da53f SKS |
111 | struct regulator *regulator; |
112 | enum led_brightness brightness; | |
113 | bool enable; | |
b1e6b706 SKS |
114 | }; |
115 | ||
116 | static const u8 lm3530_reg[LM3530_REG_MAX] = { | |
117 | LM3530_GEN_CONFIG, | |
118 | LM3530_ALS_CONFIG, | |
119 | LM3530_BRT_RAMP_RATE, | |
b1e6b706 SKS |
120 | LM3530_ALS_IMP_SELECT, |
121 | LM3530_BRT_CTRL_REG, | |
122 | LM3530_ALS_ZB0_REG, | |
123 | LM3530_ALS_ZB1_REG, | |
124 | LM3530_ALS_ZB2_REG, | |
125 | LM3530_ALS_ZB3_REG, | |
126 | LM3530_ALS_Z0T_REG, | |
127 | LM3530_ALS_Z1T_REG, | |
128 | LM3530_ALS_Z2T_REG, | |
129 | LM3530_ALS_Z3T_REG, | |
130 | LM3530_ALS_Z4T_REG, | |
131 | }; | |
132 | ||
133 | static int lm3530_get_mode_from_str(const char *str) | |
134 | { | |
135 | int i; | |
136 | ||
137 | for (i = 0; i < ARRAY_SIZE(mode_map); i++) | |
138 | if (sysfs_streq(str, mode_map[i].mode)) | |
139 | return mode_map[i].mode_val; | |
140 | ||
141 | return -1; | |
142 | } | |
143 | ||
144 | static int lm3530_init_registers(struct lm3530_data *drvdata) | |
145 | { | |
146 | int ret = 0; | |
147 | int i; | |
148 | u8 gen_config; | |
149 | u8 als_config = 0; | |
150 | u8 brt_ramp; | |
151 | u8 als_imp_sel = 0; | |
152 | u8 brightness; | |
153 | u8 reg_val[LM3530_REG_MAX]; | |
40b1445b SKS |
154 | u8 zones[LM3530_ALS_ZB_MAX]; |
155 | u32 als_vmin, als_vmax, als_vstep; | |
b1e6b706 SKS |
156 | struct lm3530_platform_data *pltfm = drvdata->pdata; |
157 | struct i2c_client *client = drvdata->client; | |
bb982009 | 158 | struct lm3530_pwm_data *pwm = &pltfm->pwm_data; |
b1e6b706 SKS |
159 | |
160 | gen_config = (pltfm->brt_ramp_law << LM3530_RAMP_LAW_SHIFT) | | |
161 | ((pltfm->max_current & 7) << LM3530_MAX_CURR_SHIFT); | |
162 | ||
163 | if (drvdata->mode == LM3530_BL_MODE_MANUAL || | |
164 | drvdata->mode == LM3530_BL_MODE_ALS) | |
165 | gen_config |= (LM3530_ENABLE_I2C); | |
166 | ||
167 | if (drvdata->mode == LM3530_BL_MODE_ALS) { | |
40b1445b | 168 | if (pltfm->als_vmax == 0) { |
ec44fd42 AL |
169 | pltfm->als_vmin = 0; |
170 | pltfm->als_vmax = LM3530_ALS_WINDOW_mV; | |
40b1445b SKS |
171 | } |
172 | ||
173 | als_vmin = pltfm->als_vmin; | |
174 | als_vmax = pltfm->als_vmax; | |
175 | ||
176 | if ((als_vmax - als_vmin) > LM3530_ALS_WINDOW_mV) | |
177 | pltfm->als_vmax = als_vmax = | |
178 | als_vmin + LM3530_ALS_WINDOW_mV; | |
179 | ||
180 | /* n zone boundary makes n+1 zones */ | |
181 | als_vstep = (als_vmax - als_vmin) / (LM3530_ALS_ZB_MAX + 1); | |
182 | ||
183 | for (i = 0; i < LM3530_ALS_ZB_MAX; i++) | |
184 | zones[i] = (((als_vmin + LM3530_ALS_OFFSET_mV) + | |
185 | als_vstep + (i * als_vstep)) * LED_FULL) | |
186 | / 1000; | |
187 | ||
b1e6b706 SKS |
188 | als_config = |
189 | (pltfm->als_avrg_time << LM3530_ALS_AVG_TIME_SHIFT) | | |
190 | (LM3530_ENABLE_ALS) | | |
191 | (pltfm->als_input_mode << LM3530_ALS_SEL_SHIFT); | |
192 | ||
193 | als_imp_sel = | |
194 | (pltfm->als1_resistor_sel << LM3530_ALS1_IMP_SHIFT) | | |
195 | (pltfm->als2_resistor_sel << LM3530_ALS2_IMP_SHIFT); | |
40b1445b | 196 | |
b1e6b706 SKS |
197 | } |
198 | ||
199 | if (drvdata->mode == LM3530_BL_MODE_PWM) | |
200 | gen_config |= (LM3530_ENABLE_PWM) | | |
201 | (pltfm->pwm_pol_hi << LM3530_PWM_POL_SHIFT) | | |
202 | (LM3530_ENABLE_PWM_SIMPLE); | |
203 | ||
204 | brt_ramp = (pltfm->brt_ramp_fall << LM3530_BRT_RAMP_FALL_SHIFT) | | |
205 | (pltfm->brt_ramp_rise << LM3530_BRT_RAMP_RISE_SHIFT); | |
206 | ||
9b2da53f SKS |
207 | if (drvdata->brightness) |
208 | brightness = drvdata->brightness; | |
209 | else | |
210 | brightness = drvdata->brightness = pltfm->brt_val; | |
b1e6b706 | 211 | |
bbe64532 KM |
212 | if (brightness > drvdata->led_dev.max_brightness) |
213 | brightness = drvdata->led_dev.max_brightness; | |
214 | ||
b1e6b706 SKS |
215 | reg_val[0] = gen_config; /* LM3530_GEN_CONFIG */ |
216 | reg_val[1] = als_config; /* LM3530_ALS_CONFIG */ | |
217 | reg_val[2] = brt_ramp; /* LM3530_BRT_RAMP_RATE */ | |
8544d0e3 KM |
218 | reg_val[3] = als_imp_sel; /* LM3530_ALS_IMP_SELECT */ |
219 | reg_val[4] = brightness; /* LM3530_BRT_CTRL_REG */ | |
220 | reg_val[5] = zones[0]; /* LM3530_ALS_ZB0_REG */ | |
221 | reg_val[6] = zones[1]; /* LM3530_ALS_ZB1_REG */ | |
222 | reg_val[7] = zones[2]; /* LM3530_ALS_ZB2_REG */ | |
223 | reg_val[8] = zones[3]; /* LM3530_ALS_ZB3_REG */ | |
224 | reg_val[9] = LM3530_DEF_ZT_0; /* LM3530_ALS_Z0T_REG */ | |
225 | reg_val[10] = LM3530_DEF_ZT_1; /* LM3530_ALS_Z1T_REG */ | |
226 | reg_val[11] = LM3530_DEF_ZT_2; /* LM3530_ALS_Z2T_REG */ | |
227 | reg_val[12] = LM3530_DEF_ZT_3; /* LM3530_ALS_Z3T_REG */ | |
228 | reg_val[13] = LM3530_DEF_ZT_4; /* LM3530_ALS_Z4T_REG */ | |
b1e6b706 | 229 | |
9b2da53f SKS |
230 | if (!drvdata->enable) { |
231 | ret = regulator_enable(drvdata->regulator); | |
232 | if (ret) { | |
233 | dev_err(&drvdata->client->dev, | |
234 | "Enable regulator failed\n"); | |
235 | return ret; | |
236 | } | |
237 | drvdata->enable = true; | |
238 | } | |
239 | ||
b1e6b706 | 240 | for (i = 0; i < LM3530_REG_MAX; i++) { |
bb982009 KM |
241 | /* do not update brightness register when pwm mode */ |
242 | if (lm3530_reg[i] == LM3530_BRT_CTRL_REG && | |
243 | drvdata->mode == LM3530_BL_MODE_PWM) { | |
244 | if (pwm->pwm_set_intensity) | |
245 | pwm->pwm_set_intensity(reg_val[i], | |
246 | drvdata->led_dev.max_brightness); | |
247 | continue; | |
248 | } | |
249 | ||
b1e6b706 SKS |
250 | ret = i2c_smbus_write_byte_data(client, |
251 | lm3530_reg[i], reg_val[i]); | |
252 | if (ret) | |
253 | break; | |
254 | } | |
255 | ||
256 | return ret; | |
257 | } | |
258 | ||
259 | static void lm3530_brightness_set(struct led_classdev *led_cdev, | |
260 | enum led_brightness brt_val) | |
261 | { | |
262 | int err; | |
263 | struct lm3530_data *drvdata = | |
264 | container_of(led_cdev, struct lm3530_data, led_dev); | |
bb982009 KM |
265 | struct lm3530_platform_data *pdata = drvdata->pdata; |
266 | struct lm3530_pwm_data *pwm = &pdata->pwm_data; | |
267 | u8 max_brightness = led_cdev->max_brightness; | |
b1e6b706 SKS |
268 | |
269 | switch (drvdata->mode) { | |
270 | case LM3530_BL_MODE_MANUAL: | |
271 | ||
9b2da53f SKS |
272 | if (!drvdata->enable) { |
273 | err = lm3530_init_registers(drvdata); | |
274 | if (err) { | |
275 | dev_err(&drvdata->client->dev, | |
276 | "Register Init failed: %d\n", err); | |
277 | break; | |
278 | } | |
279 | } | |
280 | ||
b1e6b706 SKS |
281 | /* set the brightness in brightness control register*/ |
282 | err = i2c_smbus_write_byte_data(drvdata->client, | |
bbe64532 | 283 | LM3530_BRT_CTRL_REG, brt_val); |
b1e6b706 SKS |
284 | if (err) |
285 | dev_err(&drvdata->client->dev, | |
286 | "Unable to set brightness: %d\n", err); | |
9b2da53f | 287 | else |
bbe64532 | 288 | drvdata->brightness = brt_val; |
9b2da53f SKS |
289 | |
290 | if (brt_val == 0) { | |
291 | err = regulator_disable(drvdata->regulator); | |
292 | if (err) | |
293 | dev_err(&drvdata->client->dev, | |
294 | "Disable regulator failed\n"); | |
295 | drvdata->enable = false; | |
296 | } | |
b1e6b706 SKS |
297 | break; |
298 | case LM3530_BL_MODE_ALS: | |
299 | break; | |
300 | case LM3530_BL_MODE_PWM: | |
bb982009 KM |
301 | if (pwm->pwm_set_intensity) |
302 | pwm->pwm_set_intensity(brt_val, max_brightness); | |
b1e6b706 SKS |
303 | break; |
304 | default: | |
305 | break; | |
306 | } | |
307 | } | |
308 | ||
40b1445b SKS |
309 | static ssize_t lm3530_mode_get(struct device *dev, |
310 | struct device_attribute *attr, char *buf) | |
311 | { | |
e13d9786 KM |
312 | struct led_classdev *led_cdev = dev_get_drvdata(dev); |
313 | struct lm3530_data *drvdata; | |
40b1445b SKS |
314 | int i, len = 0; |
315 | ||
e13d9786 | 316 | drvdata = container_of(led_cdev, struct lm3530_data, led_dev); |
40b1445b SKS |
317 | for (i = 0; i < ARRAY_SIZE(mode_map); i++) |
318 | if (drvdata->mode == mode_map[i].mode_val) | |
319 | len += sprintf(buf + len, "[%s] ", mode_map[i].mode); | |
320 | else | |
321 | len += sprintf(buf + len, "%s ", mode_map[i].mode); | |
322 | ||
323 | len += sprintf(buf + len, "\n"); | |
324 | ||
325 | return len; | |
326 | } | |
b1e6b706 SKS |
327 | |
328 | static ssize_t lm3530_mode_set(struct device *dev, struct device_attribute | |
329 | *attr, const char *buf, size_t size) | |
330 | { | |
e13d9786 KM |
331 | struct led_classdev *led_cdev = dev_get_drvdata(dev); |
332 | struct lm3530_data *drvdata; | |
bb982009 KM |
333 | struct lm3530_pwm_data *pwm; |
334 | u8 max_brightness; | |
e13d9786 | 335 | int mode, err; |
b1e6b706 | 336 | |
e13d9786 | 337 | drvdata = container_of(led_cdev, struct lm3530_data, led_dev); |
bb982009 KM |
338 | pwm = &drvdata->pdata->pwm_data; |
339 | max_brightness = led_cdev->max_brightness; | |
b1e6b706 SKS |
340 | mode = lm3530_get_mode_from_str(buf); |
341 | if (mode < 0) { | |
342 | dev_err(dev, "Invalid mode\n"); | |
343 | return -EINVAL; | |
344 | } | |
345 | ||
bb982009 KM |
346 | drvdata->mode = mode; |
347 | ||
348 | /* set pwm to low if unnecessary */ | |
349 | if (mode != LM3530_BL_MODE_PWM && pwm->pwm_set_intensity) | |
350 | pwm->pwm_set_intensity(0, max_brightness); | |
b1e6b706 SKS |
351 | |
352 | err = lm3530_init_registers(drvdata); | |
353 | if (err) { | |
354 | dev_err(dev, "Setting %s Mode failed :%d\n", buf, err); | |
355 | return err; | |
356 | } | |
357 | ||
358 | return sizeof(drvdata->mode); | |
359 | } | |
40b1445b | 360 | static DEVICE_ATTR(mode, 0644, lm3530_mode_get, lm3530_mode_set); |
b1e6b706 SKS |
361 | |
362 | static int __devinit lm3530_probe(struct i2c_client *client, | |
363 | const struct i2c_device_id *id) | |
364 | { | |
365 | struct lm3530_platform_data *pdata = client->dev.platform_data; | |
366 | struct lm3530_data *drvdata; | |
367 | int err = 0; | |
368 | ||
369 | if (pdata == NULL) { | |
370 | dev_err(&client->dev, "platform data required\n"); | |
371 | err = -ENODEV; | |
372 | goto err_out; | |
373 | } | |
374 | ||
375 | /* BL mode */ | |
376 | if (pdata->mode > LM3530_BL_MODE_PWM) { | |
377 | dev_err(&client->dev, "Illegal Mode request\n"); | |
378 | err = -EINVAL; | |
379 | goto err_out; | |
380 | } | |
381 | ||
382 | if (!i2c_check_functionality(client->adapter, I2C_FUNC_I2C)) { | |
383 | dev_err(&client->dev, "I2C_FUNC_I2C not supported\n"); | |
384 | err = -EIO; | |
385 | goto err_out; | |
386 | } | |
387 | ||
388 | drvdata = kzalloc(sizeof(struct lm3530_data), GFP_KERNEL); | |
389 | if (drvdata == NULL) { | |
390 | err = -ENOMEM; | |
391 | goto err_out; | |
392 | } | |
393 | ||
394 | drvdata->mode = pdata->mode; | |
395 | drvdata->client = client; | |
396 | drvdata->pdata = pdata; | |
9b2da53f SKS |
397 | drvdata->brightness = LED_OFF; |
398 | drvdata->enable = false; | |
b1e6b706 SKS |
399 | drvdata->led_dev.name = LM3530_LED_DEV; |
400 | drvdata->led_dev.brightness_set = lm3530_brightness_set; | |
bbe64532 | 401 | drvdata->led_dev.max_brightness = MAX_BRIGHTNESS; |
b1e6b706 SKS |
402 | |
403 | i2c_set_clientdata(client, drvdata); | |
404 | ||
9b2da53f SKS |
405 | drvdata->regulator = regulator_get(&client->dev, "vin"); |
406 | if (IS_ERR(drvdata->regulator)) { | |
407 | dev_err(&client->dev, "regulator get failed\n"); | |
408 | err = PTR_ERR(drvdata->regulator); | |
409 | drvdata->regulator = NULL; | |
410 | goto err_regulator_get; | |
b1e6b706 SKS |
411 | } |
412 | ||
9b2da53f SKS |
413 | if (drvdata->pdata->brt_val) { |
414 | err = lm3530_init_registers(drvdata); | |
415 | if (err < 0) { | |
416 | dev_err(&client->dev, | |
417 | "Register Init failed: %d\n", err); | |
418 | err = -ENODEV; | |
419 | goto err_reg_init; | |
420 | } | |
421 | } | |
422 | err = led_classdev_register(&client->dev, &drvdata->led_dev); | |
b1e6b706 SKS |
423 | if (err < 0) { |
424 | dev_err(&client->dev, "Register led class failed: %d\n", err); | |
425 | err = -ENODEV; | |
426 | goto err_class_register; | |
427 | } | |
428 | ||
429 | err = device_create_file(drvdata->led_dev.dev, &dev_attr_mode); | |
430 | if (err < 0) { | |
431 | dev_err(&client->dev, "File device creation failed: %d\n", err); | |
432 | err = -ENODEV; | |
433 | goto err_create_file; | |
434 | } | |
435 | ||
436 | return 0; | |
437 | ||
438 | err_create_file: | |
439 | led_classdev_unregister(&drvdata->led_dev); | |
440 | err_class_register: | |
441 | err_reg_init: | |
9b2da53f SKS |
442 | regulator_put(drvdata->regulator); |
443 | err_regulator_get: | |
b1e6b706 SKS |
444 | kfree(drvdata); |
445 | err_out: | |
446 | return err; | |
447 | } | |
448 | ||
449 | static int __devexit lm3530_remove(struct i2c_client *client) | |
450 | { | |
451 | struct lm3530_data *drvdata = i2c_get_clientdata(client); | |
452 | ||
453 | device_remove_file(drvdata->led_dev.dev, &dev_attr_mode); | |
9b2da53f SKS |
454 | |
455 | if (drvdata->enable) | |
456 | regulator_disable(drvdata->regulator); | |
457 | regulator_put(drvdata->regulator); | |
b1e6b706 SKS |
458 | led_classdev_unregister(&drvdata->led_dev); |
459 | kfree(drvdata); | |
460 | return 0; | |
461 | } | |
462 | ||
463 | static const struct i2c_device_id lm3530_id[] = { | |
464 | {LM3530_NAME, 0}, | |
465 | {} | |
466 | }; | |
d5f33d45 | 467 | MODULE_DEVICE_TABLE(i2c, lm3530_id); |
b1e6b706 SKS |
468 | |
469 | static struct i2c_driver lm3530_i2c_driver = { | |
470 | .probe = lm3530_probe, | |
93f53982 | 471 | .remove = __devexit_p(lm3530_remove), |
b1e6b706 SKS |
472 | .id_table = lm3530_id, |
473 | .driver = { | |
474 | .name = LM3530_NAME, | |
475 | .owner = THIS_MODULE, | |
476 | }, | |
477 | }; | |
478 | ||
09a0d183 | 479 | module_i2c_driver(lm3530_i2c_driver); |
b1e6b706 SKS |
480 | |
481 | MODULE_DESCRIPTION("Back Light driver for LM3530"); | |
482 | MODULE_LICENSE("GPL v2"); | |
483 | MODULE_AUTHOR("Shreshtha Kumar SAHU <shreshthakumar.sahu@stericsson.com>"); |