* [PATCH v2 1/2] ASoC: dt-bindings: qcom,wsa883x: Use correct SD_N polarity
@ 2022-11-10 13:35 Krzysztof Kozlowski
2022-11-10 13:35 ` [PATCH v2 2/2] ASoC: codecs: wsa883x: Use proper shutdown GPIO polarity Krzysztof Kozlowski
` (2 more replies)
0 siblings, 3 replies; 5+ messages in thread
From: Krzysztof Kozlowski @ 2022-11-10 13:35 UTC (permalink / raw)
To: Srinivas Kandagatla, Banajit Goswami, Andy Gross, Bjorn Andersson,
Konrad Dybcio, Liam Girdwood, Mark Brown, Rob Herring,
Krzysztof Kozlowski, Jaroslav Kysela, Takashi Iwai, alsa-devel,
linux-arm-msm, devicetree, linux-kernel
Cc: Krzysztof Kozlowski
Use correct polarity in example and powerdown-gpios description.
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
---
Changes since v1:
1. New patch.
---
Documentation/devicetree/bindings/sound/qcom,wsa883x.yaml | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)
diff --git a/Documentation/devicetree/bindings/sound/qcom,wsa883x.yaml b/Documentation/devicetree/bindings/sound/qcom,wsa883x.yaml
index 6113f65f2990..99f9c10bbc83 100644
--- a/Documentation/devicetree/bindings/sound/qcom,wsa883x.yaml
+++ b/Documentation/devicetree/bindings/sound/qcom,wsa883x.yaml
@@ -23,7 +23,7 @@ properties:
maxItems: 1
powerdown-gpios:
- description: GPIO spec for Powerdown/Shutdown line to use
+ description: GPIO spec for Powerdown/Shutdown line to use (pin SD_N)
maxItems: 1
vdd-supply:
@@ -47,6 +47,8 @@ additionalProperties: false
examples:
- |
+ #include <dt-bindings/gpio/gpio.h>
+
soundwire-controller@3250000 {
#address-cells = <2>;
#size-cells = <0>;
@@ -55,7 +57,7 @@ examples:
speaker@0,1 {
compatible = "sdw10217020200";
reg = <0 1>;
- powerdown-gpios = <&tlmm 1 0>;
+ powerdown-gpios = <&tlmm 1 GPIO_ACTIVE_LOW>;
vdd-supply = <&vreg_s10b_1p8>;
#thermal-sensor-cells = <0>;
#sound-dai-cells = <0>;
@@ -64,7 +66,7 @@ examples:
speaker@0,2 {
compatible = "sdw10217020200";
reg = <0 2>;
- powerdown-gpios = <&tlmm 89 0>;
+ powerdown-gpios = <&tlmm 89 GPIO_ACTIVE_LOW>;
vdd-supply = <&vreg_s10b_1p8>;
#thermal-sensor-cells = <0>;
#sound-dai-cells = <0>;
--
2.34.1
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [PATCH v2 2/2] ASoC: codecs: wsa883x: Use proper shutdown GPIO polarity
2022-11-10 13:35 [PATCH v2 1/2] ASoC: dt-bindings: qcom,wsa883x: Use correct SD_N polarity Krzysztof Kozlowski
@ 2022-11-10 13:35 ` Krzysztof Kozlowski
2022-11-11 16:42 ` Srinivas Kandagatla
2022-11-11 16:42 ` [PATCH v2 1/2] ASoC: dt-bindings: qcom,wsa883x: Use correct SD_N polarity Srinivas Kandagatla
2022-11-11 20:09 ` Mark Brown
2 siblings, 1 reply; 5+ messages in thread
From: Krzysztof Kozlowski @ 2022-11-10 13:35 UTC (permalink / raw)
To: Srinivas Kandagatla, Banajit Goswami, Andy Gross, Bjorn Andersson,
Konrad Dybcio, Liam Girdwood, Mark Brown, Rob Herring,
Krzysztof Kozlowski, Jaroslav Kysela, Takashi Iwai, alsa-devel,
linux-arm-msm, devicetree, linux-kernel
Cc: Krzysztof Kozlowski
The shutdown GPIO is active low (SD_N), but this depends on actual board
layout. Linux drivers should only care about logical state, where high
(1) means shutdown and low (0) means do not shutdown.
Invert the GPIO to match logical value.
Fixes: 43b8c7dc85a1 ("ASoC: codecs: add wsa883x amplifier support")
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
---
Changes since v1:
1. None.
---
sound/soc/codecs/wsa883x.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/sound/soc/codecs/wsa883x.c b/sound/soc/codecs/wsa883x.c
index c7b10bbfba7e..77a7dd3cf495 100644
--- a/sound/soc/codecs/wsa883x.c
+++ b/sound/soc/codecs/wsa883x.c
@@ -1392,7 +1392,7 @@ static int wsa883x_probe(struct sdw_slave *pdev,
}
wsa883x->sd_n = devm_gpiod_get_optional(&pdev->dev, "powerdown",
- GPIOD_FLAGS_BIT_NONEXCLUSIVE);
+ GPIOD_FLAGS_BIT_NONEXCLUSIVE | GPIOD_OUT_HIGH);
if (IS_ERR(wsa883x->sd_n)) {
dev_err(&pdev->dev, "Shutdown Control GPIO not found\n");
ret = PTR_ERR(wsa883x->sd_n);
@@ -1411,7 +1411,7 @@ static int wsa883x_probe(struct sdw_slave *pdev,
pdev->prop.simple_clk_stop_capable = true;
pdev->prop.sink_dpn_prop = wsa_sink_dpn_prop;
pdev->prop.scp_int1_mask = SDW_SCP_INT1_BUS_CLASH | SDW_SCP_INT1_PARITY;
- gpiod_direction_output(wsa883x->sd_n, 1);
+ gpiod_direction_output(wsa883x->sd_n, 0);
wsa883x->regmap = devm_regmap_init_sdw(pdev, &wsa883x_regmap_config);
if (IS_ERR(wsa883x->regmap)) {
--
2.34.1
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH v2 2/2] ASoC: codecs: wsa883x: Use proper shutdown GPIO polarity
2022-11-10 13:35 ` [PATCH v2 2/2] ASoC: codecs: wsa883x: Use proper shutdown GPIO polarity Krzysztof Kozlowski
@ 2022-11-11 16:42 ` Srinivas Kandagatla
0 siblings, 0 replies; 5+ messages in thread
From: Srinivas Kandagatla @ 2022-11-11 16:42 UTC (permalink / raw)
To: Krzysztof Kozlowski, Banajit Goswami, Andy Gross, Bjorn Andersson,
Konrad Dybcio, Liam Girdwood, Mark Brown, Rob Herring,
Krzysztof Kozlowski, Jaroslav Kysela, Takashi Iwai, alsa-devel,
linux-arm-msm, devicetree, linux-kernel
On 10/11/2022 13:35, Krzysztof Kozlowski wrote:
> The shutdown GPIO is active low (SD_N), but this depends on actual board
> layout. Linux drivers should only care about logical state, where high
> (1) means shutdown and low (0) means do not shutdown.
>
> Invert the GPIO to match logical value.
>
> Fixes: 43b8c7dc85a1 ("ASoC: codecs: add wsa883x amplifier support")
> Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
>
> ---
Reviewed-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
>
> Changes since v1:
> 1. None.
> ---
> sound/soc/codecs/wsa883x.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/sound/soc/codecs/wsa883x.c b/sound/soc/codecs/wsa883x.c
> index c7b10bbfba7e..77a7dd3cf495 100644
> --- a/sound/soc/codecs/wsa883x.c
> +++ b/sound/soc/codecs/wsa883x.c
> @@ -1392,7 +1392,7 @@ static int wsa883x_probe(struct sdw_slave *pdev,
> }
>
> wsa883x->sd_n = devm_gpiod_get_optional(&pdev->dev, "powerdown",
> - GPIOD_FLAGS_BIT_NONEXCLUSIVE);
> + GPIOD_FLAGS_BIT_NONEXCLUSIVE | GPIOD_OUT_HIGH);
> if (IS_ERR(wsa883x->sd_n)) {
> dev_err(&pdev->dev, "Shutdown Control GPIO not found\n");
> ret = PTR_ERR(wsa883x->sd_n);
> @@ -1411,7 +1411,7 @@ static int wsa883x_probe(struct sdw_slave *pdev,
> pdev->prop.simple_clk_stop_capable = true;
> pdev->prop.sink_dpn_prop = wsa_sink_dpn_prop;
> pdev->prop.scp_int1_mask = SDW_SCP_INT1_BUS_CLASH | SDW_SCP_INT1_PARITY;
> - gpiod_direction_output(wsa883x->sd_n, 1);
> + gpiod_direction_output(wsa883x->sd_n, 0);
>
> wsa883x->regmap = devm_regmap_init_sdw(pdev, &wsa883x_regmap_config);
> if (IS_ERR(wsa883x->regmap)) {
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH v2 1/2] ASoC: dt-bindings: qcom,wsa883x: Use correct SD_N polarity
2022-11-10 13:35 [PATCH v2 1/2] ASoC: dt-bindings: qcom,wsa883x: Use correct SD_N polarity Krzysztof Kozlowski
2022-11-10 13:35 ` [PATCH v2 2/2] ASoC: codecs: wsa883x: Use proper shutdown GPIO polarity Krzysztof Kozlowski
@ 2022-11-11 16:42 ` Srinivas Kandagatla
2022-11-11 20:09 ` Mark Brown
2 siblings, 0 replies; 5+ messages in thread
From: Srinivas Kandagatla @ 2022-11-11 16:42 UTC (permalink / raw)
To: Krzysztof Kozlowski, Banajit Goswami, Andy Gross, Bjorn Andersson,
Konrad Dybcio, Liam Girdwood, Mark Brown, Rob Herring,
Krzysztof Kozlowski, Jaroslav Kysela, Takashi Iwai, alsa-devel,
linux-arm-msm, devicetree, linux-kernel
On 10/11/2022 13:35, Krzysztof Kozlowski wrote:
> Use correct polarity in example and powerdown-gpios description.
>
> Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
>
Reviewed-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
> ---
>
> Changes since v1:
> 1. New patch.
> ---
> Documentation/devicetree/bindings/sound/qcom,wsa883x.yaml | 8 +++++---
> 1 file changed, 5 insertions(+), 3 deletions(-)
>
> diff --git a/Documentation/devicetree/bindings/sound/qcom,wsa883x.yaml b/Documentation/devicetree/bindings/sound/qcom,wsa883x.yaml
> index 6113f65f2990..99f9c10bbc83 100644
> --- a/Documentation/devicetree/bindings/sound/qcom,wsa883x.yaml
> +++ b/Documentation/devicetree/bindings/sound/qcom,wsa883x.yaml
> @@ -23,7 +23,7 @@ properties:
> maxItems: 1
>
> powerdown-gpios:
> - description: GPIO spec for Powerdown/Shutdown line to use
> + description: GPIO spec for Powerdown/Shutdown line to use (pin SD_N)
> maxItems: 1
>
> vdd-supply:
> @@ -47,6 +47,8 @@ additionalProperties: false
>
> examples:
> - |
> + #include <dt-bindings/gpio/gpio.h>
> +
> soundwire-controller@3250000 {
> #address-cells = <2>;
> #size-cells = <0>;
> @@ -55,7 +57,7 @@ examples:
> speaker@0,1 {
> compatible = "sdw10217020200";
> reg = <0 1>;
> - powerdown-gpios = <&tlmm 1 0>;
> + powerdown-gpios = <&tlmm 1 GPIO_ACTIVE_LOW>;
> vdd-supply = <&vreg_s10b_1p8>;
> #thermal-sensor-cells = <0>;
> #sound-dai-cells = <0>;
> @@ -64,7 +66,7 @@ examples:
> speaker@0,2 {
> compatible = "sdw10217020200";
> reg = <0 2>;
> - powerdown-gpios = <&tlmm 89 0>;
> + powerdown-gpios = <&tlmm 89 GPIO_ACTIVE_LOW>;
> vdd-supply = <&vreg_s10b_1p8>;
> #thermal-sensor-cells = <0>;
> #sound-dai-cells = <0>;
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH v2 1/2] ASoC: dt-bindings: qcom,wsa883x: Use correct SD_N polarity
2022-11-10 13:35 [PATCH v2 1/2] ASoC: dt-bindings: qcom,wsa883x: Use correct SD_N polarity Krzysztof Kozlowski
2022-11-10 13:35 ` [PATCH v2 2/2] ASoC: codecs: wsa883x: Use proper shutdown GPIO polarity Krzysztof Kozlowski
2022-11-11 16:42 ` [PATCH v2 1/2] ASoC: dt-bindings: qcom,wsa883x: Use correct SD_N polarity Srinivas Kandagatla
@ 2022-11-11 20:09 ` Mark Brown
2 siblings, 0 replies; 5+ messages in thread
From: Mark Brown @ 2022-11-11 20:09 UTC (permalink / raw)
To: Bjorn Andersson, alsa-devel, Krzysztof Kozlowski,
Srinivas Kandagatla, Konrad Dybcio, devicetree, Liam Girdwood,
Takashi Iwai, Jaroslav Kysela, linux-arm-msm, Krzysztof Kozlowski,
Banajit Goswami, Andy Gross, Rob Herring, linux-kernel
On Thu, 10 Nov 2022 14:35:11 +0100, Krzysztof Kozlowski wrote:
> Use correct polarity in example and powerdown-gpios description.
>
>
Applied to
https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git for-next
Thanks!
[1/2] ASoC: dt-bindings: qcom,wsa883x: Use correct SD_N polarity
commit: 817e981736d27731adb9d7ca11eb8069d1ee569d
[2/2] ASoC: codecs: wsa883x: Use proper shutdown GPIO polarity
commit: ec5dba73f7ba10797904cf18092d2e6975a22147
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
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2022-11-11 20:09 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-11-10 13:35 [PATCH v2 1/2] ASoC: dt-bindings: qcom,wsa883x: Use correct SD_N polarity Krzysztof Kozlowski
2022-11-10 13:35 ` [PATCH v2 2/2] ASoC: codecs: wsa883x: Use proper shutdown GPIO polarity Krzysztof Kozlowski
2022-11-11 16:42 ` Srinivas Kandagatla
2022-11-11 16:42 ` [PATCH v2 1/2] ASoC: dt-bindings: qcom,wsa883x: Use correct SD_N polarity Srinivas Kandagatla
2022-11-11 20: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;
as well as URLs for NNTP newsgroup(s).