1
0
Fork 0
mirror of https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git synced 2025-01-24 09:13:20 -05:00

ASoC: mt6359: reduce log verbosity for optional DT properties

DT properties "dmic-mode" and "mic-type-X" are optional.  Reduces the
log verbosity and changes the message a bit to avoid misleading.

Signed-off-by: Tzung-Bi Shih <tzungbi@google.com>
Link: https://lore.kernel.org/r/20210202033557.1621029-1-tzungbi@google.com
Signed-off-by: Mark Brown <broonie@kernel.org>
This commit is contained in:
Tzung-Bi Shih 2021-02-02 11:35:57 +08:00 committed by Mark Brown
parent 1f16aaeef7
commit 1ecebae473
No known key found for this signature in database
GPG key ID: 24D68B725D5487D0

View file

@ -2754,7 +2754,8 @@ static int mt6359_parse_dt(struct mt6359_priv *priv)
ret = of_property_read_u32(np, "mediatek,dmic-mode",
&priv->dmic_one_wire_mode);
if (ret) {
dev_warn(priv->dev, "%s() failed to read dmic-mode\n",
dev_info(priv->dev,
"%s() failed to read dmic-mode, use default (0)\n",
__func__);
priv->dmic_one_wire_mode = 0;
}
@ -2762,24 +2763,27 @@ static int mt6359_parse_dt(struct mt6359_priv *priv)
ret = of_property_read_u32(np, "mediatek,mic-type-0",
&priv->mux_select[MUX_MIC_TYPE_0]);
if (ret) {
dev_warn(priv->dev, "%s() failed to read mic-type-0\n",
__func__);
dev_info(priv->dev,
"%s() failed to read mic-type-0, use default (%d)\n",
__func__, MIC_TYPE_MUX_IDLE);
priv->mux_select[MUX_MIC_TYPE_0] = MIC_TYPE_MUX_IDLE;
}
ret = of_property_read_u32(np, "mediatek,mic-type-1",
&priv->mux_select[MUX_MIC_TYPE_1]);
if (ret) {
dev_warn(priv->dev, "%s() failed to read mic-type-1\n",
__func__);
dev_info(priv->dev,
"%s() failed to read mic-type-1, use default (%d)\n",
__func__, MIC_TYPE_MUX_IDLE);
priv->mux_select[MUX_MIC_TYPE_1] = MIC_TYPE_MUX_IDLE;
}
ret = of_property_read_u32(np, "mediatek,mic-type-2",
&priv->mux_select[MUX_MIC_TYPE_2]);
if (ret) {
dev_warn(priv->dev, "%s() failed to read mic-type-2\n",
__func__);
dev_info(priv->dev,
"%s() failed to read mic-type-2, use default (%d)\n",
__func__, MIC_TYPE_MUX_IDLE);
priv->mux_select[MUX_MIC_TYPE_2] = MIC_TYPE_MUX_IDLE;
}