devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Ahmad Fatoum <a.fatoum@pengutronix.de>
To: Rob Herring <robh@kernel.org>,
	Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Cc: devicetree@vger.kernel.org, ceggers@arri.de,
	linux-kernel@vger.kernel.org, kernel@pengutronix.de
Subject: Re: [PATCH v3 0/2] nvmem: skip nodes with compatibles other than "nvmem-cell"
Date: Mon, 16 Nov 2020 18:04:26 +0100	[thread overview]
Message-ID: <adb40d7d-c5e9-19b7-a561-10c33a6cf8ab@pengutronix.de> (raw)
In-Reply-To: <3f050e96-8bd3-a77e-b1cf-1739a1be0c2d@pengutronix.de>

Hello Rob,
Hello Srini,

On 02.11.20 16:23, Ahmad Fatoum wrote:
>>> I think instead, nvmem cells should be contained within a partition. 
>>> The partition should then have a compatible to indicate it contains 
>>> nvmem cells.
>>
>> I thought I had understood what needs to be done, but now that I finally have time
>> to do it, I see that this only solves the second issue "extending the NVMEM binding
>> to nodes that already have other child nodes, e.g., MTD and its partitions".
>>
>> The first issue: "future extension of e.g. eeprom nodes by any child nodes other than
>> nvmem cells" isn't solved by having a containing partition.
>>
>>
>> My issue is that the bootloader fixes up a partitions { compatible = "fixed-partitions"; }
>> child node into the kernel device tree. The NVMEM core driver tries to parse all eeprom child
>> nodes as cells and will make the driver probe of the EEPROM fail, because it can't parse that
>> fixed-partitions node as a nvmem cell.
>>
>> To allow for co-existence of NVMEM cells and other subnodes, would following patch be
>> acceptable to you and Srini?
> 
> Gentle ping. Would the patch below be acceptable?

Did you have time to look at this?

> 
>>
>> ---------------------------------------- 8< --------------------------------------
>> --- a/Documentation/devicetree/bindings/nvmem/nvmem.yaml
>> +++ b/Documentation/devicetree/bindings/nvmem/nvmem.yaml
>> @@ -45,7 +45,15 @@ properties:
>>  patternProperties:
>>    "^.*@[0-9a-f]+$":
>>      type: object
>> -
>> +    if:
>> +      not:
>> +        properties:
>> +          compatible:
>> +    then:
>> +      $ref: "#/definitions/nvmem-cell"
>> +
>> +definitions:
>> +  nvmem-cell:
>>      properties:
>>        reg:
>>          maxItems: 1
> 
> Cheers,
> Ahmad
> 

-- 
Pengutronix e.K.                           |                             |
Steuerwalder Str. 21                       | http://www.pengutronix.de/  |
31137 Hildesheim, Germany                  | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

  reply	other threads:[~2020-11-16 17:04 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-04-28 11:18 [PATCH v3 0/2] nvmem: skip nodes with compatibles other than "nvmem-cell" Ahmad Fatoum
2020-04-28 11:18 ` [PATCH v3 1/2] dt-bindings: " Ahmad Fatoum
2020-05-08  6:56   ` Ahmad Fatoum
2020-05-12 14:18 ` [PATCH v3 0/2] " Rob Herring
2020-10-12 15:36   ` Ahmad Fatoum
2020-11-02 15:23     ` Ahmad Fatoum
2020-11-16 17:04       ` Ahmad Fatoum [this message]
2020-11-16 17:21         ` Srinivas Kandagatla
2020-11-16 17:28           ` Ahmad Fatoum

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=adb40d7d-c5e9-19b7-a561-10c33a6cf8ab@pengutronix.de \
    --to=a.fatoum@pengutronix.de \
    --cc=ceggers@arri.de \
    --cc=devicetree@vger.kernel.org \
    --cc=kernel@pengutronix.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=robh@kernel.org \
    --cc=srinivas.kandagatla@linaro.org \
    /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;
as well as URLs for NNTP newsgroup(s).