From: Mark Brown <broonie@kernel.org>
To: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Cc: robh+dt@kernel.org, lgirdwood@gmail.com, bgoswami@codeaurora.org,
devicetree@vger.kernel.org, linux-kernel@vger.kernel.org,
vkoul@kernel.org, alsa-devel@alsa-project.org
Subject: Re: [PATCH v5 2/8] ASoC: wcd9335: add support to wcd9335 codec
Date: Tue, 22 Jan 2019 18:41:46 +0000 [thread overview]
Message-ID: <20190122184146.GF7579@sirena.org.uk> (raw)
In-Reply-To: <20190110150616.2332-3-srinivas.kandagatla@linaro.org>
[-- Attachment #1: Type: text/plain, Size: 1703 bytes --]
On Thu, Jan 10, 2019 at 03:06:10PM +0000, Srinivas Kandagatla wrote:
This all looks good apart from a couple of small things that should be
easy to fix:
> diff --git a/sound/soc/codecs/Kconfig b/sound/soc/codecs/Kconfig
> index 62bdb7e333b8..1c4904940621 100644
> --- a/sound/soc/codecs/Kconfig
> +++ b/sound/soc/codecs/Kconfig
> @@ -1100,6 +1100,12 @@ config SND_SOC_UDA1380
> tristate
> depends on I2C
>
> +config SND_SOC_WCD9335
> + tristate "WCD9335 Codec"
> + depends on SLIMBUS
> + select REGMAP_SLIMBUS
> + tristate
> +
> config SND_SOC_WL1273
> tristate
>
You should add this to SND_SOC_ALL_CODECS.
> +static irqreturn_t wcd9335_slimbus_irq(int irq, void *data)
> +{
> + struct wcd9335_codec *wcd = data;
> + unsigned long status = 0;
> + int i, j, port_id;
> + unsigned int val, int_val = 0;
> + bool tx;
> + unsigned short reg = 0;
> +
> + for (i = WCD9335_SLIM_PGD_PORT_INT_STATUS_RX_0, j = 0;
> + i <= WCD9335_SLIM_PGD_PORT_INT_STATUS_TX_1; i++, j++) {
> + regmap_read(wcd->if_regmap, i, &val);
> + status |= ((u32)val << (8 * j));
> + }
> +
> + for_each_set_bit(j, &status, 32) {
> + tx = (j >= 16 ? true : false);
> + port_id = (tx ? j - 16 : j);
...
> + return IRQ_HANDLED;
> +}
This will report that it handled the interrupt unconditionally, this
means that if the interrupt fires in error or there's some bug the
interrupt will never be acknowledged (it looks like the chip requires
acks?) but the interrupt core won't be able to notice and handle the
problem as effectively as it could've done. It's better to report
IRQ_NONE if nothing as handled so that the core can do error handling.
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
next prev parent reply other threads:[~2019-01-22 18:41 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-01-10 15:06 [PATCH v5 0/8] ASoC: Add support to WCD9335 Audio Codec Srinivas Kandagatla
2019-01-10 15:06 ` [PATCH v5 1/8] ASoC: dt-bindings: update wcd9335 bindings Srinivas Kandagatla
2019-01-10 15:06 ` [PATCH v5 2/8] ASoC: wcd9335: add support to wcd9335 codec Srinivas Kandagatla
2019-01-22 18:41 ` Mark Brown [this message]
2019-01-23 10:11 ` Srinivas Kandagatla
2019-01-10 15:06 ` [PATCH v5 3/8] ASoC: wcd9335: add CLASS-H Controller support Srinivas Kandagatla
2019-01-10 15:06 ` [PATCH v5 4/8] ASoC: wcd9335: add basic controls Srinivas Kandagatla
2019-01-22 18:52 ` Mark Brown
2019-01-23 10:11 ` Srinivas Kandagatla
2019-01-10 15:06 ` [PATCH v5 5/8] ASoC: wcd9335: add playback dapm widgets Srinivas Kandagatla
2019-01-10 15:06 ` [PATCH v5 6/8] ASoC: wcd9335: add capture " Srinivas Kandagatla
2019-01-10 15:06 ` [PATCH v5 7/8] ASoC: wcd9335: add audio routings Srinivas Kandagatla
2019-01-10 15:06 ` [PATCH v5 8/8] ASoC: apq8096: add slim support Srinivas Kandagatla
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=20190122184146.GF7579@sirena.org.uk \
--to=broonie@kernel.org \
--cc=alsa-devel@alsa-project.org \
--cc=bgoswami@codeaurora.org \
--cc=devicetree@vger.kernel.org \
--cc=lgirdwood@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=robh+dt@kernel.org \
--cc=srinivas.kandagatla@linaro.org \
--cc=vkoul@kernel.org \
/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
all inboxes | Powered by JetHome®