From: Miquel Raynal <miquel.raynal@bootlin.com>
To: "Rafał Miłecki" <zajec5@gmail.com>
Cc: "Srinivas Kandagatla" <srinivas.kandagatla@linaro.org>,
"Rob Herring" <robh+dt@kernel.org>,
"Krzysztof Kozlowski" <krzysztof.kozlowski+dt@linaro.org>,
"Shawn Guo" <shawnguo@kernel.org>,
"Sascha Hauer" <s.hauer@pengutronix.de>,
"Pengutronix Kernel Team" <kernel@pengutronix.de>,
"Fabio Estevam" <festevam@gmail.com>,
"NXP Linux Team" <linux-imx@nxp.com>,
"Michael Walle" <michael@walle.cc>,
devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org,
linux-kernel@vger.kernel.org, u-boot@lists.denx.de,
"Rafał Miłecki" <rafal@milecki.pl>
Subject: Re: [PATCH V3 1/6] nvmem: core: add nvmem_dev_size() helper
Date: Mon, 30 Jan 2023 11:56:54 +0100 [thread overview]
Message-ID: <20230130115654.0041716d@xps-13> (raw)
In-Reply-To: <20230127125709.32191-1-zajec5@gmail.com>
Hi Rafał,
zajec5@gmail.com wrote on Fri, 27 Jan 2023 13:57:04 +0100:
> From: Rafał Miłecki <rafal@milecki.pl>
>
> This is required by layouts that need to read whole NVMEM space. It
> applies to NVMEM devices without hardcoded layout (like U-Boot
> environment data block).
>
> Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
> ---
> V2: Drop "const" from "const size_t"
It would be good if you could always add a cover-letter, just so that
we can reply to the whole series. In my case I wanted to add a global
Reviewed-by: Miquel Raynal <miquel.raynal@bootlin.com>
Because I gave this series a quick review and it looks good to me.
Thanks,
Miquèl
> ---
> drivers/nvmem/core.c | 13 +++++++++++++
> include/linux/nvmem-consumer.h | 1 +
> 2 files changed, 14 insertions(+)
>
> diff --git a/drivers/nvmem/core.c b/drivers/nvmem/core.c
> index 38a5728bc65c..9e77af0164aa 100644
> --- a/drivers/nvmem/core.c
> +++ b/drivers/nvmem/core.c
> @@ -2063,6 +2063,19 @@ void nvmem_del_cell_lookups(struct nvmem_cell_lookup *entries, size_t nentries)
> }
> EXPORT_SYMBOL_GPL(nvmem_del_cell_lookups);
>
> +/**
> + * nvmem_dev_size() - Get the size of a given nvmem device.
> + *
> + * @nvmem: nvmem device.
> + *
> + * Return: size of the nvmem device.
> + */
> +size_t nvmem_dev_size(struct nvmem_device *nvmem)
> +{
> + return nvmem->size;
> +}
> +EXPORT_SYMBOL_GPL(nvmem_dev_size);
> +
> /**
> * nvmem_dev_name() - Get the name of a given nvmem device.
> *
> diff --git a/include/linux/nvmem-consumer.h b/include/linux/nvmem-consumer.h
> index fa030d93b768..c3005ab6cc4f 100644
> --- a/include/linux/nvmem-consumer.h
> +++ b/include/linux/nvmem-consumer.h
> @@ -78,6 +78,7 @@ ssize_t nvmem_device_cell_read(struct nvmem_device *nvmem,
> int nvmem_device_cell_write(struct nvmem_device *nvmem,
> struct nvmem_cell_info *info, void *buf);
>
> +size_t nvmem_dev_size(struct nvmem_device *nvmem);
> const char *nvmem_dev_name(struct nvmem_device *nvmem);
>
> void nvmem_add_cell_lookups(struct nvmem_cell_lookup *entries,
next prev parent reply other threads:[~2023-01-30 10:57 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-01-27 12:57 [PATCH V3 1/6] nvmem: core: add nvmem_dev_size() helper Rafał Miłecki
2023-01-27 12:57 ` [PATCH V3 2/6] nvmem: core: allow .read_post_process() callbacks to adjust buffer Rafał Miłecki
2023-01-27 12:57 ` [PATCH V3 3/6] dt-bindings: nvmem: convert U-Boot env vars to NVMEM layout Rafał Miłecki
2023-01-27 12:57 ` [PATCH V3 4/6] nvmem: u-boot-env: convert to layout driver Rafał Miłecki
2023-01-27 12:57 ` [PATCH V3 5/6] dt-bindings: nvmem: u-boot, env: add MAC's #nvmem-cell-cells Rafał Miłecki
2023-01-27 12:57 ` [PATCH V3 6/6] nvmem: u-boot-env: post process "ethaddr" env variable Rafał Miłecki
2023-01-30 10:56 ` Miquel Raynal [this message]
2023-01-30 12:34 ` [PATCH V3 1/6] nvmem: core: add nvmem_dev_size() helper Rafał Miłecki
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=20230130115654.0041716d@xps-13 \
--to=miquel.raynal@bootlin.com \
--cc=devicetree@vger.kernel.org \
--cc=festevam@gmail.com \
--cc=kernel@pengutronix.de \
--cc=krzysztof.kozlowski+dt@linaro.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-imx@nxp.com \
--cc=linux-kernel@vger.kernel.org \
--cc=michael@walle.cc \
--cc=rafal@milecki.pl \
--cc=robh+dt@kernel.org \
--cc=s.hauer@pengutronix.de \
--cc=shawnguo@kernel.org \
--cc=srinivas.kandagatla@linaro.org \
--cc=u-boot@lists.denx.de \
--cc=zajec5@gmail.com \
/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