On Tue, Jun 14, 2016 at 8:56 AM, Adam Thomson <Adam.Thomson.Opensource@xxxxxxxxxxx> wrote: > For device nodes in both DT and ACPI, it possible to have named > child nodes which contain properties (an existing example being > gpio-leds). This adds a function to find a named child node for > a device which can be used by drivers for property retrieval. > > For DT data node name matching, of_node_cmp() and similar functions are made > available outside of CONFIG_OF block so the new function can reference these > for DT and non-DT builds. > > For ACPI data node name matching, a helper function is also added > which returns false if CONFIG_ACPI is not set, otherwise it > performs a string comparison on the data node name. This avoids > using the acpi_data_node struct for non CONFIG_ACPI builds, > which would otherwise cause a build failure. > > Signed-off-by: Adam Thomson <Adam.Thomson.Opensource@xxxxxxxxxxx> > Tested-by: Sathyanarayana Nujella <sathyanarayana.nujella@xxxxxxxxx> > --- > > Changes in v3: > - Move of_*_cmp() functions in of.h outside of CONFIG_OF block so they are > available for non-DT builds > - In device_get_named_child_node(), use of_node_cmp() helper macro instead of > strcasecmp() (node names not alway case insensitive, depending on platform). > > Changes in v2: > - Rebase to v4.7-rc1 > > drivers/base/property.c | 28 ++++++++++++++++++++++++++++ > include/acpi/acpi_bus.h | 7 +++++++ > include/linux/acpi.h | 6 ++++++ > include/linux/of.h | 14 +++++++------- > include/linux/property.h | 3 +++ > 5 files changed, 51 insertions(+), 7 deletions(-) Acked-by: Rob Herring <robh@xxxxxxxxxx> -- To unsubscribe from this list: send the line "unsubscribe linux-acpi" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html