[alsa-devel] [RFC v1 2/9] ASoC: msm8x16: add driver structure
Mark Brown
broonie at kernel.org
Tue Feb 16 20:09:58 CET 2016
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.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 473 bytes
Desc: not available
URL: <http://mailman.alsa-project.org/pipermail/alsa-devel/attachments/20160216/9aa8b5c3/attachment.sig>
More information about the Alsa-devel
mailing list