From: srini@kernel.org
To: gregkh@linuxfoundation.org
Cc: linux-kernel@vger.kernel.org,
Bartosz Golaszewski <bartosz.golaszewski@oss.qualcomm.com>,
Wolfram Sang <wsa+renesas@sang-engineering.com>,
Arnd Bergmann <arnd@arndb.de>,
Srinivas Kandagatla <srini@kernel.org>
Subject: [PATCH 10/14] eeprom: move nvmem EEPROM drivers to drivers/nvmem/
Date: Wed, 29 Jul 2026 10:46:43 +0100 [thread overview]
Message-ID: <20260729094647.111468-11-srini@kernel.org> (raw)
In-Reply-To: <20260729094647.111468-1-srini@kernel.org>
From: Bartosz Golaszewski <bartosz.golaszewski@oss.qualcomm.com>
For historical reasons EEPROM drivers have lived under
drivers/misc/eeprom/. Also for historical reasons changes to most of
them would go through the char-misc tree while some would be queued
through the I2C tree. Over the years some of them have also been
converted to using nvmem - the dedicated subsystem for non-volatile
memory - while get_maintainer.pl does not Cc the maintainer of nvmem on
patches changing them.
Move the EEPROM drivers using nvmem under drivers/nvmem/ for
consistency of the review process and path upstream.
Reviewed-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Acked-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@oss.qualcomm.com>
Signed-off-by: Srinivas Kandagatla <srini@kernel.org>
---
MAINTAINERS | 4 +-
drivers/misc/eeprom/Kconfig | 93 -------------------
drivers/misc/eeprom/Makefile | 5 -
drivers/nvmem/Kconfig | 87 +++++++++++++++++
drivers/nvmem/Makefile | 5 +
drivers/{misc/eeprom => nvmem}/at24.c | 0
drivers/{misc/eeprom => nvmem}/at25.c | 0
drivers/{misc/eeprom => nvmem}/ee1004.c | 0
.../{misc/eeprom => nvmem}/eeprom_93xx46.c | 0
drivers/{misc/eeprom => nvmem}/m24lr.c | 0
10 files changed, 94 insertions(+), 100 deletions(-)
rename drivers/{misc/eeprom => nvmem}/at24.c (100%)
rename drivers/{misc/eeprom => nvmem}/at25.c (100%)
rename drivers/{misc/eeprom => nvmem}/ee1004.c (100%)
rename drivers/{misc/eeprom => nvmem}/eeprom_93xx46.c (100%)
rename drivers/{misc/eeprom => nvmem}/m24lr.c (100%)
diff --git a/MAINTAINERS b/MAINTAINERS
index 9ecc4963ea9d..dd08f2c94e63 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -4168,11 +4168,11 @@ F: include/linux/async_tx.h
AT24 EEPROM DRIVER
M: Bartosz Golaszewski <brgl@kernel.org>
-L: linux-i2c@vger.kernel.org
+L: linux-kernel@vger.kernel.org
S: Maintained
T: git git://git.kernel.org/pub/scm/linux/kernel/git/brgl/linux.git
F: Documentation/devicetree/bindings/eeprom/at24.yaml
-F: drivers/misc/eeprom/at24.c
+F: drivers/nvmem/at24.c
ATA OVER ETHERNET (AOE) DRIVER
M: "Justin Sanders" <justin@coraid.com>
diff --git a/drivers/misc/eeprom/Kconfig b/drivers/misc/eeprom/Kconfig
index 4d0ce47aa282..d6af02588c66 100644
--- a/drivers/misc/eeprom/Kconfig
+++ b/drivers/misc/eeprom/Kconfig
@@ -1,52 +1,6 @@
# SPDX-License-Identifier: GPL-2.0-only
menu "EEPROM support"
-config EEPROM_AT24
- tristate "I2C EEPROMs / RAMs / ROMs from most vendors"
- depends on I2C && SYSFS
- select NVMEM
- select NVMEM_SYSFS
- select REGMAP
- select REGMAP_I2C
- help
- Enable this driver to get read/write support to most I2C EEPROMs
- and compatible devices like FRAMs, SRAMs, ROMs etc. After you
- configure the driver to know about each chip on your target
- board. Use these generic chip names, instead of vendor-specific
- ones like at24c64, 24lc02 or fm24c04:
-
- 24c00, 24c01, 24c02, spd (readonly 24c02), 24c04, 24c08,
- 24c16, 24c32, 24c64, 24c128, 24c256, 24c512, 24c1024, 24c2048
-
- Unless you like data loss puzzles, always be sure that any chip
- you configure as a 24c32 (32 kbit) or larger is NOT really a
- 24c16 (16 kbit) or smaller, and vice versa. Marking the chip
- as read-only won't help recover from this. Also, if your chip
- has any software write-protect mechanism you may want to review the
- code to make sure this driver won't turn it on by accident.
-
- If you use this with an SMBus adapter instead of an I2C adapter,
- full functionality is not available. Only smaller devices are
- supported (24c16 and below, max 4 kByte).
-
- This driver can also be built as a module. If so, the module
- will be called at24.
-
-config EEPROM_AT25
- tristate "SPI EEPROMs (FRAMs) from most vendors"
- depends on SPI && SYSFS
- select NVMEM
- select NVMEM_SYSFS
- select SPI_MEM
- help
- Enable this driver to get read/write support to most SPI EEPROMs
- and Cypress FRAMs,
- after you configure the board init code to know about each eeprom
- on your target board.
-
- This driver can also be built as a module. If so, the module
- will be called at25.
-
config EEPROM_MAX6875
tristate "Maxim MAX6874/5 power supply supervisor"
depends on I2C
@@ -69,22 +23,6 @@ config EEPROM_93CX6
If unsure, say N.
-config EEPROM_93XX46
- tristate "Microwire EEPROM 93XX46 support"
- depends on SPI && SYSFS
- select REGMAP
- select NVMEM
- select NVMEM_SYSFS
- help
- Driver for the microwire EEPROM chipsets 93xx46x. The driver
- supports both read and write commands and also the command to
- erase the whole EEPROM.
-
- This driver can also be built as a module. If so, the module
- will be called eeprom_93xx46.
-
- If unsure, say N.
-
config EEPROM_DIGSY_MTC_CFG
bool "DigsyMTC display configuration EEPROMs device"
depends on GPIO_MPC5200 && SPI_GPIO
@@ -107,35 +45,4 @@ config EEPROM_IDT_89HPESX
This driver can also be built as a module. If so, the module
will be called idt_89hpesx.
-config EEPROM_EE1004
- tristate "SPD EEPROMs on DDR4 memory modules"
- depends on I2C && SYSFS
- select NVMEM
- select NVMEM_SYSFS
- help
- Enable this driver to get read support to SPD EEPROMs following
- the JEDEC EE1004 standard. These are typically found on DDR4
- SDRAM memory modules.
-
- This driver can also be built as a module. If so, the module
- will be called ee1004.
-
-config EEPROM_M24LR
- tristate "STMicroelectronics M24LR RFID/NFC EEPROM support"
- depends on I2C && SYSFS
- select REGMAP_I2C
- select NVMEM
- select NVMEM_SYSFS
- help
- This enables support for STMicroelectronics M24LR RFID/NFC EEPROM
- chips. These dual-interface devices expose two I2C addresses:
- one for EEPROM memory access and another for control and system
- configuration (e.g. UID, password handling).
-
- This driver provides a sysfs interface for control functions and
- integrates with the nvmem subsystem for EEPROM access.
-
- To compile this driver as a module, choose M here: the
- module will be called m24lr.
-
endmenu
diff --git a/drivers/misc/eeprom/Makefile b/drivers/misc/eeprom/Makefile
index 8f311fd6a4ce..44a20cf025a1 100644
--- a/drivers/misc/eeprom/Makefile
+++ b/drivers/misc/eeprom/Makefile
@@ -1,10 +1,5 @@
# SPDX-License-Identifier: GPL-2.0
-obj-$(CONFIG_EEPROM_AT24) += at24.o
-obj-$(CONFIG_EEPROM_AT25) += at25.o
obj-$(CONFIG_EEPROM_MAX6875) += max6875.o
obj-$(CONFIG_EEPROM_93CX6) += eeprom_93cx6.o
-obj-$(CONFIG_EEPROM_93XX46) += eeprom_93xx46.o
obj-$(CONFIG_EEPROM_DIGSY_MTC_CFG) += digsy_mtc_eeprom.o
obj-$(CONFIG_EEPROM_IDT_89HPESX) += idt_89hpesx.o
-obj-$(CONFIG_EEPROM_EE1004) += ee1004.o
-obj-$(CONFIG_EEPROM_M24LR) += m24lr.o
diff --git a/drivers/nvmem/Kconfig b/drivers/nvmem/Kconfig
index e10f7ff725ff..b0044c4c63c6 100644
--- a/drivers/nvmem/Kconfig
+++ b/drivers/nvmem/Kconfig
@@ -28,6 +28,93 @@ source "drivers/nvmem/layouts/Kconfig"
# Devices
+if NVMEM_SYSFS
+
+config EEPROM_AT24
+ tristate "I2C EEPROMs / RAMs / ROMs from most vendors"
+ depends on I2C && SYSFS
+ select REGMAP
+ select REGMAP_I2C
+ help
+ Enable this driver to get read/write support to most I2C EEPROMs
+ and compatible devices like FRAMs, SRAMs, ROMs etc. After you
+ configure the driver to know about each chip on your target
+ board. Use these generic chip names, instead of vendor-specific
+ ones like at24c64, 24lc02 or fm24c04:
+
+ 24c00, 24c01, 24c02, spd (readonly 24c02), 24c04, 24c08,
+ 24c16, 24c32, 24c64, 24c128, 24c256, 24c512, 24c1024, 24c2048
+
+ Unless you like data loss puzzles, always be sure that any chip
+ you configure as a 24c32 (32 kbit) or larger is NOT really a
+ 24c16 (16 kbit) or smaller, and vice versa. Marking the chip
+ as read-only won't help recover from this. Also, if your chip
+ has any software write-protect mechanism you may want to review the
+ code to make sure this driver won't turn it on by accident.
+
+ If you use this with an SMBus adapter instead of an I2C adapter,
+ full functionality is not available. Only smaller devices are
+ supported (24c16 and below, max 4 kByte).
+
+ This driver can also be built as a module. If so, the module
+ will be called at24.
+
+config EEPROM_AT25
+ tristate "SPI EEPROMs (FRAMs) from most vendors"
+ depends on SPI && SYSFS
+ select SPI_MEM
+ help
+ Enable this driver to get read/write support to most SPI EEPROMs
+ and Cypress FRAMs,
+ after you configure the board init code to know about each eeprom
+ on your target board.
+
+ This driver can also be built as a module. If so, the module
+ will be called at25.
+
+config EEPROM_93XX46
+ tristate "Microwire EEPROM 93XX46 support"
+ depends on SPI && SYSFS
+ select REGMAP
+ help
+ Driver for the microwire EEPROM chipsets 93xx46x. The driver
+ supports both read and write commands and also the command to
+ erase the whole EEPROM.
+
+ This driver can also be built as a module. If so, the module
+ will be called eeprom_93xx46.
+
+ If unsure, say N.
+
+config EEPROM_EE1004
+ tristate "SPD EEPROMs on DDR4 memory modules"
+ depends on I2C && SYSFS
+ help
+ Enable this driver to get read support to SPD EEPROMs following
+ the JEDEC EE1004 standard. These are typically found on DDR4
+ SDRAM memory modules.
+
+ This driver can also be built as a module. If so, the module
+ will be called ee1004.
+
+config EEPROM_M24LR
+ tristate "STMicroelectronics M24LR RFID/NFC EEPROM support"
+ depends on I2C && SYSFS
+ select REGMAP_I2C
+ help
+ This enables support for STMicroelectronics M24LR RFID/NFC EEPROM
+ chips. These dual-interface devices expose two I2C addresses:
+ one for EEPROM memory access and another for control and system
+ configuration (e.g. UID, password handling).
+
+ This driver provides a sysfs interface for control functions and
+ integrates with the nvmem subsystem for EEPROM access.
+
+ To compile this driver as a module, choose M here: the
+ module will be called m24lr.
+
+endif # NVMEM_SYSFS
+
config NVMEM_AIROHA_SMC_EFUSES
tristate "Airoha SMC eFuse support"
depends on ARCH_AIROHA || COMPILE_TEST
diff --git a/drivers/nvmem/Makefile b/drivers/nvmem/Makefile
index f6f2bc51dee1..2bbfb9ff1885 100644
--- a/drivers/nvmem/Makefile
+++ b/drivers/nvmem/Makefile
@@ -10,6 +10,11 @@ nvmem_layouts-y := layouts.o
obj-y += layouts/
# Devices
+obj-$(CONFIG_EEPROM_AT24) += at24.o
+obj-$(CONFIG_EEPROM_AT25) += at25.o
+obj-$(CONFIG_EEPROM_93XX46) += eeprom_93xx46.o
+obj-$(CONFIG_EEPROM_EE1004) += ee1004.o
+obj-$(CONFIG_EEPROM_M24LR) += m24lr.o
obj-$(CONFIG_NVMEM_AIROHA_SMC_EFUSES) += nvmem-airoha-smc-efuses.o
nvmem-airoha-smc-efuses-y := airoha-smc-efuses.o
obj-$(CONFIG_NVMEM_AN8855_EFUSE) += nvmem-an8855-efuse.o
diff --git a/drivers/misc/eeprom/at24.c b/drivers/nvmem/at24.c
similarity index 100%
rename from drivers/misc/eeprom/at24.c
rename to drivers/nvmem/at24.c
diff --git a/drivers/misc/eeprom/at25.c b/drivers/nvmem/at25.c
similarity index 100%
rename from drivers/misc/eeprom/at25.c
rename to drivers/nvmem/at25.c
diff --git a/drivers/misc/eeprom/ee1004.c b/drivers/nvmem/ee1004.c
similarity index 100%
rename from drivers/misc/eeprom/ee1004.c
rename to drivers/nvmem/ee1004.c
diff --git a/drivers/misc/eeprom/eeprom_93xx46.c b/drivers/nvmem/eeprom_93xx46.c
similarity index 100%
rename from drivers/misc/eeprom/eeprom_93xx46.c
rename to drivers/nvmem/eeprom_93xx46.c
diff --git a/drivers/misc/eeprom/m24lr.c b/drivers/nvmem/m24lr.c
similarity index 100%
rename from drivers/misc/eeprom/m24lr.c
rename to drivers/nvmem/m24lr.c
--
2.53.0
next prev parent reply other threads:[~2026-07-29 9:47 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-29 9:46 [PATCH 00/14] nvmem: updates for 7.3 srini
2026-07-29 9:46 ` [PATCH 01/14] nvmem: remove unused field from struct nvmem_device srini
2026-07-29 9:46 ` [PATCH 02/14] nvmem: return -EOPNOTSUPP to in-kernel users on missing callbacks srini
2026-07-29 9:46 ` [PATCH 03/14] nvmem: check the return value of gpiod_set_value_cansleep() srini
2026-07-29 9:46 ` [PATCH 04/14] nvmem: simplify locking with guard() srini
2026-07-29 9:46 ` [PATCH 05/14] nvmem: remove unneeded __nvmem_device_put() srini
2026-07-29 9:46 ` [PATCH 06/14] nvmem: split out the reg_read/write() callbacks out of struct nvmem_device srini
2026-07-29 9:46 ` [PATCH 07/14] nvmem: simplify nvmem_sysfs_remove_compat() srini
2026-07-29 9:46 ` [PATCH 08/14] nvmem: remove duplicated reference counting srini
2026-07-29 9:46 ` [PATCH 09/14] nvmem: protect nvmem_device::ops with SRCU srini
2026-07-29 9:46 ` srini [this message]
2026-07-29 9:46 ` [PATCH 11/14] nvmem: airoha: add ARM64 dependency srini
2026-07-29 9:46 ` [PATCH 12/14] nvmem: brcm_nvram: reject empty NVRAM partition srini
2026-07-29 9:46 ` [PATCH 13/14] nvmem: brcm_nvram: fix out-of-bounds access on malformed flash data srini
2026-07-29 9:46 ` [PATCH 14/14] dt-bindings: nvmem: qfprom: Add ipq5210 & ipq9650 compatible srini
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=20260729094647.111468-11-srini@kernel.org \
--to=srini@kernel.org \
--cc=arnd@arndb.de \
--cc=bartosz.golaszewski@oss.qualcomm.com \
--cc=gregkh@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=wsa+renesas@sang-engineering.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.