alsa-devel.alsa-project.org archive mirror
 help / color / mirror / Atom feed
From: Mark Brown <broonie@kernel.org>
To: John Keeping <john@metanate.com>
Cc: Oder Chiou <oder_chiou@realtek.com>,
	alsa-devel@alsa-project.org, Takashi Iwai <tiwai@suse.com>,
	Jie Yang <yang.jie@linux.intel.com>,
	linux-kernel@vger.kernel.org, Liam Girdwood <lgirdwood@gmail.com>,
	Ben Zhang <benzh@chromium.org>, Bard Liao <bardliao@realtek.com>,
	Dylan Reid <dgreid@chromium.org>
Subject: Re: [PATCH 1/2] ASoC: rt5677: Add ACPI support
Date: Tue, 16 Aug 2016 18:20:06 +0100	[thread overview]
Message-ID: <20160816172006.GW9347@sirena.org.uk> (raw)
In-Reply-To: <20160814111823.1782-2-john@metanate.com>


[-- Attachment #1.1: Type: text/plain, Size: 1332 bytes --]

On Sun, Aug 14, 2016 at 12:18:22PM +0100, John Keeping wrote:

> The Chromebook Pixel 2015 uses this codec with the ACPI ID RT5677CE, so
> add an ACPI match table and support for reading properties from ACPI.

This would be a lot easier to review with a concrete description of what
"support for reading properties from ACPI" means and probably also split
out a bit so that different things were being added separately.

> +/* GPIO indexes defined by ACPI */
> +enum {
> +	RT5677_GPIO_PLUG_DET,
> +	RT5677_GPIO_MIC_PRESENT_L,
> +	RT5677_GPIO_HOTWORD_DET_L,
> +	RT5677_GPIO_DSP_INT,
> +	RT5677_GPIO_HP_AMP_SHDN_L,
> +};

If these are an ABI you should explicitly assign the values so that they
can't get remapped by future edits.  If they're not an ABI I don't
understand the comment.

> +	if (ACPI_HANDLE(dev)) {
> +		u32 val;
> +
> +		if (!device_property_read_u32(dev, "DCLK", &val))
> +			rt5677->pdata.dmic2_clk_pin = val;
> +
> +		rt5677->pdata.in1_diff = device_property_read_bool(dev, "IN1");
> +		rt5677->pdata.in2_diff = device_property_read_bool(dev, "IN2");

What happens if someone makes a machine which uses the DT<->ACPI
mappings (especially given that this is currently undocumented)?  That
would not work which defeats the whole purpose of using the device
property APIs.  Shouldn't we be accepting either property?

[-- Attachment #1.2: signature.asc --]
[-- Type: application/pgp-signature, Size: 473 bytes --]

[-- Attachment #2: Type: text/plain, Size: 0 bytes --]



  reply	other threads:[~2016-08-16 17:20 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-08-14 11:18 [PATCH 0/2] ASoC: Chromebook Pixel 2015 support John Keeping
2016-08-14 11:18 ` [PATCH 1/2] ASoC: rt5677: Add ACPI support John Keeping
2016-08-16 17:20   ` Mark Brown [this message]
2016-08-17 10:05     ` John Keeping
2016-08-14 11:18 ` [PATCH 2/2] ASoC: Intel: boards: Add bdw-rt5677 machine driver John Keeping
2016-08-17 16:20   ` John Keeping
2016-08-24 21:06 ` [PATCH v2 0/2] ASoC: Chromebook Pixel 2015 audio support John Keeping
2016-08-24 21:06   ` [PATCH v2 1/2] ASoC: rt5677: Add ACPI support John Keeping
2016-08-29 12:24     ` Tom Rini
2016-09-25  5:57     ` Applied "ASoC: rt5677: Add ACPI support" to the asoc tree Mark Brown
2016-08-24 21:06   ` [PATCH v2 2/2] ASoC: Intel: boards: Add bdw-rt5677 machine driver John Keeping
2016-08-29 12:25     ` Tom Rini
2016-09-25  5:57     ` Applied "ASoC: Intel: boards: Add bdw-rt5677 machine driver" to the asoc tree Mark Brown
2016-09-05 14:34   ` [PATCH v2 0/2] ASoC: Chromebook Pixel 2015 audio support John Keeping
2016-09-14 13:11     ` 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=20160816172006.GW9347@sirena.org.uk \
    --to=broonie@kernel.org \
    --cc=alsa-devel@alsa-project.org \
    --cc=bardliao@realtek.com \
    --cc=benzh@chromium.org \
    --cc=dgreid@chromium.org \
    --cc=john@metanate.com \
    --cc=lgirdwood@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=oder_chiou@realtek.com \
    --cc=tiwai@suse.com \
    --cc=yang.jie@linux.intel.com \
    /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;
as well as URLs for NNTP newsgroup(s).