mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
To: Ahmad Fatoum <a.fatoum@pengutronix.de>
Cc: kernel@pengutronix.de, ceggers@arri.de, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v3 2/2] nvmem: core: skip nodes with compatibles other than "nvmem-cell"
Date: Mon, 11 May 2020 12:33:47 +0100	[thread overview]
Message-ID: <d03d60b0-1907-1aaf-bc98-3ae9869194df@linaro.org> (raw)
In-Reply-To: <20200428111829.2215-3-a.fatoum@pengutronix.de>



On 28/04/2020 12:18, Ahmad Fatoum wrote:
> The nvmem cell binding used to apply to all objects which match
> "^.*@[0-9a-f]+$", without taking a compatible into account, which
> precluded extension of EEPROMs by child nodes other than nvmem.
> 
> A previous commit changed the binding, so that nvmem cells that
> feature a compatible property must have "nvmem-cell" as the value,
> otherwise they are skipped.
> 
> Adjust the driver to observe the new binding change. This change
> does not change behavior for any device tree that was already
> compliant with the nvmem binding.
> 
> Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>

Thanks for the patch, this looks good to me, lets wait for Rob to ack 
the bindings!

--srini
> ---
>   drivers/nvmem/core.c | 4 ++++
>   1 file changed, 4 insertions(+)
> 
> diff --git a/drivers/nvmem/core.c b/drivers/nvmem/core.c
> index 05c6ae4b0b97..eb697f5ad07d 100644
> --- a/drivers/nvmem/core.c
> +++ b/drivers/nvmem/core.c
> @@ -547,6 +547,10 @@ static int nvmem_add_cells_from_of(struct nvmem_device *nvmem)
>   	parent = dev->of_node;
>   
>   	for_each_child_of_node(parent, child) {
> +		if (of_find_property(child, "compatible", NULL) &&
> +		    !of_device_is_compatible(child, "nvmem-cell"))
> +			continue;
> +
>   		addr = of_get_property(child, "reg", &len);
>   		if (!addr || (len < 2 * sizeof(u32))) {
>   			dev_err(dev, "nvmem: invalid reg on %pOF\n", child);
> 

  reply	other threads:[~2020-05-11 11:33 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-04-28 11:18 [PATCH v3 0/2] nvmem: " Ahmad Fatoum
2020-04-28 11:18 ` [PATCH v3 1/2] dt-bindings: " Ahmad Fatoum
2020-05-08  6:56   ` Ahmad Fatoum
2020-04-28 11:18 ` [PATCH v3 2/2] nvmem: core: " Ahmad Fatoum
2020-05-11 11:33   ` Srinivas Kandagatla [this message]
2020-12-30 13:43   ` Kamel Bouhara
2021-01-18 13:25     ` Ahmad Fatoum
2020-05-12 14:18 ` [PATCH v3 0/2] nvmem: " Rob Herring
2020-10-12 15:36   ` Ahmad Fatoum
2020-11-02 15:23     ` Ahmad Fatoum
2020-11-16 17:04       ` Ahmad Fatoum
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=d03d60b0-1907-1aaf-bc98-3ae9869194df@linaro.org \
    --to=srinivas.kandagatla@linaro.org \
    --cc=a.fatoum@pengutronix.de \
    --cc=ceggers@arri.de \
    --cc=kernel@pengutronix.de \
    --cc=linux-kernel@vger.kernel.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

all inboxes | Powered by JetHome®