Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 358592
b: refs/heads/master
c: 86eb774
h: refs/heads/master
v: v3
  • Loading branch information
Milo(Woogyom) Kim authored and Bryan Wu committed Feb 6, 2013
1 parent 4d67324 commit c3802a4
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 3 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 1904f83d568dba794be9de1311bafb5a4424812a
refs/heads/master: 86eb7748cef00faa3eaefc8fc450ed30281a09e7
10 changes: 9 additions & 1 deletion trunk/drivers/leds/leds-lp5521.c
Original file line number Diff line number Diff line change
Expand Up @@ -687,6 +687,13 @@ static void lp5521_unregister_sysfs(struct i2c_client *client)
&lp5521_led_attribute_group);
}

static void lp5521_reset_device(struct lp5521_chip *chip)
{
struct i2c_client *client = chip->client;

lp5521_write(client, LP5521_REG_RESET, 0xff);
}

static int lp5521_init_device(struct lp5521_chip *chip)
{
struct lp5521_platform_data *pdata = chip->pdata;
Expand All @@ -707,7 +714,8 @@ static int lp5521_init_device(struct lp5521_chip *chip)
usleep_range(1000, 2000); /* 500us abs min. */
}

lp5521_write(client, LP5521_REG_RESET, 0xff);
lp5521_reset_device(chip);

usleep_range(10000, 20000); /*
* Exact value is not available. 10 - 20ms
* appears to be enough for reset.
Expand Down
10 changes: 9 additions & 1 deletion trunk/drivers/leds/leds-lp5523.c
Original file line number Diff line number Diff line change
Expand Up @@ -946,6 +946,13 @@ static void lp5523_unregister_leds(struct lp5523_chip *chip)
}
}

static void lp5523_reset_device(struct lp5523_chip *chip)
{
struct i2c_client *client = chip->client;

lp5523_write(client, LP5523_REG_RESET, 0xff);
}

static int lp5523_init_device(struct lp5523_chip *chip)
{
struct lp5523_platform_data *pdata = chip->pdata;
Expand All @@ -965,7 +972,8 @@ static int lp5523_init_device(struct lp5523_chip *chip)
usleep_range(1000, 2000); /* 500us abs min. */
}

lp5523_write(client, LP5523_REG_RESET, 0xff);
lp5523_reset_device(chip);

usleep_range(10000, 20000); /*
* Exact value is not available. 10 - 20ms
* appears to be enough for reset.
Expand Down

0 comments on commit c3802a4

Please sign in to comment.