diff options
Diffstat (limited to 'drivers/leds/leds-lp5523.c')
-rw-r--r-- | drivers/leds/leds-lp5523.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/drivers/leds/leds-lp5523.c b/drivers/leds/leds-lp5523.c index 2fc19bbddb72..cac492b0abf3 100644 --- a/drivers/leds/leds-lp5523.c +++ b/drivers/leds/leds-lp5523.c | |||
@@ -946,6 +946,13 @@ static void lp5523_unregister_leds(struct lp5523_chip *chip) | |||
946 | } | 946 | } |
947 | } | 947 | } |
948 | 948 | ||
949 | static void lp5523_reset_device(struct lp5523_chip *chip) | ||
950 | { | ||
951 | struct i2c_client *client = chip->client; | ||
952 | |||
953 | lp5523_write(client, LP5523_REG_RESET, 0xff); | ||
954 | } | ||
955 | |||
949 | static int lp5523_init_device(struct lp5523_chip *chip) | 956 | static int lp5523_init_device(struct lp5523_chip *chip) |
950 | { | 957 | { |
951 | struct lp5523_platform_data *pdata = chip->pdata; | 958 | struct lp5523_platform_data *pdata = chip->pdata; |
@@ -965,7 +972,8 @@ static int lp5523_init_device(struct lp5523_chip *chip) | |||
965 | usleep_range(1000, 2000); /* 500us abs min. */ | 972 | usleep_range(1000, 2000); /* 500us abs min. */ |
966 | } | 973 | } |
967 | 974 | ||
968 | lp5523_write(client, LP5523_REG_RESET, 0xff); | 975 | lp5523_reset_device(chip); |
976 | |||
969 | usleep_range(10000, 20000); /* | 977 | usleep_range(10000, 20000); /* |
970 | * Exact value is not available. 10 - 20ms | 978 | * Exact value is not available. 10 - 20ms |
971 | * appears to be enough for reset. | 979 | * appears to be enough for reset. |