From: Nicholas Johnson <nicholas.johnson-opensource@outlook.com.au>
To: "linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Cc: Mika Westerberg <mika.westerberg@linux.intel.com>,
Srinivas Kandagatla <srinivas.kandagatla@linaro.org>,
Nicholas Johnson <nicholas.johnson-opensource@outlook.com.au>
Subject: [PATCH v1 0/3] nvmem: Add support for write-only instances, and clean-up
Date: Mon, 24 Feb 2020 17:41:30 +0000 [thread overview]
Message-ID: <PSXP216MB043899D4B8F693E1E5C3ECCE80EC0@PSXP216MB0438.KORP216.PROD.OUTLOOK.COM> (raw)
[Based on Linux v5.6-rc3, does not apply successfully to Linux v5.6-rc2]
Hello all,
I offer the first patch in this series to support write-only instances
of nvmem. The use-case is the Thunderbolt driver, for which Mika
Westerberg needs write-only nvmem. Refer to 03cd45d2e219 ("thunderbolt:
Prevent crash if non-active NVMem file is read").
The second patch in this series reverts the workaround 03cd45d2e219
("thunderbolt: Prevent crash if non-active NVMem file is read") which
Mika applied in the mean time to prevent a kernel-mode NULL dereference.
If Mika wants to do this himself or there is some reason not to apply
this, that is fine, but in my mind, it is a logical progression to apply
one after the other in the same series.
The third patch in this series removes the .read_only field, because we
do not have a .write_only field. It only makes sense to have both or
neither. Having either of them makes it hard to be consistent - what
happens if a driver were to set both .read_only and .write_only? And
there is the question of deciding if the nvmem is read-only because of
the .read_only, or based on if the .reg_read is not NULL. What if they
disagree? This patch does touch a lot of files, and I will understand if
you do not wish to apply it. It is optional and does not need to be
applied with the first two.
Thank you in advance for reviewing these.
Kind regards,
Nicholas Johnson (3):
nvmem: Add support for write-only instances
Revert "thunderbolt: Prevent crash if non-active NVMem file is read"
nvmem: Remove .read_only field from nvmem_config
drivers/misc/eeprom/at24.c | 4 +-
drivers/misc/eeprom/at25.c | 4 +-
drivers/misc/eeprom/eeprom_93xx46.c | 4 +-
drivers/mtd/mtdcore.c | 1 -
drivers/nvmem/bcm-ocotp.c | 1 -
drivers/nvmem/core.c | 5 +-
drivers/nvmem/imx-iim.c | 1 -
drivers/nvmem/imx-ocotp-scu.c | 1 -
drivers/nvmem/imx-ocotp.c | 1 -
drivers/nvmem/lpc18xx_otp.c | 1 -
drivers/nvmem/meson-mx-efuse.c | 1 -
drivers/nvmem/nvmem-sysfs.c | 77 ++++++++++++++++++++++++++---
drivers/nvmem/nvmem.h | 1 -
drivers/nvmem/rockchip-efuse.c | 1 -
drivers/nvmem/rockchip-otp.c | 1 -
drivers/nvmem/sc27xx-efuse.c | 1 -
drivers/nvmem/sprd-efuse.c | 1 -
drivers/nvmem/stm32-romem.c | 1 -
drivers/nvmem/sunxi_sid.c | 1 -
drivers/nvmem/uniphier-efuse.c | 1 -
drivers/nvmem/zynqmp_nvmem.c | 1 -
drivers/soc/tegra/fuse/fuse-tegra.c | 1 -
drivers/thunderbolt/switch.c | 8 ---
drivers/w1/slaves/w1_ds250x.c | 1 -
include/linux/nvmem-provider.h | 2 -
25 files changed, 77 insertions(+), 45 deletions(-)
--
2.25.1
next reply other threads:[~2020-02-24 17:41 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-02-24 17:41 Nicholas Johnson [this message]
2020-02-24 17:42 ` [PATCH v1 1/3] nvmem: Add support for write-only instances Nicholas Johnson
2020-02-25 12:51 ` Mika Westerberg
2020-02-25 15:30 ` Nicholas Johnson
2020-02-25 15:43 ` Mika Westerberg
2020-02-27 14:46 ` Nicholas Johnson
2020-02-24 17:43 ` [PATCH v1 2/3] Revert "thunderbolt: Prevent crash if non-active NVMem file is read" Nicholas Johnson
2020-02-25 12:56 ` Mika Westerberg
2020-02-25 15:33 ` Nicholas Johnson
2020-02-25 15:44 ` Mika Westerberg
2020-02-24 17:43 ` [PATCH v1 3/3] nvmem: Remove .read_only field from nvmem_config Nicholas Johnson
2020-02-25 1:19 ` kbuild test robot
2020-02-25 10:49 ` Nicholas Johnson
2020-02-25 14:59 ` [PATCH v1 0/3] nvmem: Add support for write-only instances, and clean-up Srinivas Kandagatla
2020-02-25 15:23 ` Nicholas Johnson
2020-02-25 17:04 ` Srinivas Kandagatla
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=PSXP216MB043899D4B8F693E1E5C3ECCE80EC0@PSXP216MB0438.KORP216.PROD.OUTLOOK.COM \
--to=nicholas.johnson-opensource@outlook.com.au \
--cc=linux-kernel@vger.kernel.org \
--cc=mika.westerberg@linux.intel.com \
--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).