diff options
Diffstat (limited to 'drivers/video')
-rw-r--r-- | drivers/video/backlight/da903x_bl.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/drivers/video/backlight/da903x_bl.c b/drivers/video/backlight/da903x_bl.c index 701a1081e199..7fcb0eb54c60 100644 --- a/drivers/video/backlight/da903x_bl.c +++ b/drivers/video/backlight/da903x_bl.c | |||
@@ -25,6 +25,7 @@ | |||
25 | 25 | ||
26 | #define DA9034_WLED_CONTROL1 0x3C | 26 | #define DA9034_WLED_CONTROL1 0x3C |
27 | #define DA9034_WLED_CONTROL2 0x3D | 27 | #define DA9034_WLED_CONTROL2 0x3D |
28 | #define DA9034_WLED_ISET(x) ((x) & 0x1f) | ||
28 | 29 | ||
29 | #define DA9034_WLED_BOOST_EN (1 << 5) | 30 | #define DA9034_WLED_BOOST_EN (1 << 5) |
30 | 31 | ||
@@ -101,6 +102,7 @@ static struct backlight_ops da903x_backlight_ops = { | |||
101 | 102 | ||
102 | static int da903x_backlight_probe(struct platform_device *pdev) | 103 | static int da903x_backlight_probe(struct platform_device *pdev) |
103 | { | 104 | { |
105 | struct da9034_backlight_pdata *pdata = pdev->dev.platform_data; | ||
104 | struct da903x_backlight_data *data; | 106 | struct da903x_backlight_data *data; |
105 | struct backlight_device *bl; | 107 | struct backlight_device *bl; |
106 | int max_brightness; | 108 | int max_brightness; |
@@ -127,6 +129,11 @@ static int da903x_backlight_probe(struct platform_device *pdev) | |||
127 | data->da903x_dev = pdev->dev.parent; | 129 | data->da903x_dev = pdev->dev.parent; |
128 | data->current_brightness = 0; | 130 | data->current_brightness = 0; |
129 | 131 | ||
132 | /* adjust the WLED output current */ | ||
133 | if (pdata) | ||
134 | da903x_write(data->da903x_dev, DA9034_WLED_CONTROL2, | ||
135 | DA9034_WLED_ISET(pdata->output_current)); | ||
136 | |||
130 | bl = backlight_device_register(pdev->name, data->da903x_dev, | 137 | bl = backlight_device_register(pdev->name, data->da903x_dev, |
131 | data, &da903x_backlight_ops); | 138 | data, &da903x_backlight_ops); |
132 | if (IS_ERR(bl)) { | 139 | if (IS_ERR(bl)) { |