From: Philipp Zabel <p.zabel@pengutronix.de>
To: Mohammad Rafi Shaik <mohammad.rafi.shaik@oss.qualcomm.com>,
Srinivas Kandagatla <srini@kernel.org>,
Liam Girdwood <lgirdwood@gmail.com>,
Mark Brown <broonie@kernel.org>, Rob Herring <robh@kernel.org>,
Krzysztof Kozlowski <krzk+dt@kernel.org>,
Conor Dooley <conor+dt@kernel.org>,
Jaroslav Kysela <perex@perex.cz>, Takashi Iwai <tiwai@suse.com>,
Linus Walleij <linus.walleij@linaro.org>,
Bartosz Golaszewski <brgl@bgdev.pl>
Cc: linux-arm-msm@vger.kernel.org, linux-sound@vger.kernel.org,
devicetree@vger.kernel.org, linux-kernel@vger.kernel.org,
linux-gpio@vger.kernel.org, quic_pkumpatl@quicinc.com,
kernel@oss.qualcomm.com
Subject: Re: [PATCH v1 2/2] ASoC: codecs: wsa883x: Handle shared reset GPIO for WSA883x speakers
Date: Mon, 23 Jun 2025 09:00:06 +0200 [thread overview]
Message-ID: <d42dda52f92b327fd9a051a892c212643f5ab75a.camel@pengutronix.de> (raw)
In-Reply-To: <20250620103012.360794-3-mohammad.rafi.shaik@oss.qualcomm.com>
On Fr, 2025-06-20 at 16:00 +0530, Mohammad Rafi Shaik wrote:
> On some Qualcomm platforms, such as QCS6490-RB3Gen2 and QCM6490-IDP,
> multiple WSA8830/WSA8835 speakers share a common reset (shutdown) GPIO.
> To handle such cases, use the reset controller framework along with the
> "reset-gpio" driver.
>
> Signed-off-by: Mohammad Rafi Shaik <mohammad.rafi.shaik@oss.qualcomm.com>
> ---
> sound/soc/codecs/wsa883x.c | 57 ++++++++++++++++++++++++++++++++------
> 1 file changed, 48 insertions(+), 9 deletions(-)
>
> diff --git a/sound/soc/codecs/wsa883x.c b/sound/soc/codecs/wsa883x.c
> index 13c9d4a6f015..b82b925c1f8d 100644
> --- a/sound/soc/codecs/wsa883x.c
> +++ b/sound/soc/codecs/wsa883x.c
[...]
> @@ -1547,6 +1549,44 @@ static const struct hwmon_chip_info wsa883x_hwmon_chip_info = {
> .info = wsa883x_hwmon_info,
> };
>
> +static void wsa883x_reset_powerdown(void *data)
> +{
> + struct wsa883x_priv *wsa883x = data;
> +
> + if (wsa883x->sd_reset)
> + reset_control_assert(wsa883x->sd_reset);
> + else
> + gpiod_direction_output(wsa883x->sd_n, 1);
> +}
> +
> +static void wsa883x_reset_deassert(struct wsa883x_priv *wsa883x)
> +{
> + if (wsa883x->sd_reset)
> + reset_control_deassert(wsa883x->sd_reset);
> + else
> + gpiod_direction_output(wsa883x->sd_n, 0);
> +}
> +
> +static int wsa883x_get_reset(struct device *dev, struct wsa883x_priv *wsa883x)
> +{
> + wsa883x->sd_reset = devm_reset_control_get_optional_shared(dev, NULL);
Since this driver only deasserts/asserts on probe/remove, you could use
devm_reset_control_get_optional_shared_deasserted() and let the
framework code handle the (de)assertion of sd_reset.
I wonder if the codec could also be put into reset during (runtime)
suspend.
regards
Philipp
next prev parent reply other threads:[~2025-06-23 7:00 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-06-20 10:30 [PATCH v1 0/2] Handle shared reset GPIO for WSA883x speakers Mohammad Rafi Shaik
2025-06-20 10:30 ` [PATCH v1 1/2] ASoC: dt-bindings: qcom,wsa8830: Add reset-gpios for shared line Mohammad Rafi Shaik
2025-06-23 8:03 ` Krzysztof Kozlowski
2025-06-23 8:41 ` Mohammad Rafi Shaik
2025-06-20 10:30 ` [PATCH v1 2/2] ASoC: codecs: wsa883x: Handle shared reset GPIO for WSA883x speakers Mohammad Rafi Shaik
2025-06-20 18:35 ` Dmitry Baryshkov
2025-06-23 7:11 ` Philipp Zabel
2025-06-23 8:01 ` Krzysztof Kozlowski
2025-06-23 7:00 ` Philipp Zabel [this message]
2025-06-24 2:43 ` Dmitry Baryshkov
2025-06-25 9:08 ` Mohammad Rafi Shaik
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=d42dda52f92b327fd9a051a892c212643f5ab75a.camel@pengutronix.de \
--to=p.zabel@pengutronix.de \
--cc=brgl@bgdev.pl \
--cc=broonie@kernel.org \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=kernel@oss.qualcomm.com \
--cc=krzk+dt@kernel.org \
--cc=lgirdwood@gmail.com \
--cc=linus.walleij@linaro.org \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-gpio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-sound@vger.kernel.org \
--cc=mohammad.rafi.shaik@oss.qualcomm.com \
--cc=perex@perex.cz \
--cc=quic_pkumpatl@quicinc.com \
--cc=robh@kernel.org \
--cc=srini@kernel.org \
--cc=tiwai@suse.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).