From: Mark Brown <broonie@kernel.org>
To: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Cc: Patrick Lai <plai@codeaurora.org>,
Rob Herring <robh+dt@kernel.org>, Pawel Moll <pawel.moll@arm.com>,
Ian Campbell <ijc+devicetree@hellion.org.uk>,
Kumar Gala <galak@codeaurora.org>,
Banajit Goswami <bgoswami@codeaurora.org>,
Kenneth Westfield <kwestfie@codeaurora.org>,
Liam Girdwood <lgirdwood@gmail.com>,
Jaroslav Kysela <perex@perex.cz>, Takashi Iwai <tiwai@suse.de>,
devicetree@vger.kernel.org, linux-kernel@vger.kernel.org,
alsa-devel@alsa-project.org, linux-arm-msm@vger.kernel.org
Subject: Re: [PATCH v4 2/3] ASoC: qcom: add apq8016 sound card support
Date: Tue, 2 Jun 2015 20:55:06 +0100 [thread overview]
Message-ID: <20150602195506.GJ14071@sirena.org.uk> (raw)
In-Reply-To: <1432310047-5316-1-git-send-email-srinivas.kandagatla@linaro.org>
[-- Attachment #1: Type: text/plain, Size: 1473 bytes --]
On Fri, May 22, 2015 at 04:54:07PM +0100, Srinivas Kandagatla wrote:
> + if (cpu_dai->id == MI2S_QUATERNARY) {
> + /* Configure the Quat MI2S to TLMM */
> + writel(readl(pdata->mic_iomux) |
> + MIC_CTRL_QUA_WS_SLAVE_SEL_10 |
> + MIC_CTRL_TLMM_SCLK_EN,
> + pdata->mic_iomux);
> +
> + return 0;
> + } else if (cpu_dai->id == MI2S_PRIMARY) {
This looks like you're trying to write a switch statement. It's also
somewhat unclear to me that this should be in a machine driver and not
in a CODEC/aux driver that gets pulled in by a machine driver, I can't
be entirely sure what this is controlling.
> + if (of_property_read_bool(np, "external"))
> + name = "HDMI";
> +
> + else
> + name = "Headset";
Coding style. I'm also a bit concerned about the binding here -
headsets sound external too?
> + card->dev = dev;
> + data = apq8016_sbc_parse_of(card);
We parse the DT here and then...
> + ret = snd_soc_of_parse_card_name(card, "qcom,model");
> + if (ret) {
> + dev_err(&pdev->dev, "Error parsing card name: %d\n", ret);
> + return ret;
> + }
...this other bit of DT here.
> + ret = devm_snd_soc_register_card(&pdev->dev, card);
> + if (ret == -EPROBE_DEFER) {
> + card->dev = NULL;
> + return ret;
> + } else if (ret) {
> + dev_err(&pdev->dev, "Error registering soundcard: %d\n", ret);
> + return ret;
> + }
If setting card->dev does anything there something is broken, and in
general it's just better form to not special case probe deferral.
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 473 bytes --]
next prev parent reply other threads:[~2015-06-02 19:55 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-05-22 15:52 [PATCH v4 0/3] ASoC: qcom: add support to apq8016 audio Srinivas Kandagatla
2015-05-22 15:53 ` [PATCH v4 1/3] ASoC: qcom: Add apq8016 lpass driver support Srinivas Kandagatla
2015-05-25 14:04 ` Mark Brown
2015-05-22 15:54 ` [PATCH v4 2/3] ASoC: qcom: add apq8016 sound card support Srinivas Kandagatla
2015-06-02 19:55 ` Mark Brown [this message]
2015-06-03 8:11 ` Srinivas Kandagatla
2015-05-22 15:54 ` [PATCH v4 3/3] ASoC: qcom: fix STORM board Kconfig Srinivas Kandagatla
2015-05-22 16:33 ` Arnd Bergmann
2015-05-26 6:58 ` Srinivas Kandagatla
2015-06-02 19:56 ` Mark Brown
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=20150602195506.GJ14071@sirena.org.uk \
--to=broonie@kernel.org \
--cc=alsa-devel@alsa-project.org \
--cc=bgoswami@codeaurora.org \
--cc=devicetree@vger.kernel.org \
--cc=galak@codeaurora.org \
--cc=ijc+devicetree@hellion.org.uk \
--cc=kwestfie@codeaurora.org \
--cc=lgirdwood@gmail.com \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=pawel.moll@arm.com \
--cc=perex@perex.cz \
--cc=plai@codeaurora.org \
--cc=robh+dt@kernel.org \
--cc=srinivas.kandagatla@linaro.org \
--cc=tiwai@suse.de \
/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