[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20231006160437.15627-8-ddrokosov@salutedevices.com>
Date: Fri, 6 Oct 2023 19:04:33 +0300
From: Dmitry Rokosov <ddrokosov@...utedevices.com>
To: <lee@...nel.org>, <pavel@....cz>, <robh+dt@...nel.org>,
<krzysztof.kozlowski+dt@...aro.org>, <conor+dt@...nel.org>,
<andy.shevchenko@...il.com>
CC: <kernel@...rdevices.ru>, <rockosov@...il.com>,
<devicetree@...r.kernel.org>, <linux-kernel@...r.kernel.org>,
<linux-leds@...r.kernel.org>,
George Stark <gnstark@...utedevices.com>,
Dmitry Rokosov <ddrokosov@...utedevices.com>
Subject: [PATCH v1 07/11] leds: aw200xx: add delay after software reset
From: George Stark <gnstark@...utedevices.com>
According to datasheets of aw200xx devices software reset takes at
least 1 ms so add delay after reset before issuing commands to device.
Signed-off-by: George Stark <gnstark@...utedevices.com>
Signed-off-by: Dmitry Rokosov <ddrokosov@...utedevices.com>
---
drivers/leds/leds-aw200xx.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/drivers/leds/leds-aw200xx.c b/drivers/leds/leds-aw200xx.c
index 5b6907eb6299..a1ef0b0a62fc 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 datasheet software reset takes at least 1ms */
+ usleep_range(1000, 2000);
+
regcache_mark_dirty(chip->regmap);
return regmap_write(chip->regmap, AW200XX_REG_FCD, AW200XX_FCD_CLEAR);
}
--
2.36.0
Powered by blists - more mailing lists