[PATCH v2 0/3] ASoC: dt-bindings: Add bindings for WCD9335 DAIs
Add DT bindings for WCD9335 DAIs and use them in the driver as well as all device trees currently using WCD9335.
Changes since v1: - Make header guard match path - Maintain the alphabetical order in msm8996-xiaomi-gemini includes
Yassine Oudjana (3): ASoC: dt-bindings: Add bindings for WCD9335 DAIs ASoC: wcd9335: Use DT bindings instead of local DAI definitions arm64: dts: qcom: Use WCD9335 DT bindings
MAINTAINERS | 1 + arch/arm64/boot/dts/qcom/apq8096-db820c.dts | 5 +++-- .../arm64/boot/dts/qcom/msm8996-xiaomi-gemini.dts | 5 +++-- .../boot/dts/qcom/msm8996-xiaomi-scorpio.dts | 5 +++-- include/dt-bindings/sound/qcom,wcd9335.h | 15 +++++++++++++++ sound/soc/codecs/wcd9335.c | 13 ++----------- 6 files changed, 27 insertions(+), 17 deletions(-) create mode 100644 include/dt-bindings/sound/qcom,wcd9335.h
From: Yassine Oudjana y.oudjana@protonmail.com
Add bindings for the DAIs available in WCD9335 to avoid having to use unclear number indices in device trees.
Signed-off-by: Yassine Oudjana y.oudjana@protonmail.com Reviewed-by: Krzysztof Kozlowski krzysztof.kozlowski@linaro.org --- Changes since v1: - Make header guard match path
MAINTAINERS | 1 + include/dt-bindings/sound/qcom,wcd9335.h | 15 +++++++++++++++ 2 files changed, 16 insertions(+) create mode 100644 include/dt-bindings/sound/qcom,wcd9335.h
diff --git a/MAINTAINERS b/MAINTAINERS index b774f21828f7..2bcc3cc129c5 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -16366,6 +16366,7 @@ M: Srinivas Kandagatla srinivas.kandagatla@linaro.org M: Banajit Goswami bgoswami@quicinc.com L: alsa-devel@alsa-project.org (moderated for non-subscribers) S: Supported +F: include/dt-bindings/sound/qcom,wcd9335.h F: sound/soc/codecs/lpass-va-macro.c F: sound/soc/codecs/lpass-wsa-macro.* F: sound/soc/codecs/msm8916-wcd-analog.c diff --git a/include/dt-bindings/sound/qcom,wcd9335.h b/include/dt-bindings/sound/qcom,wcd9335.h new file mode 100644 index 000000000000..f5e9f1db091e --- /dev/null +++ b/include/dt-bindings/sound/qcom,wcd9335.h @@ -0,0 +1,15 @@ +/* SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) */ + +#ifndef __DT_SOUND_QCOM_WCD9335_H +#define __DT_SOUND_QCOM_WCD9335_H + +#define AIF1_PB 0 +#define AIF1_CAP 1 +#define AIF2_PB 2 +#define AIF2_CAP 3 +#define AIF3_PB 4 +#define AIF3_CAP 5 +#define AIF4_PB 6 +#define NUM_CODEC_DAIS 7 + +#endif
From: Yassine Oudjana y.oudjana@protonmail.com
Get DAI indices from DT bindings and remove the currently used local definitions.
Signed-off-by: Yassine Oudjana y.oudjana@protonmail.com Acked-by: Krzysztof Kozlowski krzysztof.kozlowski@linaro.org --- sound/soc/codecs/wcd9335.c | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-)
diff --git a/sound/soc/codecs/wcd9335.c b/sound/soc/codecs/wcd9335.c index 7d40a61b03b0..3554b95462e8 100644 --- a/sound/soc/codecs/wcd9335.c +++ b/sound/soc/codecs/wcd9335.c @@ -24,6 +24,8 @@ #include "wcd9335.h" #include "wcd-clsh-v2.h"
+#include <dt-bindings/sound/qcom,wcd9335.h> + #define WCD9335_RATES_MASK (SNDRV_PCM_RATE_8000 | SNDRV_PCM_RATE_16000 |\ SNDRV_PCM_RATE_32000 | SNDRV_PCM_RATE_48000 |\ SNDRV_PCM_RATE_96000 | SNDRV_PCM_RATE_192000) @@ -203,17 +205,6 @@ enum wcd9335_sido_voltage { SIDO_VOLTAGE_NOMINAL_MV = 1100, };
-enum { - AIF1_PB = 0, - AIF1_CAP, - AIF2_PB, - AIF2_CAP, - AIF3_PB, - AIF3_CAP, - AIF4_PB, - NUM_CODEC_DAIS, -}; - enum { COMPANDER_1, /* HPH_L */ COMPANDER_2, /* HPH_R */
From: Yassine Oudjana y.oudjana@protonmail.com
Replace DAI indices in codec nodes with definitions from the WCD9335 DT bindings for devices that use WCD9335.
Signed-off-by: Yassine Oudjana y.oudjana@protonmail.com --- Changes since v1: - Maintain the alphabetical order in msm8996-xiaomi-gemini includes
arch/arm64/boot/dts/qcom/apq8096-db820c.dts | 5 +++-- arch/arm64/boot/dts/qcom/msm8996-xiaomi-gemini.dts | 5 +++-- arch/arm64/boot/dts/qcom/msm8996-xiaomi-scorpio.dts | 5 +++-- 3 files changed, 9 insertions(+), 6 deletions(-)
diff --git a/arch/arm64/boot/dts/qcom/apq8096-db820c.dts b/arch/arm64/boot/dts/qcom/apq8096-db820c.dts index 49afbb1a066a..ff915cd8e5a6 100644 --- a/arch/arm64/boot/dts/qcom/apq8096-db820c.dts +++ b/arch/arm64/boot/dts/qcom/apq8096-db820c.dts @@ -13,6 +13,7 @@ #include <dt-bindings/pinctrl/qcom,pmic-gpio.h> #include <dt-bindings/sound/qcom,q6afe.h> #include <dt-bindings/sound/qcom,q6asm.h> +#include <dt-bindings/sound/qcom,wcd9335.h>
/* * GPIO name legend: proper name = the GPIO line is used as GPIO @@ -1009,7 +1010,7 @@ platform { };
codec { - sound-dai = <&wcd9335 6>; + sound-dai = <&wcd9335 AIF4_PB>; }; };
@@ -1024,7 +1025,7 @@ platform { };
codec { - sound-dai = <&wcd9335 1>; + sound-dai = <&wcd9335 AIF1_CAP>; }; }; }; diff --git a/arch/arm64/boot/dts/qcom/msm8996-xiaomi-gemini.dts b/arch/arm64/boot/dts/qcom/msm8996-xiaomi-gemini.dts index 22978d06f85b..8cdae01aaa85 100644 --- a/arch/arm64/boot/dts/qcom/msm8996-xiaomi-gemini.dts +++ b/arch/arm64/boot/dts/qcom/msm8996-xiaomi-gemini.dts @@ -8,6 +8,7 @@ #include "msm8996-xiaomi-common.dtsi" #include <dt-bindings/sound/qcom,q6afe.h> #include <dt-bindings/sound/qcom,q6asm.h> +#include <dt-bindings/sound/qcom,wcd9335.h> #include <dt-bindings/input/ti-drv260x.h>
/ { @@ -193,7 +194,7 @@ platform { };
codec { - sound-dai = <&wcd9335 6>; + sound-dai = <&wcd9335 AIF4_PB>; }; };
@@ -208,7 +209,7 @@ platform { };
codec { - sound-dai = <&wcd9335 1>; + sound-dai = <&wcd9335 AIF1_CAP>; }; }; }; diff --git a/arch/arm64/boot/dts/qcom/msm8996-xiaomi-scorpio.dts b/arch/arm64/boot/dts/qcom/msm8996-xiaomi-scorpio.dts index 1e2dd6763ad1..c9f935cfb587 100644 --- a/arch/arm64/boot/dts/qcom/msm8996-xiaomi-scorpio.dts +++ b/arch/arm64/boot/dts/qcom/msm8996-xiaomi-scorpio.dts @@ -9,6 +9,7 @@ #include "pmi8996.dtsi" #include <dt-bindings/sound/qcom,q6afe.h> #include <dt-bindings/sound/qcom,q6asm.h> +#include <dt-bindings/sound/qcom,wcd9335.h>
/ { model = "Xiaomi Mi Note 2"; @@ -171,7 +172,7 @@ platform { };
codec { - sound-dai = <&wcd9335 6>; + sound-dai = <&wcd9335 AIF4_PB>; }; };
@@ -186,7 +187,7 @@ platform { };
codec { - sound-dai = <&wcd9335 1>; + sound-dai = <&wcd9335 AIF1_CAP>; }; }; };
On 22/06/2022 18:13, Yassine Oudjana wrote:
From: Yassine Oudjana y.oudjana@protonmail.com
Replace DAI indices in codec nodes with definitions from the WCD9335 DT bindings for devices that use WCD9335.
Signed-off-by: Yassine Oudjana y.oudjana@protonmail.com
Changes since v1:
- Maintain the alphabetical order in msm8996-xiaomi-gemini includes
arch/arm64/boot/dts/qcom/apq8096-db820c.dts | 5 +++-- arch/arm64/boot/dts/qcom/msm8996-xiaomi-gemini.dts | 5 +++-- arch/arm64/boot/dts/qcom/msm8996-xiaomi-scorpio.dts | 5 +++-- 3 files changed, 9 insertions(+), 6 deletions(-)
Acked-by: Krzysztof Kozlowski krzysztof.kozlowski@linaro.org
Best regards, Krzysztof
On Wed, 22 Jun 2022 20:13:19 +0400, Yassine Oudjana wrote:
Add DT bindings for WCD9335 DAIs and use them in the driver as well as all device trees currently using WCD9335.
Changes since v1:
- Make header guard match path
- Maintain the alphabetical order in msm8996-xiaomi-gemini includes
[...]
Applied to
https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git for-next
Thanks!
[1/3] ASoC: dt-bindings: Add bindings for WCD9335 DAIs commit: 53447365ccb442bbd3dfffc2d7fd96203770dfb6 [2/3] ASoC: wcd9335: Use DT bindings instead of local DAI definitions commit: 66348f178d5a842c8afe52c3b743fb4af24cdb2a
All being well this means that it will be integrated into the linux-next tree (usually sometime in the next 24 hours) and sent to Linus during the next merge window (or sooner if it is a bug fix), however if problems are discovered then the patch may be dropped or reverted.
You may get further e-mails resulting from automated or manual testing and review of the tree, please engage with people reporting problems and send followup patches addressing any issues that are reported if needed.
If any updates are required or you are submitting further changes they should be sent as incremental updates against current git, existing patches will not be replaced.
Please add any relevant lists and maintainers to the CCs when replying to this mail.
Thanks, Mark
On Wed, 22 Jun 2022 20:13:19 +0400, Yassine Oudjana wrote:
Add DT bindings for WCD9335 DAIs and use them in the driver as well as all device trees currently using WCD9335.
Changes since v1:
- Make header guard match path
- Maintain the alphabetical order in msm8996-xiaomi-gemini includes
[...]
Applied, thanks!
[3/3] arm64: dts: qcom: Use WCD9335 DT bindings commit: b504af6c9912502efa9af162b50cd589351b6894
Best regards,
participants (4)
-
Bjorn Andersson
-
Krzysztof Kozlowski
-
Mark Brown
-
Yassine Oudjana