From: Walter Lozano <walter.lozano@collabora.com>
To: u-boot@lists.denx.de
Subject: [RFC 3/7] dtoc: update dtb_platdata to support cd-gpio
Date: Mon, 30 Mar 2020 00:31:54 -0300 [thread overview]
Message-ID: <20200330033158.26751-4-walter.lozano@collabora.com> (raw)
In-Reply-To: <20200330033158.26751-1-walter.lozano@collabora.com>
Signed-off-by: Walter Lozano <walter.lozano@collabora.com>
---
tools/dtoc/dtb_platdata.py | 9 ++++++---
1 file changed, 6 insertions(+), 3 deletions(-)
diff --git a/tools/dtoc/dtb_platdata.py b/tools/dtoc/dtb_platdata.py
index 037e82c8bb..c52da7925e 100644
--- a/tools/dtoc/dtb_platdata.py
+++ b/tools/dtoc/dtb_platdata.py
@@ -211,7 +211,7 @@ class DtbPlatdata(object):
Return:
Number of argument cells is this is a phandle, else None
"""
- if prop.name in ['clocks']:
+ if prop.name in ['clocks', 'cd-gpios']:
if not isinstance(prop.value, list):
prop.value = [prop.value]
val = prop.value
@@ -231,8 +231,11 @@ class DtbPlatdata(object):
if not target:
raise ValueError("Cannot parse '%s' in node '%s'" %
(prop.name, node_name))
- prop_name = '#clock-cells'
- cells = target.props.get(prop_name)
+ cells = None
+ for prop_name in ['#clock-cells', '#gpio-cells']:
+ cells = target.props.get(prop_name)
+ if cells:
+ break
if not cells:
raise ValueError("Node '%s' has no '%s' property" %
(target.name, prop_name))
--
2.20.1
next prev parent reply other threads:[~2020-03-30 3:31 UTC|newest]
Thread overview: 28+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-03-30 3:31 [RFC 0/7] mx6cuboxi: enable OF_PLATDATA with MMC support Walter Lozano
2020-03-30 3:31 ` [RFC 1/7] mmc: fsl_esdhc_imx: add OF_PLATDATA support Walter Lozano
2020-04-06 3:42 ` Simon Glass
2020-04-07 20:05 ` Walter Lozano
2020-04-08 3:14 ` Simon Glass
2020-04-09 19:06 ` Walter Lozano
2020-04-09 19:36 ` Simon Glass
2020-04-09 19:44 ` Walter Lozano
2020-04-09 19:50 ` Simon Glass
2020-04-09 20:01 ` Walter Lozano
2020-04-17 20:05 ` Walter Lozano
2020-04-21 17:44 ` Simon Glass
2020-03-30 3:31 ` [RFC 2/7] mmc: fsl_esdhc_imx: add ofdata_to_platdata support Walter Lozano
2020-04-06 3:42 ` Simon Glass
2020-04-07 20:05 ` Walter Lozano
2020-03-30 3:31 ` Walter Lozano [this message]
2020-04-06 3:42 ` [RFC 3/7] dtoc: update dtb_platdata to support cd-gpio Simon Glass
2020-04-07 20:05 ` Walter Lozano
2020-03-30 3:31 ` [RFC 4/7] dm: uclass: add functions to get device by platdata Walter Lozano
2020-03-30 3:31 ` [RFC 5/7] gpio: mxc_gpio: add OF_PLATDATA support Walter Lozano
2020-04-06 3:42 ` Simon Glass
2020-04-07 20:05 ` Walter Lozano
2020-03-30 3:31 ` [RFC 6/7] mmc: fsl_esdhc_imx: add CD support when OF_PLATDATA is enabled Walter Lozano
2020-03-30 3:31 ` [RFC 7/7] mx6cuboxi: enable OF_PLATDATA Walter Lozano
2020-04-06 3:43 ` Simon Glass
2020-04-07 20:06 ` Walter Lozano
2020-03-30 3:54 ` [RFC 0/7] mx6cuboxi: enable OF_PLATDATA with MMC support Baruch Siach
2020-03-30 14:33 ` Walter Lozano
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=20200330033158.26751-4-walter.lozano@collabora.com \
--to=walter.lozano@collabora.com \
--cc=u-boot@lists.denx.de \
/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