mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-10-02 15:18:19 +00:00
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 <gnstark@salutedevices.com> Signed-off-by: Dmitry Rokosov <ddrokosov@salutedevices.com> Link: https://lore.kernel.org/r/20231125200519.1750-7-ddrokosov@salutedevices.com Signed-off-by: Lee Jones <lee@kernel.org>
This commit is contained in:
parent
aa4ed49f42
commit
d883a5ab2f
1 changed files with 3 additions and 0 deletions
|
@ -321,6 +321,9 @@ static int aw200xx_chip_reset(const struct aw200xx *const chip)
|
||||||
if (ret)
|
if (ret)
|
||||||
return ret;
|
return ret;
|
||||||
|
|
||||||
|
/* According to the datasheet software reset takes at least 1ms */
|
||||||
|
fsleep(1000);
|
||||||
|
|
||||||
regcache_mark_dirty(chip->regmap);
|
regcache_mark_dirty(chip->regmap);
|
||||||
return regmap_write(chip->regmap, AW200XX_REG_FCD, AW200XX_FCD_CLEAR);
|
return regmap_write(chip->regmap, AW200XX_REG_FCD, AW200XX_FCD_CLEAR);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue