Skip to content

Commit d883a5a

Browse files
geo-starklag-linaro
authored andcommitted
leds: aw200xx: Add delay after software reset
According to the datasheets of AW200xx devices, the software reset takes at least 1ms. Therefore, it is required to add a delay after the reset before issuing commands to the device. Signed-off-by: George Stark <[email protected]> Signed-off-by: Dmitry Rokosov <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Lee Jones <[email protected]>
1 parent aa4ed49 commit d883a5a

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

drivers/leds/leds-aw200xx.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -321,6 +321,9 @@ static int aw200xx_chip_reset(const struct aw200xx *const chip)
321321
if (ret)
322322
return ret;
323323

324+
/* According to the datasheet software reset takes at least 1ms */
325+
fsleep(1000);
326+
324327
regcache_mark_dirty(chip->regmap);
325328
return regmap_write(chip->regmap, AW200XX_REG_FCD, AW200XX_FCD_CLEAR);
326329
}

0 commit comments

Comments
 (0)