Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1335734

Re: [RFC v1 2/9] ASoC: msm8x16: add driver structure

From Mark Brown <broonie@kernel.org>
Newsgroups linux.kernel
Subject Re: [RFC v1 2/9] ASoC: msm8x16: add driver structure
Date 2016-02-16 20:20 +0100
Message-ID <r2Tke-3E0-9@gated-at.bofh.it> (permalink)
References <r2RLr-2yT-5@gated-at.bofh.it> <r2RLu-2yT-43@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


[Multipart message — attachments visible in raw view] - view raw

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.

Back to linux.kernel | Previous | NextPrevious in thread | Find similar | Unroll thread


Thread

[RFC v1 0/9] ASoC: Add support to Qualcomm msm8x16-wcd codec Srinivas Kandagatla <srinivas.kandagatla@linaro.org> - 2016-02-16 18:40 +0100
  [RFC v1 2/9] ASoC: msm8x16: add driver structure Srinivas Kandagatla <srinivas.kandagatla@linaro.org> - 2016-02-16 18:40 +0100
    Re: [RFC v1 2/9] ASoC: msm8x16: add driver structure Mark Brown <broonie@kernel.org> - 2016-02-16 20:20 +0100

csiph-web