From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-wm1-f47.google.com (mail-wm1-f47.google.com [209.85.128.47]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id AC7FA347BDC for ; Thu, 18 Jun 2026 18:50:55 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.47 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1781808657; cv=none; b=NPk3lpUzV7bP5nL7O4xthrNzxyU/FsniW08lMdAswvDjD9kQZhqV6y3i96Nkb3vIeQncqxs6DgzQaf+2G2eJ+gVoSsQwxMBVgSMxVhZsIAJquiDA1uyHsWdxvY7/+Lad8r0OrczH8s1eZgJGsOtkdvZ0MWaL/P0l0bCPDwNHPVA= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1781808657; c=relaxed/simple; bh=WjGcKcjIUVLO8lrTmWosZAY67qwehJlnvfRzmuEbcx4=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=KE6AUWwBBJ4i2DVcI53znB/jvwIrNcmzbZGXxDOPUhdAmRechGAVXlzXAmfwGJ1qIyAxmG34z9X16CdIUwB1/ZqQ9cRc5ZvbMc9UBYHi9Cesz+D9i6A2WbOasqGmcuE9NQ9e1T4PISiIeVpvCJR4BZJqBZVAQtpaOjgvraalQRk= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=ZvPc97v+; arc=none smtp.client-ip=209.85.128.47 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="ZvPc97v+" Received: by mail-wm1-f47.google.com with SMTP id 5b1f17b1804b1-490b211ee6aso8542575e9.3 for ; Thu, 18 Jun 2026 11:50:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1781808654; x=1782413454; darn=vger.kernel.org; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:date:message-id :sender:from:to:cc:subject:date:message-id:reply-to; bh=jAiDjmup0yGEN+q0GnkOlndJH6lWyQrv5OHmfCfyRWY=; b=ZvPc97v+PBmpvQrfndgD13Blq5rK1uClCYXOWLf38jOqRHb0KMlvxSO1tHYBzD25tE UxdWQyTBP7t6oBOX+LXpfl5MjeRrzz5FoXywyfT5HR985rum3IBe50WtmhfIFfhXGw6+ Lv33pL15535K15LElMCSATXXeqaGR+MRQXD0jozIr/MkYRgaGWopqomDfBoFz4odD8G4 mYI6Nv3iYLZVfCIckLrDWpuWq2sDTfvWqPjsXy7f+fMEuiE3rtTOMVM0SQtJmxHHwYFg GcWVCUZdALqohpJ3Lf2xKWXjn01JLI9J0k0h0yZJg82RBtywD0fbaRYImzNm3n625vhl 8rog== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1781808654; x=1782413454; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:date:message-id :sender:x-gm-gg:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=jAiDjmup0yGEN+q0GnkOlndJH6lWyQrv5OHmfCfyRWY=; b=iPr5nifOVJXxCpA278yIBgiN+6ncIrfdo/aIkkaWlw17H+iZmYNe0f8g0cTzqgGdy5 yd0YT6AU4H64P0LF1uyQYr+Z40PvnZXuxRj8D6OOM2afd/ly+ZrQSZOdvcHFm6FWXXV4 reUsFOlHnQ8SeWc8NHGEWz5J/HfZJtYyn7eV/TAZ9w+4ZoKWZKFFQhqTCbssfcv2WgDe oxgVfy94+hms4iwB5GfMHXnCSMcQUsmxgEKSP54tPiwDq+tUPlJIVkFR/m3tzeTFvCEw 8wNJ+BQ793OJtYk4ob4YF4XHGT2bTNf3l0ZJfvRdmrkeo9ChrwdZvH55hsDHgtPuxmKc YsYg== X-Gm-Message-State: AOJu0YxGDRuMul3jj9YJuCKhKzbbTzr4kMFHJmUQT3dHFEu2IjtQIYsK loeR71bmVS90sgC9naTyj1W3MGBlI80m6R8b/GbNSi5rf3K+Ub/D5T0t X-Gm-Gg: AfdE7clBxGXJwibmsWSh9uz5nrqs7FKS1an7eS9xzvNVnZW8RBLonqAMgslMQr6mZrQ +3/vinC4ntitfbRfL++RIVkdKjdRtHQX4WxfEwgz3QZ5bZtTNJXeWR63t6JNti8zJzqBHafBY80 Q8kBLMl3YXxQnm4EQQcSlfjLc5ygg93GfVPXye1/3uoccPO2WorW+a3nJKBr9zrsBBGCiC6EtAp Nrrs4pW1lzXq0YXXdlhNQuLlQ1GblDqfTCK7tB9/UYzmu3eqk8SDflp7rB28OtgJq5wV+uZQ8LM gTJVtOzexpMWE71nfk9HXuFgVxczwXQyS8YGVhTWMlf313Xw8U3WnT5/YeRs1aPO35g40gZjh8H tkWJRbmqQ+hNBMYAnaJy/U0otOIHpSNW1ihHacr+hYlr/HUTXbXY9tmFFNKFNm0blFVyPN4HWYE QbshbLi7em8MlzOFJMDDyzDSEsJEo/y6T6LphMl0NrffKv62yqTOxD4qY7eLrfz4LhWW1JUAuEZ U4gHIY= X-Received: by 2002:a05:600c:8716:b0:492:28be:6098 with SMTP id 5b1f17b1804b1-49240e44473mr2985925e9.11.1781808653802; Thu, 18 Jun 2026 11:50:53 -0700 (PDT) Received: from [10.128.11.42] (195-23-151-163.net.novis.pt. [195.23.151.163]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-46508a0546fsm1021330f8f.2.2026.06.18.11.50.52 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 18 Jun 2026 11:50:53 -0700 (PDT) Sender: Julian Braha Message-ID: Date: Thu, 18 Jun 2026 19:50:52 +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] 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: <20260618-eeprom-move-to-nvmem-v1-1-21771f30efcc@oss.qualcomm.com> Content-Language: en-US From: Julian Braha In-Reply-To: <20260618-eeprom-move-to-nvmem-v1-1-21771f30efcc@oss.qualcomm.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Hi Bartosz, On 6/18/26 10:18, Bartosz Golaszewski wrote: > Move the EEPROM drivers using nvmem under drivers/nvmem/ for > consistency of the review process and path upstream. Nice! > +config EEPROM_AT24 > + tristate "I2C EEPROMs / RAMs / ROMs from most vendors" > + depends on I2C && SYSFS > + 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_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 > + 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_EE1004 > + tristate "SPD EEPROMs on DDR4 memory modules" > + depends on I2C && SYSFS > + 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_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. > + With all of these options in one place now, it would be nice to factor out the SYSFS dependency from each into an 'if SYSFS .. endif' around them. It's been mentioned on the janitors list in the past: https://lore.kernel.org/kernel-janitors/df5ea26e-3bac-7c33-30b8-de5913ec5703@crashcourse.ca/ - Julian Braha