public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
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: Tue, 7 Apr 2020 17:05:32 -0300	[thread overview]
Message-ID: <0fa9f36f-2d2e-665b-e0a2-5cb27586e8b6@collabora.com> (raw)
In-Reply-To: <CAPnjgZ2G5KGQgUqJFNZ9kTYwT9bj_nEY7uWuuUcdKUdqQOduWg@mail.gmail.com>

Hi Simon,

On 6/4/20 00:42, Simon Glass wrote:
> On Sun, 29 Mar 2020 at 21:32, Walter Lozano<walter.lozano@collabora.com>  wrote:
>> Signed-off-by: Walter Lozano<walter.lozano@collabora.com>
>> ---
>>   tools/dtoc/dtb_platdata.py | 9 ++++++---
>>   1 file changed, 6 insertions(+), 3 deletions(-)
> This looks OK, but please add a test.


Noted. Thank you.


>> 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
>>

  reply	other threads:[~2020-04-07 20:05 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 ` [RFC 3/7] dtoc: update dtb_platdata to support cd-gpio Walter Lozano
2020-04-06  3:42   ` Simon Glass
2020-04-07 20:05     ` Walter Lozano [this message]
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=0fa9f36f-2d2e-665b-e0a2-5cb27586e8b6@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