* [PATCH] ASoC: rt5640: add default case for unexpected ID
@ 2014-05-06 7:56 bardliao
2014-05-06 17:15 ` Stephen Warren
2014-05-12 21:09 ` Mark Brown
0 siblings, 2 replies; 3+ messages in thread
From: bardliao @ 2014-05-06 7:56 UTC (permalink / raw)
To: broonie, lgirdwood; +Cc: oder_chiou, alsa-devel, lars, swarren, bardliao, flove
From: Bard Liao <bardliao@realtek.com>
We may read an unexpected value when detemining which codec is attached.
In that case, either a unsupported codec is attached or something wrong
with I2C. The driver will not work properly on both cases. So we return
an error for that.
Signed-off-by: Bard Liao <bardliao@realtek.com>
---
sound/soc/codecs/rt5640.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/sound/soc/codecs/rt5640.c b/sound/soc/codecs/rt5640.c
index b0967df..9e0d48f 100644
--- a/sound/soc/codecs/rt5640.c
+++ b/sound/soc/codecs/rt5640.c
@@ -2019,6 +2019,10 @@ static int rt5640_probe(struct snd_soc_codec *codec)
rt5639_specific_dapm_routes,
ARRAY_SIZE(rt5639_specific_dapm_routes));
break;
+ default:
+ dev_err(codec->dev,
+ "The driver is for RT5639 RT5640 or RT5642 only\n");
+ return -ENODEV;
}
return 0;
--
1.8.1.1.439.g50a6b54
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] ASoC: rt5640: add default case for unexpected ID
2014-05-06 7:56 [PATCH] ASoC: rt5640: add default case for unexpected ID bardliao
@ 2014-05-06 17:15 ` Stephen Warren
2014-05-12 21:09 ` Mark Brown
1 sibling, 0 replies; 3+ messages in thread
From: Stephen Warren @ 2014-05-06 17:15 UTC (permalink / raw)
To: bardliao, broonie, lgirdwood; +Cc: oder_chiou, alsa-devel, lars, flove
On 05/06/2014 01:56 AM, bardliao@realtek.com wrote:
> From: Bard Liao <bardliao@realtek.com>
>
> We may read an unexpected value when detemining which codec is attached.
> In that case, either a unsupported codec is attached or something wrong
> with I2C. The driver will not work properly on both cases. So we return
> an error for that.
Reviewed-by: Stephen Warren <swarren@nvidia.com>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] ASoC: rt5640: add default case for unexpected ID
2014-05-06 7:56 [PATCH] ASoC: rt5640: add default case for unexpected ID bardliao
2014-05-06 17:15 ` Stephen Warren
@ 2014-05-12 21:09 ` Mark Brown
1 sibling, 0 replies; 3+ messages in thread
From: Mark Brown @ 2014-05-12 21:09 UTC (permalink / raw)
To: bardliao; +Cc: oder_chiou, alsa-devel, lars, swarren, lgirdwood, flove
[-- Attachment #1.1: Type: text/plain, Size: 386 bytes --]
On Tue, May 06, 2014 at 03:56:06PM +0800, bardliao@realtek.com wrote:
> From: Bard Liao <bardliao@realtek.com>
>
> We may read an unexpected value when detemining which codec is attached.
> In that case, either a unsupported codec is attached or something wrong
> with I2C. The driver will not work properly on both cases. So we return
> an error for that.
Applied, thanks.
[-- Attachment #1.2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]
[-- Attachment #2: Type: text/plain, Size: 0 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2014-05-12 21:09 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-05-06 7:56 [PATCH] ASoC: rt5640: add default case for unexpected ID bardliao
2014-05-06 17:15 ` Stephen Warren
2014-05-12 21:09 ` Mark Brown
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox