Commit d883a5ab authored by George Stark's avatar George Stark Committed by Lee Jones

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: default avatarGeorge Stark <gnstark@salutedevices.com>
Signed-off-by: default avatarDmitry Rokosov <ddrokosov@salutedevices.com>
Link: https://lore.kernel.org/r/20231125200519.1750-7-ddrokosov@salutedevices.comSigned-off-by: default avatarLee Jones <lee@kernel.org>
parent aa4ed49f
......@@ -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);
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment