From: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
To: Marek Vasut <marex@denx.de>, linux-i2c@vger.kernel.org
Cc: Alexandre Belloni <alexandre.belloni@bootlin.com>,
Arnd Bergmann <arnd@arndb.de>,
Bartosz Golaszewski <brgl@bgdev.pl>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Subject: Re: [PATCH v3 4/4] nvmem: core: Implement force_ro sysfs attribute
Date: Wed, 26 Jun 2024 14:07:19 +0100 [thread overview]
Message-ID: <3e2f38a3-e151-42f1-97ca-b8327ade4acc@linaro.org> (raw)
In-Reply-To: <20240626041214.513242-4-marex@denx.de>
On 26/06/2024 05:11, Marek Vasut wrote:
>
> static const struct attribute_group *nvmem_dev_groups[] = {
> @@ -945,6 +988,7 @@ struct nvmem_device *nvmem_register(const struct nvmem_config *config)
>
> nvmem->read_only = device_property_present(config->dev, "read-only") ||
> config->read_only || !nvmem->reg_write;
> + nvmem->default_read_only = nvmem->read_only;
>
> #ifdef CONFIG_NVMEM_SYSFS
> nvmem->dev.groups = nvmem_dev_groups;
> diff --git a/drivers/nvmem/internals.h b/drivers/nvmem/internals.h
> index 18fed57270e5e..0667937ebb86b 100644
> --- a/drivers/nvmem/internals.h
> +++ b/drivers/nvmem/internals.h
> @@ -16,6 +16,7 @@ struct nvmem_device {
> int id;
> struct kref refcnt;
> size_t size;
> + bool default_read_only;
Its not very clear what is the need for this?
--srini
> bool read_only;
> bool root_only;
> int flags;
next prev parent reply other threads:[~2024-06-26 13:07 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-06-26 4:11 [PATCH v3 1/4] nvmem: Replace spaces with tab in documentation Marek Vasut
2024-06-26 4:11 ` [PATCH v3 2/4] nvmem: Document type attribute Marek Vasut
2024-06-26 4:11 ` [PATCH v3 3/4] nvmem: Use sysfs_emit() for " Marek Vasut
2024-06-26 4:11 ` [PATCH v3 4/4] nvmem: core: Implement force_ro sysfs attribute Marek Vasut
2024-06-26 13:07 ` Srinivas Kandagatla [this message]
2024-06-26 16:07 ` Marek Vasut
2024-06-27 14:58 ` Srinivas Kandagatla
2024-06-27 15:55 ` Marek Vasut
2024-06-27 16:21 ` Srinivas Kandagatla
2024-06-27 23:39 ` Marek Vasut
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=3e2f38a3-e151-42f1-97ca-b8327ade4acc@linaro.org \
--to=srinivas.kandagatla@linaro.org \
--cc=alexandre.belloni@bootlin.com \
--cc=arnd@arndb.de \
--cc=brgl@bgdev.pl \
--cc=gregkh@linuxfoundation.org \
--cc=linux-i2c@vger.kernel.org \
--cc=marex@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