[PATCH 5/6] ASoC: aw88399: fix the expected value printed in aw_dev_check_sysst() error

From: Marco Giunta

Date: Thu Nov 26 2026 - 16:29:18 EST


aw_dev_check_sysst() selects the expected system status in check_val
depending on whether the noise gate is enabled
(AW88399_BIT_SYSST_SWS_CHECK vs AW88399_BIT_SYSST_NOSWS_CHECK),
and furthermore removes the boost-finished bit from check_val if an
external power supply is used. The value read from the SYSST register
is then compared against check_val, and the function returns an error if
they don't match.

The error message, however, always prints AW88399_BIT_SYSST_NOSWS_CHECK
as the expected value instead of check_val, so the log is wrong whenever
the two differ.

Fix this discrepancy by printing check_val.

Fixes: 8ade6cc7e261 ("ASoC: codecs: Add aw88399 amplifier driver")
Signed-off-by: Marco Giunta <marco_giunta@xxxxxxxxxx>
---
sound/soc/codecs/aw88399-lib.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sound/soc/codecs/aw88399-lib.c b/sound/soc/codecs/aw88399-lib.c
index 20e809035107..6a8dbd27676a 100644
--- a/sound/soc/codecs/aw88399-lib.c
+++ b/sound/soc/codecs/aw88399-lib.c
@@ -202,7 +202,7 @@ static int aw_dev_check_sysst(struct aw_device *aw_dev)

if ((reg_val & (~AW88399_BIT_SYSST_CHECK_MASK) & check_val) != check_val) {
dev_err(aw_dev->dev, "check sysst fail, cnt=%d, reg_val=0x%04x, check:0x%x",
- i, reg_val, AW88399_BIT_SYSST_NOSWS_CHECK);
+ i, reg_val, check_val);
usleep_range(AW88399_2000_US, AW88399_2000_US + 10);
} else {
return 0;
--
2.56.1