summaryrefslogtreecommitdiffstats
path: root/arch/alpha/kernel/sys_ruffian.c
diff options
context:
space:
mode:
authorUwe Kleine-König <u.kleine-koenig@pengutronix.de>2019-08-24 15:28:46 +0200
committerRob Herring <robh@kernel.org>2019-09-13 23:55:12 +0200
commite42ee61017f58cd91cb9e30001450be3981e0e83 (patch)
treeda39eab543bb68e33f59f138d9f89715dc88f66d /arch/alpha/kernel/sys_ruffian.c
parentiommu: pass cell_count = -1 to of_for_each_phandle with cells_name (diff)
downloadlinux-e42ee61017f58cd91cb9e30001450be3981e0e83.tar.xz
linux-e42ee61017f58cd91cb9e30001450be3981e0e83.zip
of: Let of_for_each_phandle fallback to non-negative cell_count
Referencing device tree nodes from a property allows to pass arguments. This is for example used for referencing gpios. This looks as follows: gpio_ctrl: gpio-controller { #gpio-cells = <2> ... } someothernode { gpios = <&gpio_ctrl 5 0 &gpio_ctrl 3 0>; ... } To know the number of arguments this must be either fixed, or the referenced node is checked for a $cells_name (here: "#gpio-cells") property and with this information the start of the second reference can be determined. Currently regulators are referenced with no additional arguments. To allow some optional arguments without having to change all referenced nodes this change introduces a way to specify a default cell_count. So when a phandle is parsed we check for the $cells_name property and use it as before if present. If it is not present we fall back to cells_count if non-negative and only fail if cells_count is smaller than zero. Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Signed-off-by: Rob Herring <robh@kernel.org>
Diffstat (limited to 'arch/alpha/kernel/sys_ruffian.c')
0 files changed, 0 insertions, 0 deletions