[alsa-devel] [PATCH 2/2] ASoC: rt5677: Switch to use unified device property API

Ben Zhang benzh at google.com
Tue Jun 23 01:07:59 CEST 2015


On Mon, Jun 22, 2015 at 3:50 PM, Mark Brown <broonie at kernel.org> wrote:
> On Tue, Jun 23, 2015 at 12:18:54AM +0200, Pierre-Louis Bossart wrote:
>> On 6/22/15 8:13 PM, Ben Zhang wrote:
>
>> >+    rt5677->pdata.in1_diff = device_property_read_bool(dev,
>> >+                    "realtek,in1-differential");
>
>> Shouldn't it be device_property_present() ?
>
> At least on the DT side they should be equivalent - I don't know if ACPI
> works differently?

I think they are equivalent on the ACPI side as well. device_property_read_bool
is defined as a wrapper of device_property_present in include/linux/property.h.
I tested that the function returns true iff an entry for the property
exists in the _DSD.

For example in1_diff is true when:
Name (_DSD, Package () {
    ToUUID ("daffd814-6eba-4d8c-8a91-bc9bbf4aa301"),
    Package () {
        Package () { "realtek,in1-differential", 1 },
        ....
    }
})

>> thanks for starting this transition, this will be very useful for ACPI-based
>> solutions.
>
> Have the Intel audio people been speaking to the UEFI forum about using
> the new registration process for these properties?  More from interest
> than anything else.


More information about the Alsa-devel mailing list