device property: Add functions for accessing node's parents
authorSakari Ailus <sakari.ailus@linux.intel.com>
Thu, 3 Oct 2019 12:32:11 +0000 (15:32 +0300)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Fri, 11 Oct 2019 09:26:55 +0000 (11:26 +0200)
commit87e5e95db31a27d117fbb4a5d464f44adb4c2ee2
tree8169cd9ea74f307d7b31d10fddefccafed9ce813
parenta57b7fb783eb352d91b0bf8391682b30bacae667
device property: Add functions for accessing node's parents

Add two convenience functions for accessing node's parents:

fwnode_count_parents() returns the number of parent nodes a given node
has. fwnode_get_nth_parent() returns node's parent at a given distance
from the node itself.

Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
drivers/base/property.c
include/linux/property.h