From patchwork Mon Jul 1 13:53:39 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marco Felsch X-Patchwork-Id: 1954702 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; secure) header.d=lists.infradead.org header.i=@lists.infradead.org header.a=rsa-sha256 header.s=bombadil.20210309 header.b=KakioeqX; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=none (no SPF record) smtp.mailfrom=lists.infradead.org (client-ip=2607:7c80:54:3::133; helo=bombadil.infradead.org; envelope-from=linux-mtd-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org; receiver=patchwork.ozlabs.org) Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:3::133]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4WCSG972TWz1xqZ for ; Mon, 1 Jul 2024 23:54:40 +1000 (AEST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:Cc:To:MIME-Version:Message-Id:Date: Subject:From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=Ltb16AbrFCedIQJqyUZjfa/RTkkSXBYWZzaf5fSk2fI=; b=KakioeqX1EkBE0 kmI72XDFpAOSpQYI6SgZn/+Mw4GGYxwrx1rgEG6RcvHE/L49X1mOpKqyYhGX2LphYz5emEiUz4RUW NihwjEtJAAsZTnanEPgyGN7U6813cJMqB58oIgzsJ19n+oK/yKdDMrqKd5VLAG8x2M9xttGckYSX0 ha9biVsmwuoSSGbAj8yE9J9spmE4I43hDfNa8Zi1Xwq+NXMWD+9Jj0S9Kr7IcdONcJpurHKbg7x1i bv1kSS/5juniVfKTRopZwH0fElVtbFJlgYMwGyyawp1bU2Hht8RSt8n9SlQX++A6bcbMjpwjvjOkx G6JONM7GWjYS+1qrgmbA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sOHUA-00000003aM8-06Cu; Mon, 01 Jul 2024 13:54:26 +0000 Received: from metis.whiteo.stw.pengutronix.de ([2a0a:edc0:2:b01:1d::104]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1sOHU3-00000003aFK-1Mb4 for linux-mtd@lists.infradead.org; Mon, 01 Jul 2024 13:54:21 +0000 Received: from dude02.red.stw.pengutronix.de ([2a0a:edc0:0:1101:1d::28]) by metis.whiteo.stw.pengutronix.de with esmtp (Exim 4.92) (envelope-from ) id 1sOHTW-0001LY-Vb; Mon, 01 Jul 2024 15:53:46 +0200 From: Marco Felsch Subject: [PATCH 0/9] AT24 EEPROM MTD Support Date: Mon, 01 Jul 2024 15:53:39 +0200 Message-Id: <20240701-b4-v6-10-topic-usbc-tcpci-v1-0-3fd5f4a193cc@pengutronix.de> MIME-Version: 1.0 X-B4-Tracking: v=1; b=H4sIAOO0gmYC/x3MQQqEMAxG4atI1hNIpTjoVcTF9DeO2WhpVQTx7 haX3+K9i7Im00xddVHSw7KtS4H7VIT5t/yVbSymWmovX3EcPB8NO+FtjQbecwBviDCGD2gDoI1 4Kn1MOtn5vvvhvh826v1ZawAAAA== To: Miquel Raynal , Richard Weinberger , Vignesh Raghavendra , Arnd Bergmann , Greg Kroah-Hartman , Bartosz Golaszewski , Russell King , Joel Stanley , Andrew Jeffery , Nicolas Ferre , Alexandre Belloni , Claudiu Beznea , Shawn Guo , Sascha Hauer , Pengutronix Kernel Team , Fabio Estevam , Vladimir Zapolskiy , Andrew Lunn , Gregory Clement , Sebastian Hesselbarth , Tony Lindgren , Geert Uytterhoeven , Magnus Damm , Dinh Nguyen , Thierry Reding , Jonathan Hunter , =?utf-8?q?Jonathan_Neusch=C3=A4fer?= , Michael Ellerman , Nicholas Piggin , Christophe Leroy , "Naveen N. Rao" , Thomas Bogendoerfer , Huacai Chen , WANG Xuerui Cc: linux-mtd@lists.infradead.org, linux-kernel@vger.kernel.org, linux-i2c@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-aspeed@lists.ozlabs.org, imx@lists.linux.dev, linux-omap@vger.kernel.org, linux-renesas-soc@vger.kernel.org, linux-tegra@vger.kernel.org, openbmc@lists.ozlabs.org, linuxppc-dev@lists.ozlabs.org, linux-mips@vger.kernel.org, loongarch@lists.linux.dev, Marco Felsch X-Mailer: b4 0.15-dev X-SA-Exim-Connect-IP: 2a0a:edc0:0:1101:1d::28 X-SA-Exim-Mail-From: m.felsch@pengutronix.de X-SA-Exim-Scanned: No (on metis.whiteo.stw.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: linux-mtd@lists.infradead.org X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240701_065419_467967_6ADBB752 X-CRM114-Status: GOOD ( 13.89 ) X-Spam-Score: -2.3 (--) X-Spam-Report: Spam detection software, running on the system "bombadil.infradead.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: This series adds the intial support to handle EEPROMs via the MTD layer as well. This allow the user-space to have separate paritions since EEPROMs can become quite large nowadays. With this patchset applied EEPROMs can be accessed via: - legacy 'eeprom' device - nvmem device - mtd device(s) Content analysis details: (-2.3 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -2.3 RCVD_IN_DNSWL_MED RBL: Sender listed at https://www.dnswl.org/, medium trust [2a0a:edc0:2:b01:1d:0:0:104 listed in] [list.dnswl.org] -0.0 SPF_PASS SPF: sender matches SPF record 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record X-BeenThere: linux-mtd@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Linux MTD discussion mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-mtd" Errors-To: linux-mtd-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org This series adds the intial support to handle EEPROMs via the MTD layer as well. This allow the user-space to have separate paritions since EEPROMs can become quite large nowadays. With this patchset applied EEPROMs can be accessed via: - legacy 'eeprom' device - nvmem device - mtd device(s) The patchset targets only the AT24 (I2C) EEPROMs since I have no access to AT25 (SPI) EEPROMs nor to one of the other misc/eeprom/* devices. Note: I'm not familiar with Kconfig symbol migration so I don't know if the last patch is required at the moment. Please be notified that the list of recipients is quite large due to the defconfig changes. Regards, Marco Signed-off-by: Marco Felsch --- Marco Felsch (9): mtd: core: add nvmem_write support mtd: add mtd_is_master helper mtd: add support to handle EEPROM devices mtd: devices: add AT24 eeprom support ARM: defconfig: convert to MTD_EEPROM_AT24 powerpc: convert to MTD_EEPROM_AT24 MIPS: configs: convert to MTD_EEPROM_AT24 LoongArch: convert to MTD_EEPROM_AT24 eeprom: at24: remove deprecated Kconfig symbol MAINTAINERS | 2 +- arch/arm/configs/aspeed_g4_defconfig | 2 +- arch/arm/configs/aspeed_g5_defconfig | 2 +- arch/arm/configs/at91_dt_defconfig | 2 +- arch/arm/configs/axm55xx_defconfig | 2 +- arch/arm/configs/davinci_all_defconfig | 2 +- arch/arm/configs/imx_v4_v5_defconfig | 2 +- arch/arm/configs/imx_v6_v7_defconfig | 2 +- arch/arm/configs/ixp4xx_defconfig | 2 +- arch/arm/configs/keystone_defconfig | 2 +- arch/arm/configs/lpc18xx_defconfig | 2 +- arch/arm/configs/lpc32xx_defconfig | 2 +- arch/arm/configs/multi_v5_defconfig | 2 +- arch/arm/configs/multi_v7_defconfig | 2 +- arch/arm/configs/mvebu_v5_defconfig | 2 +- arch/arm/configs/mvebu_v7_defconfig | 2 +- arch/arm/configs/mxs_defconfig | 2 +- arch/arm/configs/omap2plus_defconfig | 2 +- arch/arm/configs/pxa_defconfig | 2 +- arch/arm/configs/s3c6400_defconfig | 2 +- arch/arm/configs/sama5_defconfig | 2 +- arch/arm/configs/sama7_defconfig | 2 +- arch/arm/configs/shmobile_defconfig | 2 +- arch/arm/configs/socfpga_defconfig | 2 +- arch/arm/configs/tegra_defconfig | 2 +- arch/arm/configs/wpcm450_defconfig | 2 +- arch/loongarch/configs/loongson3_defconfig | 2 +- arch/mips/configs/cavium_octeon_defconfig | 2 +- arch/mips/configs/db1xxx_defconfig | 2 +- arch/powerpc/configs/44x/warp_defconfig | 2 +- arch/powerpc/configs/mpc512x_defconfig | 2 +- arch/powerpc/configs/mpc5200_defconfig | 2 +- arch/powerpc/configs/ppc6xx_defconfig | 2 +- arch/powerpc/configs/skiroot_defconfig | 2 +- drivers/misc/eeprom/Kconfig | 31 ------- drivers/misc/eeprom/Makefile | 1 - drivers/mtd/devices/Kconfig | 31 +++++++ drivers/mtd/devices/Makefile | 1 + drivers/{misc/eeprom => mtd/devices}/at24.c | 122 +++++++++++++++------------- drivers/mtd/mtdcore.c | 49 ++++++++++- include/linux/mtd/mtd.h | 5 ++ include/uapi/mtd/mtd-abi.h | 2 + 42 files changed, 187 insertions(+), 123 deletions(-) --- base-commit: 1613e604df0cd359cf2a7fbd9be7a0bcfacfabd0 change-id: 20240701-b4-v6-10-topic-usbc-tcpci-c4bc9bcce604 Best regards,