alsa-devel.alsa-project.org archive mirror
 help / color / mirror / Atom feed
From: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
To: Mark Brown <broonie@kernel.org>, Bard Liao <bardliao@realtek.com>
Cc: Oder Chiou <oder_chiou@realtek.com>,
	"alsa-devel@alsa-project.org" <alsa-devel@alsa-project.org>,
	"lars@metafoo.de" <lars@metafoo.de>,
	"zhengxing@rock-chips.com" <zhengxing@rock-chips.com>,
	"yang.a.fang@intel.com" <yang.a.fang@intel.com>,
	"lgirdwood@gmail.com" <lgirdwood@gmail.com>,
	John Lin <john.lin@realtek.com>,
	Liam Girdwood <liam.r.girdwood@linux.intel.com>,
	"koro.chen@mediatek.com" <koro.chen@mediatek.com>,
	Flove <flove@realtek.com>
Subject: Re: [PATCH 3/3] ASoC: rt5645: add device tree support
Date: Thu, 07 May 2015 13:28:39 -0500	[thread overview]
Message-ID: <554BAED7.4080705@linux.intel.com> (raw)
In-Reply-To: <20150507125142.GW15510@sirena.org.uk>

On 5/7/15 7:51 AM, Mark Brown wrote:
> On Thu, May 07, 2015 at 05:34:27AM +0000, Bard Liao wrote:
>
>>>> We should really be using device_property_() instead of of_property_()
>>>> APIs since we will have to support both DT and ACPI properties.
>
>> Unfortunately, I can't find a way to test it.
>
> Why can't you test it - weren't you testing your original version of the
> code?

You can test it on an platform using device tree, the device_property_ 
code will fetch the same information as before.
If you want to test on an ACPI platform, I can help with some examples 
(off-list) showing how to override the DSDT table and to add those 
properties in an ASL device entry. You may not be able to test all the 
configurations but at least you can add basic checks that show the data 
is passed from ACPI to your driver. I used all this stuff for a proof of 
concept on AsusT100 where the audio routing in the machine driver is 
passed from ACPI.

>
>> Is that ok we just replace all of_property_ with device_property_?
>> Also, is there any corresponding API for of_get_named_gpio?
>> Or we can replace it with device_property_read_u32?
>> I tried the change above, and it can build. However I don't know
>> if it can work.
>
> You shouldn't be using of_get_named_gpio() for DT stuff either, use
> gpiod_get() which follows the usual pattern of taking a string which is
> used to do the lookup with whatever firmware is in use.

But to Bard's credit the use of_get_named_gpio() is pretty common - i 
see 18 occurrences in soc/codecs alone, others will have the same 
problem...
we talked internally (RafaelW, Darren Hart, LiamG and me) about reaching 
out to gpio and audio maintainers and aligning some sort of coordinated 
change to the gpiod framework w/ guidance to developers, did that thread 
start?

  reply	other threads:[~2015-05-07 18:28 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-05-05 13:42 [PATCH 1/3] ASoC: rt5645: fix add missing widget Bard Liao
2015-05-05 13:42 ` [PATCH 2/3] ASoC: rt5645: remove unused field in pdata Bard Liao
2015-05-06 17:50   ` Mark Brown
2015-05-05 13:42 ` [PATCH 3/3] ASoC: rt5645: add device tree support Bard Liao
2015-05-05 14:45   ` Liam Girdwood
2015-05-06  6:42     ` Bard Liao
2015-05-07  5:34     ` Bard Liao
2015-05-07 11:26       ` Liam Girdwood
2015-05-07 17:07         ` Rafael J. Wysocki
     [not found]           ` <20150508081339.GP1541@lahna.fi.intel.com>
2015-05-08 10:25             ` Mark Brown
2015-05-07 12:51       ` Mark Brown
2015-05-07 18:28         ` Pierre-Louis Bossart [this message]
2015-05-07 18:36           ` Mark Brown
2015-05-08 13:30             ` Pierre-Louis Bossart
2015-05-08 16:46               ` Mark Brown
2015-05-08 19:05                 ` Pierre-Louis Bossart
2015-05-06 17:48 ` [PATCH 1/3] ASoC: rt5645: fix add missing widget 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=554BAED7.4080705@linux.intel.com \
    --to=pierre-louis.bossart@linux.intel.com \
    --cc=alsa-devel@alsa-project.org \
    --cc=bardliao@realtek.com \
    --cc=broonie@kernel.org \
    --cc=flove@realtek.com \
    --cc=john.lin@realtek.com \
    --cc=koro.chen@mediatek.com \
    --cc=lars@metafoo.de \
    --cc=lgirdwood@gmail.com \
    --cc=liam.r.girdwood@linux.intel.com \
    --cc=oder_chiou@realtek.com \
    --cc=yang.a.fang@intel.com \
    --cc=zhengxing@rock-chips.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).