[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20160216190958.GD7544@sirena.org.uk>
Date: Tue, 16 Feb 2016 19:09:58 +0000
From: Mark Brown <broonie@...nel.org>
To: Srinivas Kandagatla <srinivas.kandagatla@...aro.org>
Cc: alsa-devel@...a-project.org, Rob Herring <robh+dt@...nel.org>,
Mark Rutland <mark.rutland@....com>,
Pawel Moll <pawel.moll@....com>,
Patrick Lai <plai@...eaurora.org>,
Liam Girdwood <lgirdwood@...il.com>,
Jaroslav Kysela <perex@...ex.cz>,
Takashi Iwai <tiwai@...e.com>, linux-kernel@...r.kernel.org,
linux-arm-msm@...r.kernel.org, kwestfie@...eaurora.org
Subject: Re: [RFC v1 2/9] ASoC: msm8x16: add driver structure
On Tue, Feb 16, 2016 at 05:32:41PM +0000, Srinivas Kandagatla wrote:
> @@ -195,7 +196,6 @@ snd-soc-wm9705-objs := wm9705.o
> snd-soc-wm9712-objs := wm9712.o
> snd-soc-wm9713-objs := wm9713.o
> snd-soc-wm-hubs-objs := wm_hubs.o
> -
> # Amp
> snd-soc-max9877-objs := max9877.o
> snd-soc-tpa6130a2-objs := tpa6130a2.o
Random whitespace change here.
> + chip->micbias1_cap_mode =
> + (of_property_read_bool(pdev->dev.of_node, ext1_cap) ?
> + MICBIAS_EXT_BYP_CAP : MICBIAS_NO_EXT_BYP_CAP);
Please don't abuse the ternery operator, write code as though people
were going to read it.
> + regs[0].supply = "vddio";
> + regs[1].supply = "vdd-cp";
> + regs[2].supply = "vdd-hph";
> + regs[3].supply = "vdd-tx-rx";
> + regs[4].supply = "vdd-micbias";
> +
> + ret = devm_regulator_bulk_get(dev, ARRAY_SIZE(regs), regs);
> + if (ret) {
> + dev_err(dev, "Failed to get regulator supplies %d\n", ret);
> + return ret;
> + }
> + chip->vddio = regs[0].consumer;
> + chip->vdd_cp = regs[1].consumer;
> + chip->vdd_hph = regs[2].consumer;
> + chip->vdd_tx_rx = regs[3].consumer;
> + chip->vdd_micbias = regs[4].consumer;
Are you *sure* you should be using regulator_bulk_get() here if you
never use the regulators en masse again?
> +static struct snd_soc_dai_driver msm8x16_wcd_codec_dai[] = {
> +};
> +
> +static struct snd_soc_codec_driver msm8x16_wcd_codec = {
> +};
Both empty? It seems this CODEC does nothing so may as well not have a
driver...
> + clk_prepare_enable(chip->mclk);
Error checking.
Download attachment "signature.asc" of type "application/pgp-signature" (474 bytes)
Powered by blists - more mailing lists