* [PATCH 0/2] ASoC: fsl_sai: Improve error handling
@ 2026-11-10 7:58 phucduc.bui
2026-11-10 7:58 ` [PATCH 1/2] ASoC: fsl_sai: Make fsl_sai_reset_hw() return void phucduc.bui
2026-11-10 7:58 ` [PATCH 2/2] ASoC: fsl_sai: Report dataline configuration read errors phucduc.bui
0 siblings, 2 replies; 3+ messages in thread
From: phucduc.bui @ 2026-11-10 7:58 UTC (permalink / raw)
To: Shengjiu Wang, Shengjiu Wang, Xiubo Li, Fabio Estevam,
Nicolin Chen, Mark Brown
Cc: Liam Girdwood, Jaroslav Kysela, Takashi Iwai, linuxppc-dev,
linux-sound, linux-kernel, bui duc phuc
From: bui duc phuc <phucduc.bui@gmail.com>
Hi all,
This series includes two follow-up changes for the FSL SAI driver,
covering hardware reset handling and dataline configuration
error reporting.
Complie-tested only.
Best regards,
Phuc
bui duc phuc (2):
ASoC: fsl_sai: Make fsl_sai_reset_hw() return void
ASoC: fsl_sai: Report dataline configuration read errors
sound/soc/fsl/fsl_sai.c | 16 ++++++----------
1 file changed, 6 insertions(+), 10 deletions(-)
--
2.43.0
^ permalink raw reply [flat|nested] 3+ messages in thread
* [PATCH 1/2] ASoC: fsl_sai: Make fsl_sai_reset_hw() return void
2026-11-10 7:58 [PATCH 0/2] ASoC: fsl_sai: Improve error handling phucduc.bui
@ 2026-11-10 7:58 ` phucduc.bui
2026-11-10 7:58 ` [PATCH 2/2] ASoC: fsl_sai: Report dataline configuration read errors phucduc.bui
1 sibling, 0 replies; 3+ messages in thread
From: phucduc.bui @ 2026-11-10 7:58 UTC (permalink / raw)
To: Shengjiu Wang, Shengjiu Wang, Xiubo Li, Fabio Estevam,
Nicolin Chen, Mark Brown
Cc: Liam Girdwood, Jaroslav Kysela, Takashi Iwai, linuxppc-dev,
linux-sound, linux-kernel, bui duc phuc
From: bui duc phuc <phucduc.bui@gmail.com>
fsl_sai_reset_hw() has a single caller, which does not need to
handle its return value. The function already reports register
write failures through dev_err().
Change the return type to void and continue clearing RCSR even
if clearing TCSR fails.
Signed-off-by: bui duc phuc <phucduc.bui@gmail.com>
---
sound/soc/fsl/fsl_sai.c | 12 +++---------
1 file changed, 3 insertions(+), 9 deletions(-)
diff --git a/sound/soc/fsl/fsl_sai.c b/sound/soc/fsl/fsl_sai.c
index 430e896d064e..59c9b8c28133 100644
--- a/sound/soc/fsl/fsl_sai.c
+++ b/sound/soc/fsl/fsl_sai.c
@@ -1410,7 +1410,7 @@ static int fsl_sai_check_version(struct device *dev)
return 0;
}
-static int fsl_sai_reset_hw(struct device *dev)
+static void fsl_sai_reset_hw(struct device *dev)
{
struct fsl_sai *sai = dev_get_drvdata(dev);
unsigned char ofs = sai->soc_data->reg_offset;
@@ -1421,18 +1421,12 @@ static int fsl_sai_reset_hw(struct device *dev)
* Bootloader may leave SAI running causing interrupt storm.
*/
ret = regmap_write(sai->regmap, FSL_SAI_TCSR(ofs), 0);
- if (ret) {
+ if (ret)
dev_err(dev, "Failed to clear TCSR: %d\n", ret);
- return ret;
- }
ret = regmap_write(sai->regmap, FSL_SAI_RCSR(ofs), 0);
- if (ret) {
+ if (ret)
dev_err(dev, "Failed to clear RCSR: %d\n", ret);
- return ret;
- }
-
- return 0;
}
/*
--
2.43.0
^ permalink raw reply related [flat|nested] 3+ messages in thread
* [PATCH 2/2] ASoC: fsl_sai: Report dataline configuration read errors
2026-11-10 7:58 [PATCH 0/2] ASoC: fsl_sai: Improve error handling phucduc.bui
2026-11-10 7:58 ` [PATCH 1/2] ASoC: fsl_sai: Make fsl_sai_reset_hw() return void phucduc.bui
@ 2026-11-10 7:58 ` phucduc.bui
1 sibling, 0 replies; 3+ messages in thread
From: phucduc.bui @ 2026-11-10 7:58 UTC (permalink / raw)
To: Shengjiu Wang, Shengjiu Wang, Xiubo Li, Fabio Estevam,
Nicolin Chen, Mark Brown
Cc: Liam Girdwood, Jaroslav Kysela, Takashi Iwai, linuxppc-dev,
linux-sound, linux-kernel, bui duc phuc
From: bui duc phuc <phucduc.bui@gmail.com>
fsl_sai_read_dlcfg() returns errors from of_property_read_u32_index()
without reporting them.
Add a dev_err() call in fsl_sai_probe() to report failures returned
by fsl_sai_read_dlcfg().
Signed-off-by: bui duc phuc <phucduc.bui@gmail.com>
---
sound/soc/fsl/fsl_sai.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/sound/soc/fsl/fsl_sai.c b/sound/soc/fsl/fsl_sai.c
index 59c9b8c28133..16197f9ac2d8 100644
--- a/sound/soc/fsl/fsl_sai.c
+++ b/sound/soc/fsl/fsl_sai.c
@@ -1621,8 +1621,10 @@ static int fsl_sai_probe(struct platform_device *pdev)
/* read dataline mask for rx and tx*/
ret = fsl_sai_read_dlcfg(sai);
- if (ret < 0)
+ if (ret < 0) {
+ dev_err(dev, "failed to read dlcfg %d\n", ret);
return ret;
+ }
irq = platform_get_irq(pdev, 0);
if (irq < 0)
--
2.43.0
^ permalink raw reply related [flat|nested] 3+ messages in thread
end of thread, other threads:[~2026-11-10 7:59 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-11-10 7:58 [PATCH 0/2] ASoC: fsl_sai: Improve error handling phucduc.bui
2026-11-10 7:58 ` [PATCH 1/2] ASoC: fsl_sai: Make fsl_sai_reset_hw() return void phucduc.bui
2026-11-10 7:58 ` [PATCH 2/2] ASoC: fsl_sai: Report dataline configuration read errors phucduc.bui
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.