git: 69d202f22400 - main - rk3328_codec: bump delays in set_power and set_mute

From: Andriy Gapon <avg_at_FreeBSD.org>
Date: Sat, 06 Nov 2021 17:52:22 UTC
The branch main has been updated by avg:

URL: https://cgit.FreeBSD.org/src/commit/?id=69d202f22400c5b64331fbbcd37b66df8d265c64

commit 69d202f22400c5b64331fbbcd37b66df8d265c64
Author:     Andriy Gapon <avg@FreeBSD.org>
AuthorDate: 2021-06-09 08:58:42 +0000
Commit:     Andriy Gapon <avg@FreeBSD.org>
CommitDate: 2021-11-06 17:51:44 +0000

    rk3328_codec: bump delays in set_power and set_mute
    
    According to Linux they should be 10 ms, not 10 us.
    Also, add a read before the second write in set_power.
    
    MFC after:      1 month
---
 sys/arm64/rockchip/rk3328_codec.c | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/sys/arm64/rockchip/rk3328_codec.c b/sys/arm64/rockchip/rk3328_codec.c
index c2ffe1e8089f..22f36389e1c6 100644
--- a/sys/arm64/rockchip/rk3328_codec.c
+++ b/sys/arm64/rockchip/rk3328_codec.c
@@ -178,7 +178,10 @@ rkcodec_set_power(struct rkcodec_softc *sc, bool poweron)
 	else
 		val &= ~(DAC_PRECHARGE_CTRL_DAC_CHARGE_PRECHARGE);
 	RKCODEC_WRITE(sc, CODEC_DAC_PRECHARGE_CTRL, val);
-	DELAY(10);
+
+	DELAY(10000);
+
+	val = RKCODEC_READ(sc, CODEC_DAC_PRECHARGE_CTRL);
 	if (poweron)
 		val |= DAC_PRECHARGE_CTRL_DAC_CHARGE_CURRENT_ALL;
 	else
@@ -202,7 +205,7 @@ rkcodec_reset(struct rkcodec_softc *sc)
 {
 
 	RKCODEC_WRITE(sc, CODEC_RESET, 0);
-	DELAY(10);
+	DELAY(10000);
 	RKCODEC_WRITE(sc, CODEC_RESET, RESET_DIG_CORE_RST | RESET_SYS_RST);
 }