From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-alma10-1.taild15c8.ts.net [100.103.45.18]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id BF1ED24BD03 for ; Wed, 8 Jul 2026 20:33:57 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=100.103.45.18 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1783542839; cv=none; b=LZBYBG9rrJOmqj+uCOioPyqZ55TL/M7h9/oKEH3uZ1tQxwUtS436gN+ZebWQwNW1PkNXkAwI5saiEeLLtL4c5rqWf8jwiGvlBfTosx6PXaOu3a9ZlBXjSSF4AY4aKN3rXknayM7MJnTqltdQGgJgX+UeeeNyVnv1L57kjqNCtF4= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1783542839; c=relaxed/simple; bh=VH1DSwKC7DvrKJXx7HYGd51pSZnEH03TDs5UdpE3wEA=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=jsT0I3E5JohUhI0IJ6LsdATmU7CFan0NPVmxSi0goYWgkXyRR5zoeTSvUb0dYFPhCzVUUi5TvB57As56CS8j+AdYPtvf57nAh/nxI1EniLGWDiiGmqP4oXIof6cHq2GFk2Hk0w8OwvNmG1xW8wFXDuheoYqiXpKA1t2nNg9vBt0= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=XY6PBBFF; arc=none smtp.client-ip=100.103.45.18 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="XY6PBBFF" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 8F00B1F000E9; Wed, 8 Jul 2026 20:33:55 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1783542837; bh=qN+7IctzzZTnxcGG3xiY0/46puGwdgTkBS+1+jeFOEk=; h=Date:Subject:To:Cc:References:From:In-Reply-To; b=XY6PBBFFOs/YAMY/WvAgtSDBNOWrzVEDdQK7GZ+qyfav7yCgRoG3pKhaZ1K5Zxnob vqZg6/fZuLbRkFapUN/BOJh3cwn2Te4CRBQVjl1CQbp0Y+B1bkdR29ubpBYDDstkkF l76gNChKFKK3Z8Rp2OxC00G4DbkiVyefxw04YwYPIMkBeJnz8V+txWMbrAU06DBR8Y U+Cn1E3rgEF2E7VD1KQFuQ29+F3eLzu/8Bptvyub/Y61DQsg6wI3nD6fBrLHpkRKRN BCpfBFwhv+5RwA0rlgBIDeS/xlvyLNECoKHklGtzKGLDL0gWEUtwaTtthx+BnVDBm+ pvBCLuGsnakxQ== Message-ID: <076a7db6-6974-47cc-af48-512c9296ee19@kernel.org> Date: Wed, 8 Jul 2026 21:33:54 +0100 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v2] eeprom: move nvmem EEPROM drivers to drivers/nvmem/ To: Bartosz Golaszewski , Arnd Bergmann , Greg Kroah-Hartman , Srinivas Kandagatla , Wolfram Sang , Andi Shyti , Bartosz Golaszewski Cc: linux-kernel@vger.kernel.org References: <20260702-eeprom-move-to-nvmem-v2-1-327e1e5d1d95@oss.qualcomm.com> Content-Language: en-US From: Srinivas Kandagatla In-Reply-To: <20260702-eeprom-move-to-nvmem-v2-1-327e1e5d1d95@oss.qualcomm.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit On 7/2/26 10:24 AM, Bartosz Golaszewski wrote: > 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 > Signed-off-by: Bartosz Golaszewski > --- > Changes in v2: > - Put the Kconfig entries behind a NVMEM_SYSFS guard > - Rebase on top of v7.2-rc1 > - Link to v1: https://patch.msgid.link/20260618-eeprom-move-to-nvmem-v1-1-21771f30efcc@oss.qualcomm.com > --- > 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 > drivers/{misc/eeprom => nvmem}/eeprom_93xx46.c | 0 > drivers/{misc/eeprom => nvmem}/m24lr.c | 0 > 10 files changed, 94 insertions(+), 100 deletions(-) > Hi Bart, This Does not apply to linux-next, can you please rebase and send --srini > diff --git a/MAINTAINERS b/MAINTAINERS > index 15011f5752a994cf1b354f490d6c4e411588df88..ea5bb279a09f890ca2039b01c4f53316ae1438fe 100644 > --- a/MAINTAINERS > +++ b/MAINTAINERS > @@ -4168,11 +4168,11 @@ F: include/linux/async_tx.h > > AT24 EEPROM DRIVER > M: Bartosz Golaszewski > -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" > diff --git a/drivers/misc/eeprom/Kconfig b/drivers/misc/eeprom/Kconfig > index 4d0ce47aa282c12dc277661cae552cca1923ec0d..d6af02588c6677997b34ceb175553480cd76d685 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 8f311fd6a4ce18bd621995811fcf3e971b0988cb..44a20cf025a1b4cb244b5c50d5542e3470b5e977 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 74ddbd0f79b0ece5a657c70f90aa04c4fef6fdee..bb8e2952ec7c751e72b260d197ebaecd5ceb0bd3 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_AN8855_EFUSE > tristate "Airoha AN8855 eFuse support" > depends on COMPILE_TEST > diff --git a/drivers/nvmem/Makefile b/drivers/nvmem/Makefile > index 7252b8ec88d46981f0f4e78ec795b5a304bd9dd2..a27791800f8cccaa7391cfafd81944850cbaf6e0 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_AN8855_EFUSE) += nvmem-an8855-efuse.o > nvmem-an8855-efuse-y := an8855-efuse.o > obj-$(CONFIG_NVMEM_APPLE_EFUSES) += nvmem-apple-efuses.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 > > --- > base-commit: dc59e4fea9d83f03bad6bddf3fa2e52491777482 > change-id: 20260618-eeprom-move-to-nvmem-a1b55796d9a6 > > Best regards,