aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGeorge Stark <[email protected]>2023-11-25 23:05:14 +0300
committerLee Jones <[email protected]>2023-12-13 11:28:58 +0000
commitd883a5ab2f345c2adca781901731795ab94886fb (patch)
tree5a5148b736986a33359c37dd373d051f11990c87
parentaa4ed49f42400b503690fd3184d93eee0d765a88 (diff)
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]>
-rw-r--r--drivers/leds/leds-aw200xx.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/leds/leds-aw200xx.c b/drivers/leds/leds-aw200xx.c
index 1756b012a0b7..d4877722eb56 100644
--- a/drivers/leds/leds-aw200xx.c
+++ b/drivers/leds/leds-aw200xx.c
@@ -321,6 +321,9 @@ static int aw200xx_chip_reset(const struct aw200xx *const chip)
if (ret)
return ret;
+ /* According to the datasheet software reset takes at least 1ms */
+ fsleep(1000);
+
regcache_mark_dirty(chip->regmap);
return regmap_write(chip->regmap, AW200XX_REG_FCD, AW200XX_FCD_CLEAR);
}