From: Mark Brown <broonie@kernel.org>
To: Adam Thomson <Adam.Thomson.Opensource@diasemi.com>
Cc: Liam Girdwood <lgirdwood@gmail.com>,
Jaroslav Kysela <perex@perex.cz>, Takashi Iwai <tiwai@suse.com>,
alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org,
Support Opensource <support.opensource@diasemi.com>,
Sathyanarayana Nujella <sathyanarayana.nujella@intel.com>
Subject: Re: [PATCH 2/3] ASoC: da7219: Add ACPI parsing support
Date: Fri, 6 May 2016 13:39:09 +0100 [thread overview]
Message-ID: <20160506123909.GT6292@sirena.org.uk> (raw)
In-Reply-To: <bb23ba754ed1f51c9b20ccd4a2b87520ce7c1893.1462285398.git.Adam.Thomson.Opensource@diasemi.com>
[-- Attachment #1: Type: text/plain, Size: 1677 bytes --]
On Thu, May 05, 2016 at 11:53:05AM +0100, Adam Thomson wrote:
> @@ -27,7 +28,6 @@
> #include "da7219.h"
> #include "da7219-aad.h"
>
> -
> /*
> * Detection control
> */
Random whitespace change.
> static struct fwnode_handle *da7219_aad_of_named_fwhandle(struct device *dev,
> const char *name)
> {
> @@ -551,6 +571,9 @@ static struct fwnode_handle *da7219_aad_of_named_fwhandle(struct device *dev,
> of_node = to_of_node(child);
> if (of_node_cmp(of_node->name, name) == 0)
> return child;
> + } else if (is_acpi_data_node(child)) {
> + if (da7219_aad_of_acpi_node_matched(child, name))
> + return child;
> }
> }
>
This seems messy. It is a function with a DT specific name that's
matching ACPI stuff and the fwnode API isn't hiding anything for us
which suggests this isn't something that's expected to work
transparently. At least the naming needs to be corrected, and if this
*is* supposed to be something we do in ACPI I'd expect the handling to
be pushed into the fwnode API rather than open coded in a driver - at
the minute I'm unsure if this is messy because it's a bad idea to do
this at all or if it's just the naming and so on.
> - /* Handle any DT/platform data */
> - if ((codec->dev->of_node) && (da7219->pdata))
> + /* Handle any DT/ACPI/platform data */
> + if (((codec->dev->of_node) || is_acpi_node(codec->dev->fwnode)) &&
> + (da7219->pdata))
> da7219->pdata->aad_pdata = da7219_aad_of_to_pdata(codec);
>
> da7219_aad_handle_pdata(codec);
Surely we should be able to check if there's firmware data without
enumerating every possible firmware type?
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 473 bytes --]
next prev parent reply other threads:[~2016-05-06 12:39 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-05-05 10:53 [PATCH 0/3] ASoC: da7219: Add ACPI initialisation support to driver Adam Thomson
2016-05-05 10:53 ` [PATCH 1/3] ASoC: da7219: Convert driver to use generic device/fwnode functions Adam Thomson
2016-05-06 12:26 ` Mark Brown
2016-05-06 14:33 ` Opensource [Adam Thomson]
2016-05-06 16:05 ` Mark Brown
2016-05-09 12:05 ` Opensource [Adam Thomson]
2016-05-09 14:56 ` Mark Brown
2016-05-05 10:53 ` [PATCH 2/3] ASoC: da7219: Add ACPI parsing support Adam Thomson
2016-05-06 12:39 ` Mark Brown [this message]
2016-05-06 14:45 ` Opensource [Adam Thomson]
2016-05-06 16:42 ` Mark Brown
2016-05-05 10:53 ` [PATCH 3/3] ASoC: da7219: Add initial ACPI id for device Adam Thomson
2016-06-10 10:18 ` [PATCH 0/3] ASoC: da7219: Add ACPI initialisation support to driver Opensource [Adam Thomson]
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=20160506123909.GT6292@sirena.org.uk \
--to=broonie@kernel.org \
--cc=Adam.Thomson.Opensource@diasemi.com \
--cc=alsa-devel@alsa-project.org \
--cc=lgirdwood@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=perex@perex.cz \
--cc=sathyanarayana.nujella@intel.com \
--cc=support.opensource@diasemi.com \
--cc=tiwai@suse.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
all inboxes | Powered by JetHome®