From: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
To: Adam Thomson <Adam.Thomson.Opensource@diasemi.com>,
"alsa-devel@alsa-project.org" <alsa-devel@alsa-project.org>
Cc: "tiwai@suse.de" <tiwai@suse.de>,
"vinod.koul@intel.com" <vinod.koul@intel.com>,
"broonie@kernel.org" <broonie@kernel.org>
Subject: Re: [PATCH 1/5] ASoC: da7213: add ACPI support
Date: Mon, 13 Mar 2017 14:07:55 -0500 [thread overview]
Message-ID: <5c0818d5-13c3-10e5-71da-7e7ec6ab3d3d@linux.intel.com> (raw)
In-Reply-To: <2E89032DDAA8B9408CB92943514A03370142A9AD76@SW-EX-MBX01.diasemi.com>
On 3/13/17 11:10 AM, Adam Thomson wrote:
> On 10 March 2017 00:19, Pierre-Louis Bossart wrote:
>
>> Add DLGS7212 and DLGS7213 HID
>>
>> Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
>> ---
>> sound/soc/codecs/da7213.c | 13 +++++++++++++
>> 1 file changed, 13 insertions(+)
>>
>> diff --git a/sound/soc/codecs/da7213.c b/sound/soc/codecs/da7213.c
>> index 12da558..6dd7578 100644
>> --- a/sound/soc/codecs/da7213.c
>> +++ b/sound/soc/codecs/da7213.c
>> @@ -12,6 +12,7 @@
>> * option) any later version.
>> */
>>
>> +#include <linux/acpi.h>
>> #include <linux/clk.h>
>> #include <linux/delay.h>
>> #include <linux/i2c.h>
>> @@ -1528,12 +1529,23 @@ static int da7213_set_bias_level(struct snd_soc_codec
>> *codec,
>> return 0;
>> }
>>
>> +#if defined(CONFIG_OF)
>> /* DT */
>> static const struct of_device_id da7213_of_match[] = {
>> { .compatible = "dlg,da7213", },
>> { }
>> };
>> MODULE_DEVICE_TABLE(of, da7213_of_match);
>> +#endif
>> +
>> +#ifdef CONFIG_ACPI
>> +static const struct acpi_device_id da7213_acpi_match[] = {
>> + { "DLGS7212", 0},
>> + { "DLGS7213", 0},
>> + { },
>> +};
>> +MODULE_DEVICE_TABLE(acpi, da7213_acpi_match);
>> +#endif
>
> The #ifdefs aren't strictly necessary here so might be cleaner to remove them.
Looks like Mark applied the patch already. We've had all sort of reports
in the past that everything need to build without ACPI so I prefer to
err on the cautious side.
>
>>
>> static enum da7213_micbias_voltage
>> da7213_of_micbias_lvl(struct snd_soc_codec *codec, u32 val)
>> @@ -1844,6 +1856,7 @@ static struct i2c_driver da7213_i2c_driver = {
>> .driver = {
>> .name = "da7213",
>> .of_match_table = of_match_ptr(da7213_of_match),
>> + .acpi_match_table = ACPI_PTR(da7213_acpi_match),
>> },
>> .probe = da7213_i2c_probe,
>> .remove = da7213_remove,
>> --
>> 2.7.4
>
> As a general comment, it would be nice if the current of_property_read_* calls
> could be converted to device_property_read_* calls instead, so both ACPI and DT
> initialisation of bindings is supported.
It's something we can test with the MinnowBoard by just adding _DSD
properties to the ACPI definitions. But I am not too hot on doing this
myself since I have no ARM platform to test for non-regressions.
next prev parent reply other threads:[~2017-03-13 19:08 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-03-10 0:18 [PATCH 0/5] MinnowBoard MAX support for DA7212 Pierre-Louis Bossart
2017-03-10 0:18 ` [PATCH 1/5] ASoC: da7213: add ACPI support Pierre-Louis Bossart
2017-03-13 16:10 ` Adam Thomson
2017-03-13 19:07 ` Pierre-Louis Bossart [this message]
2017-03-13 22:43 ` Adam Thomson
2017-03-13 16:58 ` Applied "ASoC: da7213: add ACPI support" to the asoc tree Mark Brown
2017-03-10 0:18 ` [PATCH 2/5] ASoC: Intel: add machine driver for BYT/CHT + DA7213 Pierre-Louis Bossart
2017-03-13 16:58 ` Applied "ASoC: Intel: add machine driver for BYT/CHT + DA7213" to the asoc tree Mark Brown
2017-03-10 0:19 ` [PATCH 3/5] ASoC: Intel: Atom: enable BYT/CHT+DA7213 machine driver Pierre-Louis Bossart
2017-03-13 16:58 ` Applied "ASoC: Intel: Atom: enable BYT/CHT+DA7213 machine driver" to the asoc tree Mark Brown
2017-03-10 0:19 ` [PATCH 4/5] ASoC: Intel: boards: add card for MinnowBoardMax/Up I2S access Pierre-Louis Bossart
2017-03-13 16:58 ` Applied "ASoC: Intel: boards: add card for MinnowBoardMax/Up I2S access" to the asoc tree Mark Brown
2017-03-10 0:19 ` [PATCH 5/5] ASoC: Intel: Enable bytcht_nocodec machine driver Pierre-Louis Bossart
2017-03-13 16:57 ` Applied "ASoC: Intel: Enable bytcht_nocodec machine driver" to the asoc tree Mark Brown
2017-03-10 4:17 ` [PATCH 0/5] MinnowBoard MAX support for DA7212 Vinod Koul
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=5c0818d5-13c3-10e5-71da-7e7ec6ab3d3d@linux.intel.com \
--to=pierre-louis.bossart@linux.intel.com \
--cc=Adam.Thomson.Opensource@diasemi.com \
--cc=alsa-devel@alsa-project.org \
--cc=broonie@kernel.org \
--cc=tiwai@suse.de \
--cc=vinod.koul@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).