Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 172562
b: refs/heads/master
c: b3a8549
h: refs/heads/master
v: v3
  • Loading branch information
Haojian Zhuang authored and Eric Miao committed Dec 1, 2009
1 parent faab24b commit 9cb6d8c
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: f64dcac0b1247842db2530959cbe3df1cb1947c4
refs/heads/master: b3a8549593696f5f3efcdbf280e2c8e0fe894855
7 changes: 7 additions & 0 deletions trunk/drivers/video/backlight/da903x_bl.c
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@

#define DA9034_WLED_CONTROL1 0x3C
#define DA9034_WLED_CONTROL2 0x3D
#define DA9034_WLED_ISET(x) ((x) & 0x1f)

#define DA9034_WLED_BOOST_EN (1 << 5)

Expand Down Expand Up @@ -101,6 +102,7 @@ static struct backlight_ops da903x_backlight_ops = {

static int da903x_backlight_probe(struct platform_device *pdev)
{
struct da9034_backlight_pdata *pdata = pdev->dev.platform_data;
struct da903x_backlight_data *data;
struct backlight_device *bl;
int max_brightness;
Expand All @@ -127,6 +129,11 @@ static int da903x_backlight_probe(struct platform_device *pdev)
data->da903x_dev = pdev->dev.parent;
data->current_brightness = 0;

/* adjust the WLED output current */
if (pdata)
da903x_write(data->da903x_dev, DA9034_WLED_CONTROL2,
DA9034_WLED_ISET(pdata->output_current));

bl = backlight_device_register(pdev->name, data->da903x_dev,
data, &da903x_backlight_ops);
if (IS_ERR(bl)) {
Expand Down
4 changes: 4 additions & 0 deletions trunk/include/linux/mfd/da903x.h
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,10 @@ struct da9034_touch_pdata {
int y_inverted;
};

struct da9034_backlight_pdata {
int output_current; /* output current of WLED, from 0-31 (in mA) */
};

/* DA9030 battery charger data */
struct power_supply_info;

Expand Down

0 comments on commit 9cb6d8c

Please sign in to comment.