From patchwork Mon Jul 1 13:53:40 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marco Felsch X-Patchwork-Id: 13718168 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id C0219C2BD09 for ; Mon, 1 Jul 2024 13:56:02 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Cc:To:In-Reply-To:References :Message-Id:Content-Transfer-Encoding:Content-Type:MIME-Version:Subject:Date: From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=rR/JRbi7OKO33rV/JECK9xG0pR4SW1P8KUtKvEnYGLI=; b=EIIdMfoMMyof5apdri4u+3SAfN CCigg7bM6aBN7H2pPMLuajplY5imoFGdC6nvbGyy3MliT1bOFODu1T7vfKrH5z5fRJg7vKWTywYtm 0OlH8zI/0zCbECUWwrw/PT1wYRyQMWE82wNca0GXymop/YBsP1FmNoMXj6VM25XIUcsJe4pwkzgAU KV3z4b5GRUVbBLEDrvEh0POLQIUaYC+S0usQHgWWDfohN4vupyoHvDftSUEvz/6enHzTSc0F72Vdh mC00to4o0EryBj0ZphFCQKVMLY5EmanqoVpmDKr5iIoveaYtK3/J4kRg+bcMeGLvWUhZtTh+4JK2A v4r97lUQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sOHVX-00000003bN2-2Hgf; Mon, 01 Jul 2024 13:55:51 +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 1sOHUb-00000003akb-0T5f for linux-arm-kernel@lists.infradead.org; Mon, 01 Jul 2024 13:54:55 +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 1sOHTX-0001LY-37; Mon, 01 Jul 2024 15:53:47 +0200 From: Marco Felsch Date: Mon, 01 Jul 2024 15:53:40 +0200 Subject: [PATCH 1/9] mtd: core: add nvmem_write support MIME-Version: 1.0 Message-Id: <20240701-b4-v6-10-topic-usbc-tcpci-v1-1-3fd5f4a193cc@pengutronix.de> References: <20240701-b4-v6-10-topic-usbc-tcpci-v1-0-3fd5f4a193cc@pengutronix.de> In-Reply-To: <20240701-b4-v6-10-topic-usbc-tcpci-v1-0-3fd5f4a193cc@pengutronix.de> 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-arm-kernel@lists.infradead.org X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240701_065453_401562_DDE9D9F2 X-CRM114-Status: GOOD ( 13.89 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org The MTD framework does support the NVMEM framework already but only the read support was implemented. This commit adds the write support if the MTD device supports writing (MTD_WRITEABLE is set). Signed-off-by: Marco Felsch --- drivers/mtd/mtdcore.c | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/drivers/mtd/mtdcore.c b/drivers/mtd/mtdcore.c index 724f917f91ba..dcd97e59425e 100644 --- a/drivers/mtd/mtdcore.c +++ b/drivers/mtd/mtdcore.c @@ -544,6 +544,20 @@ static int mtd_nvmem_reg_read(void *priv, unsigned int offset, return retlen == bytes ? 0 : -EIO; } +static int mtd_nvmem_reg_write(void *priv, unsigned int offset, + void *val, size_t bytes) +{ + struct mtd_info *mtd = priv; + size_t retlen; + int err; + + err = mtd_write(mtd, offset, bytes, &retlen, val); + if (err && err != -EUCLEAN) + return err; + + return retlen == bytes ? 0 : -EIO; +} + static int mtd_nvmem_add(struct mtd_info *mtd) { struct device_node *node = mtd_get_of_node(mtd); @@ -555,10 +569,11 @@ static int mtd_nvmem_add(struct mtd_info *mtd) config.owner = THIS_MODULE; config.add_legacy_fixed_of_cells = of_device_is_compatible(node, "nvmem-cells"); config.reg_read = mtd_nvmem_reg_read; + config.reg_write = mtd_nvmem_reg_write; config.size = mtd->size; config.word_size = 1; config.stride = 1; - config.read_only = true; + config.read_only = !(mtd->flags & MTD_WRITEABLE); config.root_only = true; config.ignore_wp = true; config.priv = mtd; From patchwork Mon Jul 1 13:53:41 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marco Felsch X-Patchwork-Id: 13718165 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 1D59AC2BD09 for ; Mon, 1 Jul 2024 13:55:36 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Cc:To:In-Reply-To:References :Message-Id:Content-Transfer-Encoding:Content-Type:MIME-Version:Subject:Date: From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=KDjxPoFvYdX/FIbD5NNfeW1qCyro4JbTumOySFsWXmM=; b=bkQx0sSN/6CPMmAo4eiVGuBgZw jB5B1Ka5g+3b1KibIa5bWr4OtszIiCmaiWdvlTo1XFGcQUT65PuwaPzOzzouH8cnRFV1RVL04SWTo iDTjTo85K88RUwL+LY/Lfj70v8OOFE5kKl8Pt1eWCw5pJ0bdJxIHt+BKEHmALubN0er8LiupagPoe WlyMFFetNr8jjvCsrMpHw1AKNwYR3KoG7LlyEFb4O6sC0SqtznyNeGaBirYEdr5ZT3OK8s45iNCz8 kS/Rg9+7YZuuAvaiWYMBJeEPJbdlfOUI0oI/YIEg8lUCpmfOLzF4kIzoqqPtsj/nHWrmVqnZCCOKM Qs8FH1eQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sOHV4-00000003b87-0rSk; Mon, 01 Jul 2024 13:55:22 +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 1sOHUY-00000003aig-0rzP for linux-arm-kernel@lists.infradead.org; Mon, 01 Jul 2024 13:54:51 +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 1sOHTX-0001LY-6i; Mon, 01 Jul 2024 15:53:47 +0200 From: Marco Felsch Date: Mon, 01 Jul 2024 15:53:41 +0200 Subject: [PATCH 2/9] mtd: add mtd_is_master helper MIME-Version: 1.0 Message-Id: <20240701-b4-v6-10-topic-usbc-tcpci-v1-2-3fd5f4a193cc@pengutronix.de> References: <20240701-b4-v6-10-topic-usbc-tcpci-v1-0-3fd5f4a193cc@pengutronix.de> In-Reply-To: <20240701-b4-v6-10-topic-usbc-tcpci-v1-0-3fd5f4a193cc@pengutronix.de> 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-arm-kernel@lists.infradead.org X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240701_065450_270323_0D7123BF X-CRM114-Status: GOOD ( 10.44 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Provide a simple helper to make it easy to detect an master mtd device. Signed-off-by: Marco Felsch --- include/linux/mtd/mtd.h | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/include/linux/mtd/mtd.h b/include/linux/mtd/mtd.h index 8d10d9d2e830..bf3fc2ea7230 100644 --- a/include/linux/mtd/mtd.h +++ b/include/linux/mtd/mtd.h @@ -408,6 +408,11 @@ static inline struct mtd_info *mtd_get_master(struct mtd_info *mtd) return mtd; } +static inline bool mtd_is_master(struct mtd_info *mtd) +{ + return mtd->parent ? false : true; +} + static inline u64 mtd_get_master_ofs(struct mtd_info *mtd, u64 ofs) { while (mtd->parent) { From patchwork Mon Jul 1 13:53:42 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marco Felsch X-Patchwork-Id: 13718173 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 24E21C30653 for ; Mon, 1 Jul 2024 13:56:50 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Cc:To:In-Reply-To:References :Message-Id:Content-Transfer-Encoding:Content-Type:MIME-Version:Subject:Date: From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=RzH6RKhqG7asGToyqbDIc0Ta9xHkhu3O+xKJKjCA3DE=; b=yJZRS9HvZpHphZ81humNvR3z34 hA5vS3y84ZCalhL0mv0YqyOv/BJuJg+pQaN63/HdI7tUjt35EofRyQM/6YmQpJciPzTVpcZEx/Pxr aRK3x2nUyCO0hbOCbpfCmOL0Dy6SzHPtVQpw2YCqx9ykJhgyamlEBc8jb9JBDvh7ycUPnN9B4PNmo PtMLHqHkzlQ1uf2dfxcEr73yoMrk18wZtDBcOWZY26D44+kjFDp1rTB5KvYcGhBUIHs1pBeYPbYKc iwZTw7turpucNkXKiBmrKrV/B5HIvFk8UxAGtFTt1X+C+8jjAtCv5z4o7nQWfT1rH+ZK2ECdhRvG0 HSU5ZjWA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sOHWE-00000003bi0-13Xa; Mon, 01 Jul 2024 13:56:34 +0000 Received: from desiato.infradead.org ([2001:8b0:10b:1:d65d:64ff:fe57:4e05]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1sOHUl-00000003ati-0zBX for linux-arm-kernel@bombadil.infradead.org; Mon, 01 Jul 2024 13:55:03 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=desiato.20200630; h=Cc:To:In-Reply-To:References: Message-Id:Content-Transfer-Encoding:Content-Type:MIME-Version:Subject:Date: From:Sender:Reply-To:Content-ID:Content-Description; bh=RzH6RKhqG7asGToyqbDIc0Ta9xHkhu3O+xKJKjCA3DE=; b=lb7dDR4OMzjVRMb6hEYWFRc8EM lIXe1HteG5yGVckBN3bieP/YI87dXkxYrM/3mw4mKN3R53ThDW0ZI6t3TF4cxd2VQZ/zVb3jQuhgt YRdiOXonDgu3+ulwRl/6sIs2v+39HagIztDb3wfhiNKc3raf/rzyOUwjFBwVnMNJ0MIa4fgNVxsud N+kp5ZJTQVLCQWuUjqM6a1gYxuXu/iRtIAJBcJ0p3YmtGkfx+heD2c1pLHZAzcBuJf1XhOS1u2dw1 G806pmjQHnmIaIHl7FS1JL1upgbaUzBOSocm4HxwOFKV3fIFe8KOZAi1eC29Q/ydQluCNnpOFX9fg FdRZ9iQA==; Received: from metis.whiteo.stw.pengutronix.de ([2a0a:edc0:2:b01:1d::104]) by desiato.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1sOHUg-00000009fWm-1LRh for linux-arm-kernel@lists.infradead.org; Mon, 01 Jul 2024 13:55:01 +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 1sOHTX-0001LY-Aa; Mon, 01 Jul 2024 15:53:47 +0200 From: Marco Felsch Date: Mon, 01 Jul 2024 15:53:42 +0200 Subject: [PATCH 3/9] mtd: add support to handle EEPROM devices MIME-Version: 1.0 Message-Id: <20240701-b4-v6-10-topic-usbc-tcpci-v1-3-3fd5f4a193cc@pengutronix.de> References: <20240701-b4-v6-10-topic-usbc-tcpci-v1-0-3fd5f4a193cc@pengutronix.de> In-Reply-To: <20240701-b4-v6-10-topic-usbc-tcpci-v1-0-3fd5f4a193cc@pengutronix.de> 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-arm-kernel@lists.infradead.org X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240701_145459_011540_8150C6F7 X-CRM114-Status: GOOD ( 23.18 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org At the moment EEPROMs are covered by misc/driver/eeprom/* drivers. This commit prepares the MTD framework to handle EEPROM devices within the MTD layer. To keep the backward compatibility with the current misc drivers the master device must be exposed always. Furthermore the NVMEM device parent must be set to the I2C device instead of the MTD device and the name must be either the I2C device name or the name specified via the label. Signed-off-by: Marco Felsch --- drivers/mtd/mtdcore.c | 32 +++++++++++++++++++++++++++++++- include/uapi/mtd/mtd-abi.h | 2 ++ 2 files changed, 33 insertions(+), 1 deletion(-) diff --git a/drivers/mtd/mtdcore.c b/drivers/mtd/mtdcore.c index dcd97e59425e..e2a996ccd17e 100644 --- a/drivers/mtd/mtdcore.c +++ b/drivers/mtd/mtdcore.c @@ -149,6 +149,9 @@ static ssize_t mtd_type_show(struct device *dev, case MTD_ROM: type = "rom"; break; + case MTD_EEPROM: + type = "eeprom"; + break; case MTD_NORFLASH: type = "nor"; break; @@ -578,6 +581,33 @@ static int mtd_nvmem_add(struct mtd_info *mtd) config.ignore_wp = true; config.priv = mtd; + switch (mtd->type) { + case MTD_EEPROM: + config.type = NVMEM_TYPE_EEPROM; + /* + * The master device must be backward compatible with the + * predecessor (misc/eeprom/at24.c) driver. Therefore we need to + * adapt the naming scheme. + * + * Initialize config.id to NVMEM_DEVID_AUTO even if the + * mtd->name is provided via an label as some platform can have + * multiple eeproms with same label and we can not register each + * of those with same label. Failing to register those eeproms + * trigger cascade failure on such platform. + */ + if (mtd_is_master(mtd)) { + config.id = NVMEM_DEVID_AUTO; + config.compat = true; + config.name = mtd->name; + config.dev = mtd->dev.parent; + config.base_dev = mtd->dev.parent; + } + break; + default: + config.type = NVMEM_TYPE_UNKNOWN; + break; + } + mtd->nvmem = nvmem_register(&config); if (IS_ERR(mtd->nvmem)) { /* Just ignore if there is no NVMEM support in the kernel */ @@ -1076,7 +1106,7 @@ int mtd_device_parse_register(struct mtd_info *mtd, const char * const *types, if (ret) goto out; - if (IS_ENABLED(CONFIG_MTD_PARTITIONED_MASTER)) { + if (IS_ENABLED(CONFIG_MTD_PARTITIONED_MASTER) || mtd->type == MTD_EEPROM) { ret = add_mtd_device(mtd); if (ret) goto out; diff --git a/include/uapi/mtd/mtd-abi.h b/include/uapi/mtd/mtd-abi.h index 714d55b49d2a..59bf43d58ddb 100644 --- a/include/uapi/mtd/mtd-abi.h +++ b/include/uapi/mtd/mtd-abi.h @@ -146,6 +146,7 @@ struct mtd_read_req { #define MTD_DATAFLASH 6 #define MTD_UBIVOLUME 7 #define MTD_MLCNANDFLASH 8 /* MLC NAND (including TLC) */ +#define MTD_EEPROM 9 #define MTD_WRITEABLE 0x400 /* Device is writeable */ #define MTD_BIT_WRITEABLE 0x800 /* Single bits can be flipped */ @@ -159,6 +160,7 @@ struct mtd_read_req { #define MTD_CAP_NORFLASH (MTD_WRITEABLE | MTD_BIT_WRITEABLE) #define MTD_CAP_NANDFLASH (MTD_WRITEABLE) #define MTD_CAP_NVRAM (MTD_WRITEABLE | MTD_BIT_WRITEABLE | MTD_NO_ERASE) +#define MTD_CAP_EEPROM (MTD_WRITEABLE | MTD_BIT_WRITEABLE | MTD_NO_ERASE) /* Obsolete ECC byte placement modes (used with obsolete MEMGETOOBSEL) */ #define MTD_NANDECC_OFF 0 /* Switch off ECC (Not recommended) */ From patchwork Mon Jul 1 13:53:43 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marco Felsch X-Patchwork-Id: 13718174 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 0667FC30653 for ; Mon, 1 Jul 2024 13:56:58 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Cc:To:In-Reply-To:References :Message-Id:Content-Transfer-Encoding:Content-Type:MIME-Version:Subject:Date: From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=RPHWDy3fl7kEVJVNlCiXLkfhnw4r7K8VInsv2t91lTY=; b=glo+SJPgvlexLvok9zjUoP+jsd zWI3X1a5/Nd35rBlgnps9/Yu9nVydxdp31FCICeWxvnOkW5DemFRHiZIX2cD8lrxpH48IaefNECJf xwBiPJ2ew6M6ETAseMqIbtlX3p8cWjyItKxlI7ZW+MFFSpGl+mekZUmpZ8wH7S+n/GNfNq9HktkUN eI+LaYveyGE0vStrvNH5jbGGbq29N1Iu7Il8ySNzivK9wXeIbD4RpDGyecjwrAIeRBwSKxPqCMurl iQkZCI2p1Yijh6MYQdyA+4YE+bV/U3un4sbXjHIj0H+XgoG5YKwXZIAjfyQqn3P57n3AhmbyprOER OLDqqHIg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sOHWO-00000003boE-2pRM; Mon, 01 Jul 2024 13:56:44 +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 1sOHUf-00000003aoj-0nag for linux-arm-kernel@lists.infradead.org; Mon, 01 Jul 2024 13:55:02 +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 1sOHTX-0001LY-ET; Mon, 01 Jul 2024 15:53:47 +0200 From: Marco Felsch Date: Mon, 01 Jul 2024 15:53:43 +0200 Subject: [PATCH 4/9] mtd: devices: add AT24 eeprom support MIME-Version: 1.0 Message-Id: <20240701-b4-v6-10-topic-usbc-tcpci-v1-4-3fd5f4a193cc@pengutronix.de> References: <20240701-b4-v6-10-topic-usbc-tcpci-v1-0-3fd5f4a193cc@pengutronix.de> In-Reply-To: <20240701-b4-v6-10-topic-usbc-tcpci-v1-0-3fd5f4a193cc@pengutronix.de> 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-arm-kernel@lists.infradead.org X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240701_065457_663648_5543BBB6 X-CRM114-Status: GOOD ( 36.64 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org At the moment there are three ways to access EEPROM content from user-space: 1st) via the single nvmem device (rw) 2nd) via the single 'eeprom' device (rw) 3th) via nvmem-cells (r) EEPROMs can become quite large nowadays (>=64K). Exposing such devices as single device isn't always sufficient. There may be partitions which require different access permissions. Also write access always need to to verify the offset. Port the current misc/eeprom/at24.c driver to the MTD framework since EEPROMs are memory-technology devices and the framework already supports partitioning. This allow using of-paritions like we do for SPI-NOR devices already: &eeprom { compatible = "atmel,24c02"; reg = <0x52>; pagesize = <16>; #address-cells = <1>; #size-cells = <0>; partitions { compatible = "fixed-partitions"; #address-cells = <1>; #size-cells = <1>; label = "board-eeprom"; otp@0 { compatible = "nvmem-cells"; label = "manufaturing"; reg = <0x0 0xe0>; nvmem-layout { compatible = "fixed-layout"; #address-cells = <1>; #size-cells = <1>; /* MACs stored in ASCII */ ethmac1: mac-address@0 { reg = <0x0 0xc>; }; ethmac2: mac-address@c { reg = <0xc 0xc>; }; test@d8 { reg = <0xd8 0x8>; }; }; j}; user@e0 { reg = <0xe0 0x100>; }; }; }; The porting was straight forward: - at24_read/write funcs are adapted to be MTD compatible - (re-)adding the write-protection gpio handling since the devices can now be accessed via NVMEM and MTD API - Replace the NVMEM with MTD registration. The mtdcore is taking care of exposing the NVMEM and eeprom device correctly ensure backward compatibility. Signed-off-by: Marco Felsch Changelog: v2: - resync misc/eeprom/at24.c with mtd/at24.c driver - add backward compatibility - drop misc/eeprom/at24.c driver - adapt Kconfig EEPROM_AT24 Kconfig entry - shift infrastructure support into separate patch - adapt commit message --- MAINTAINERS | 2 +- drivers/misc/eeprom/Kconfig | 30 +------ drivers/misc/eeprom/Makefile | 1 - drivers/mtd/devices/Kconfig | 31 +++++++ drivers/mtd/devices/Makefile | 1 + drivers/{misc/eeprom => mtd/devices}/at24.c | 122 +++++++++++++++------------- 6 files changed, 103 insertions(+), 84 deletions(-) diff --git a/MAINTAINERS b/MAINTAINERS index d6c90161c7bf..a3a56f34d754 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -3355,7 +3355,7 @@ L: linux-i2c@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/mtd/devices/at24.c ATA OVER ETHERNET (AOE) DRIVER M: "Justin Sanders" diff --git a/drivers/misc/eeprom/Kconfig b/drivers/misc/eeprom/Kconfig index 4e61ac18cc96..3a9aaec2f2c7 100644 --- a/drivers/misc/eeprom/Kconfig +++ b/drivers/misc/eeprom/Kconfig @@ -3,34 +3,10 @@ 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 + select MTD_EEPROM_AT24 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. + Deprecated config option to get read/write support to most I2C + EEPROMs. Please use MTD_EEPROM_AT24 instead. config EEPROM_AT25 tristate "SPI EEPROMs (FRAMs) from most vendors" diff --git a/drivers/misc/eeprom/Makefile b/drivers/misc/eeprom/Makefile index 65794e526d5d..2ace4f09d0f0 100644 --- a/drivers/misc/eeprom/Makefile +++ b/drivers/misc/eeprom/Makefile @@ -1,5 +1,4 @@ # 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 diff --git a/drivers/mtd/devices/Kconfig b/drivers/mtd/devices/Kconfig index ff2f9e55ef28..8c6720ea84e7 100644 --- a/drivers/mtd/devices/Kconfig +++ b/drivers/mtd/devices/Kconfig @@ -3,6 +3,37 @@ menu "Self-contained MTD device drivers" depends on MTD!=n depends on HAS_IOMEM +config MTD_EEPROM_AT24 + tristate "MTD 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 MTD_PMC551 tristate "Ramix PMC551 PCI Mezzanine RAM card support" depends on PCI diff --git a/drivers/mtd/devices/Makefile b/drivers/mtd/devices/Makefile index d11eb2b8b6f8..00ef5d87a957 100644 --- a/drivers/mtd/devices/Makefile +++ b/drivers/mtd/devices/Makefile @@ -4,6 +4,7 @@ # obj-$(CONFIG_MTD_DOCG3) += docg3.o +obj-$(CONFIG_MTD_EEPROM_AT24) += at24.o obj-$(CONFIG_MTD_SLRAM) += slram.o obj-$(CONFIG_MTD_PHRAM) += phram.o obj-$(CONFIG_MTD_PMC551) += pmc551.o diff --git a/drivers/misc/eeprom/at24.c b/drivers/mtd/devices/at24.c similarity index 92% rename from drivers/misc/eeprom/at24.c rename to drivers/mtd/devices/at24.c index 4bd4f32bcdab..713f40a1d95c 100644 --- a/drivers/misc/eeprom/at24.c +++ b/drivers/mtd/devices/at24.c @@ -4,6 +4,7 @@ * * Copyright (C) 2005-2007 David Brownell * Copyright (C) 2008 Wolfram Sang, Pengutronix + * Copyright (C) 2024 Pengutronix, Marco Felsch */ #include @@ -16,8 +17,8 @@ #include #include #include +#include #include -#include #include #include #include @@ -84,8 +85,9 @@ struct at24_data { u16 page_size; u8 flags; - struct nvmem_device *nvmem; + struct mtd_info mtd; struct regulator *vcc_reg; + struct gpio_desc *wp_gpio; void (*read_post)(unsigned int off, char *buf, size_t count); /* @@ -96,6 +98,11 @@ struct at24_data { struct regmap *client_regmaps[] __counted_by(num_addresses); }; +static struct at24_data *mtd_to_at24(struct mtd_info *mtd) +{ + return container_of(mtd, struct at24_data, mtd); +} + /* * This parameter is to help this driver avoid blocking other drivers out * of I2C for potentially troublesome amounts of time. With a 100 kHz I2C @@ -424,20 +431,19 @@ static ssize_t at24_regmap_write(struct at24_data *at24, const char *buf, return -ETIMEDOUT; } -static int at24_read(void *priv, unsigned int off, void *val, size_t count) +static int at24_read(struct mtd_info *mtd, loff_t from, size_t len, + size_t *retlen, u_char *buf) { - struct at24_data *at24; + struct at24_data *at24 = mtd_to_at24(mtd); struct device *dev; - char *buf = val; int i, ret; - at24 = priv; dev = at24_base_client_dev(at24); - if (unlikely(!count)) - return count; + if (unlikely(!len)) + return len; - if (off + count > at24->byte_len) + if (from + len > at24->byte_len) return -EINVAL; ret = pm_runtime_resume_and_get(dev); @@ -449,13 +455,14 @@ static int at24_read(void *priv, unsigned int off, void *val, size_t count) */ mutex_lock(&at24->lock); - for (i = 0; count; i += ret, count -= ret) { - ret = at24_regmap_read(at24, buf + i, off + i, count); + for (i = 0; len; i += ret, len -= ret) { + ret = at24_regmap_read(at24, buf + i, from + i, len); if (ret < 0) { mutex_unlock(&at24->lock); pm_runtime_put(dev); return ret; } + *retlen += ret; } mutex_unlock(&at24->lock); @@ -463,25 +470,24 @@ static int at24_read(void *priv, unsigned int off, void *val, size_t count) pm_runtime_put(dev); if (unlikely(at24->read_post)) - at24->read_post(off, buf, i); + at24->read_post(from, buf, i); return 0; } -static int at24_write(void *priv, unsigned int off, void *val, size_t count) +static int at24_write(struct mtd_info *mtd, loff_t to, size_t len, + size_t *retlen, const u_char *buf) { - struct at24_data *at24; + struct at24_data *at24 = mtd_to_at24(mtd); struct device *dev; - char *buf = val; int ret; - at24 = priv; dev = at24_base_client_dev(at24); - if (unlikely(!count)) + if (unlikely(!len)) return -EINVAL; - if (off + count > at24->byte_len) + if (to + len > at24->byte_len) return -EINVAL; ret = pm_runtime_resume_and_get(dev); @@ -493,18 +499,23 @@ static int at24_write(void *priv, unsigned int off, void *val, size_t count) */ mutex_lock(&at24->lock); - while (count) { - ret = at24_regmap_write(at24, buf, off, count); + gpiod_set_value_cansleep(at24->wp_gpio, 0); + + while (len) { + ret = at24_regmap_write(at24, buf, to, len); if (ret < 0) { mutex_unlock(&at24->lock); pm_runtime_put(dev); return ret; } buf += ret; - off += ret; - count -= ret; + to += ret; + len -= ret; + *retlen += ret; } + gpiod_set_value_cansleep(at24->wp_gpio, 1); + mutex_unlock(&at24->lock); pm_runtime_put(dev); @@ -562,6 +573,8 @@ static void at24_probe_temp_sensor(struct i2c_client *client) { struct at24_data *at24 = i2c_get_clientdata(client); struct i2c_board_info info = { .type = "jc42" }; + struct mtd_info *mtd = &at24->mtd; + size_t len; int ret; u8 val; @@ -569,12 +582,12 @@ static void at24_probe_temp_sensor(struct i2c_client *client) * Byte 2 has value 11 for DDR3, earlier versions don't * support the thermal sensor present flag */ - ret = at24_read(at24, 2, &val, 1); + ret = at24_read(mtd, 2, 1, &len, &val); if (ret || val != 11) return; /* Byte 32, bit 7 is set if temp sensor is present */ - ret = at24_read(at24, 32, &val, 1); + ret = at24_read(mtd, 32, 1, &len, &val); if (ret || !(val & BIT(7))) return; @@ -586,17 +599,19 @@ static void at24_probe_temp_sensor(struct i2c_client *client) static int at24_probe(struct i2c_client *client) { struct regmap_config regmap_config = { }; - struct nvmem_config nvmem_config = { }; u32 byte_len, page_size, flags, addrw; const struct at24_chip_data *cdata; struct device *dev = &client->dev; bool i2c_fn_i2c, i2c_fn_block; unsigned int i, num_addresses; struct at24_data *at24; + struct device_node *np; + struct mtd_info *mtd; bool full_power; struct regmap *regmap; bool writable; u8 test_byte; + size_t len; int err; i2c_fn_i2c = i2c_check_functionality(client->adapter, I2C_FUNC_I2C); @@ -703,6 +718,10 @@ static int at24_probe(struct i2c_client *client) page_size, at24_io_limit); if (!i2c_fn_i2c && at24->write_max > I2C_SMBUS_BLOCK_MAX) at24->write_max = I2C_SMBUS_BLOCK_MAX; + + at24->wp_gpio = gpiod_get_optional(dev, "wp", GPIOD_OUT_HIGH); + if (IS_ERR(at24->wp_gpio)) + return PTR_ERR(at24->wp_gpio); } /* use dummy devices for multiple-address chips */ @@ -712,37 +731,31 @@ static int at24_probe(struct i2c_client *client) return err; } - /* - * We initialize nvmem_config.id to NVMEM_DEVID_AUTO even if the - * label property is set as some platform can have multiple eeproms - * with same label and we can not register each of those with same - * label. Failing to register those eeproms trigger cascade failure - * on such platform. - */ - nvmem_config.id = NVMEM_DEVID_AUTO; - + mtd = &at24->mtd; if (device_property_present(dev, "label")) { err = device_property_read_string(dev, "label", - &nvmem_config.name); + &mtd->name); if (err) return err; } else { - nvmem_config.name = dev_name(dev); + mtd->name = dev_name(dev); } - - nvmem_config.type = NVMEM_TYPE_EEPROM; - nvmem_config.dev = dev; - nvmem_config.read_only = !writable; - nvmem_config.root_only = !(flags & AT24_FLAG_IRUGO); - nvmem_config.owner = THIS_MODULE; - nvmem_config.compat = true; - nvmem_config.base_dev = dev; - nvmem_config.reg_read = at24_read; - nvmem_config.reg_write = at24_write; - nvmem_config.priv = at24; - nvmem_config.stride = 1; - nvmem_config.word_size = 1; - nvmem_config.size = byte_len; + mtd->dev.parent = dev; + mtd->type = MTD_EEPROM; + mtd->flags = MTD_CAP_EEPROM; + if (!writable) + mtd->flags = MTD_CAP_ROM; + + mtd->writesize = 1; + mtd->writebufsize = 1; + mtd->size = byte_len; + mtd->_read = at24_read; + mtd->_write = at24_write; + + /* Fixed partitions are only supported on OF plaforms */ + np = to_of_node(dev_fwnode(dev)); + if (np) + mtd_set_of_node(mtd, np); i2c_set_clientdata(client, at24); @@ -764,7 +777,7 @@ static int at24_probe(struct i2c_client *client) * it's powered off right now). */ if (full_power) { - err = at24_read(at24, 0, &test_byte, 1); + err = at24_read(mtd, 0, 1, &len, &test_byte); if (err) { pm_runtime_disable(dev); if (!pm_runtime_status_suspended(dev)) @@ -773,13 +786,12 @@ static int at24_probe(struct i2c_client *client) } } - at24->nvmem = devm_nvmem_register(dev, &nvmem_config); - if (IS_ERR(at24->nvmem)) { + err = mtd_device_register(mtd, NULL, 0); + if (err) { pm_runtime_disable(dev); if (!pm_runtime_status_suspended(dev)) regulator_disable(at24->vcc_reg); - return dev_err_probe(dev, PTR_ERR(at24->nvmem), - "failed to register nvmem\n"); + return dev_err_probe(dev, err, "failed to register mtd\n"); } /* If this a SPD EEPROM, probe for DDR3 thermal sensor */ From patchwork Mon Jul 1 13:53:44 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marco Felsch X-Patchwork-Id: 13718167 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id E098AC30653 for ; Mon, 1 Jul 2024 13:55:57 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Cc:To:In-Reply-To:References :Message-Id:Content-Transfer-Encoding:Content-Type:MIME-Version:Subject:Date: From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=+ORDx9v1yotAW80N6KSDFlU8UtF0opwy3IgcPajlkAw=; b=GR+E55YMwWIKL5hpBUkMGzaODD z4O2bRAFf6fEtThPL5YUlVWcZpp1+IdWGGaHYs3vhd7toMuA86exe3e/go+6gRXoc3a/tn4JpTQrC liStHO6V3Vn1Z045D7doKRjgskdobT0IxXCSHf6yQdXS6pGrNT3fUZ5zFABUnIikxhRCeEvgc0zLL AuTJv+uDaf7z8I1vkkRct/fB84ikT/7NbcEFFwpgRqsCS9EK+c2uA13G2i7XSnj3YDTMDHYALQ9Cf cXKHgo/Ch7eNzF/9DIRTeL6dXf7B0JdwhOxdQq7wEr/xQmtl18VbDvI9pxHdYLU6Au6vNS+ocJu7A ByRZ2hPA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sOHVO-00000003bJi-2lN5; Mon, 01 Jul 2024 13:55:42 +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 1sOHUZ-00000003ajr-28Tu for linux-arm-kernel@lists.infradead.org; Mon, 01 Jul 2024 13:54:53 +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 1sOHTX-0001LY-IF; Mon, 01 Jul 2024 15:53:47 +0200 From: Marco Felsch Date: Mon, 01 Jul 2024 15:53:44 +0200 Subject: [PATCH 5/9] ARM: defconfig: convert to MTD_EEPROM_AT24 MIME-Version: 1.0 Message-Id: <20240701-b4-v6-10-topic-usbc-tcpci-v1-5-3fd5f4a193cc@pengutronix.de> References: <20240701-b4-v6-10-topic-usbc-tcpci-v1-0-3fd5f4a193cc@pengutronix.de> In-Reply-To: <20240701-b4-v6-10-topic-usbc-tcpci-v1-0-3fd5f4a193cc@pengutronix.de> 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-arm-kernel@lists.infradead.org X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240701_065452_194955_9D086D55 X-CRM114-Status: GOOD ( 12.92 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org The EEPROM_AT24 Kconfig symbol is marked as deprecated. Make use of the new Kconfig symbol to select the I2C EEPROM driver support. Signed-off-by: Marco Felsch --- 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 +- 25 files changed, 25 insertions(+), 25 deletions(-) diff --git a/arch/arm/configs/aspeed_g4_defconfig b/arch/arm/configs/aspeed_g4_defconfig index 28b724d59e7e..341f7ca4ff8c 100644 --- a/arch/arm/configs/aspeed_g4_defconfig +++ b/arch/arm/configs/aspeed_g4_defconfig @@ -68,7 +68,7 @@ CONFIG_MTD_UBI_FASTMAP=y CONFIG_MTD_UBI_BLOCK=y CONFIG_BLK_DEV_LOOP=y CONFIG_BLK_DEV_NBD=y -CONFIG_EEPROM_AT24=y +CONFIG_MTD_EEPROM_AT24=y CONFIG_NETDEVICES=y CONFIG_NETCONSOLE=y # CONFIG_NET_VENDOR_ALACRITECH is not set diff --git a/arch/arm/configs/aspeed_g5_defconfig b/arch/arm/configs/aspeed_g5_defconfig index 61cee1e7ebea..9c180658341f 100644 --- a/arch/arm/configs/aspeed_g5_defconfig +++ b/arch/arm/configs/aspeed_g5_defconfig @@ -82,7 +82,7 @@ CONFIG_BLK_DEV_LOOP=y CONFIG_BLK_DEV_NBD=y CONFIG_SMPRO_ERRMON=y CONFIG_SMPRO_MISC=y -CONFIG_EEPROM_AT24=y +CONFIG_MTD_EEPROM_AT24=y CONFIG_EEPROM_AT25=y CONFIG_SCSI=y CONFIG_BLK_DEV_SD=y diff --git a/arch/arm/configs/at91_dt_defconfig b/arch/arm/configs/at91_dt_defconfig index 1d53aec4c836..fb40790fc730 100644 --- a/arch/arm/configs/at91_dt_defconfig +++ b/arch/arm/configs/at91_dt_defconfig @@ -60,7 +60,7 @@ CONFIG_BLK_DEV_RAM=y CONFIG_BLK_DEV_RAM_COUNT=4 CONFIG_BLK_DEV_RAM_SIZE=8192 CONFIG_ATMEL_SSC=y -CONFIG_EEPROM_AT24=m +CONFIG_MTD_EEPROM_AT24=m CONFIG_SCSI=y CONFIG_BLK_DEV_SD=y # CONFIG_BLK_DEV_BSG is not set diff --git a/arch/arm/configs/axm55xx_defconfig b/arch/arm/configs/axm55xx_defconfig index 516689dc6cf1..473404f468f9 100644 --- a/arch/arm/configs/axm55xx_defconfig +++ b/arch/arm/configs/axm55xx_defconfig @@ -89,7 +89,7 @@ CONFIG_MTD_M25P80=y CONFIG_PROC_DEVICETREE=y CONFIG_BLK_DEV_LOOP=y CONFIG_BLK_DEV_RAM=y -CONFIG_EEPROM_AT24=y +CONFIG_MTD_EEPROM_AT24=y CONFIG_EEPROM_AT25=y CONFIG_BLK_DEV_SD=y CONFIG_CHR_DEV_SG=y diff --git a/arch/arm/configs/davinci_all_defconfig b/arch/arm/configs/davinci_all_defconfig index 3474e475373a..46701916c82d 100644 --- a/arch/arm/configs/davinci_all_defconfig +++ b/arch/arm/configs/davinci_all_defconfig @@ -73,7 +73,7 @@ CONFIG_BLK_DEV_LOOP=m CONFIG_BLK_DEV_RAM=y CONFIG_BLK_DEV_RAM_COUNT=1 CONFIG_BLK_DEV_RAM_SIZE=32768 -CONFIG_EEPROM_AT24=y +CONFIG_MTD_EEPROM_AT24=y CONFIG_BLK_DEV_SD=m CONFIG_ATA=m CONFIG_AHCI_DA850=m diff --git a/arch/arm/configs/imx_v4_v5_defconfig b/arch/arm/configs/imx_v4_v5_defconfig index 875c8cdbada7..685e685baa21 100644 --- a/arch/arm/configs/imx_v4_v5_defconfig +++ b/arch/arm/configs/imx_v4_v5_defconfig @@ -51,7 +51,7 @@ CONFIG_MTD_PHYSMAP=y CONFIG_MTD_RAW_NAND=y CONFIG_MTD_NAND_MXC=y CONFIG_MTD_UBI=y -CONFIG_EEPROM_AT24=y +CONFIG_MTD_EEPROM_AT24=y CONFIG_EEPROM_AT25=y CONFIG_BLK_DEV_SD=y # CONFIG_BLK_DEV_BSG is not set diff --git a/arch/arm/configs/imx_v6_v7_defconfig b/arch/arm/configs/imx_v6_v7_defconfig index cf2480dce285..03d71abf587e 100644 --- a/arch/arm/configs/imx_v6_v7_defconfig +++ b/arch/arm/configs/imx_v6_v7_defconfig @@ -104,7 +104,7 @@ CONFIG_MTD_UBI_BLOCK=y CONFIG_BLK_DEV_LOOP=y CONFIG_BLK_DEV_RAM=y CONFIG_BLK_DEV_RAM_SIZE=65536 -CONFIG_EEPROM_AT24=y +CONFIG_MTD_EEPROM_AT24=y CONFIG_EEPROM_AT25=y # CONFIG_SCSI_PROC_FS is not set CONFIG_BLK_DEV_SD=y diff --git a/arch/arm/configs/ixp4xx_defconfig b/arch/arm/configs/ixp4xx_defconfig index 3cb995b9616a..af36c0a7c8ae 100644 --- a/arch/arm/configs/ixp4xx_defconfig +++ b/arch/arm/configs/ixp4xx_defconfig @@ -98,7 +98,7 @@ CONFIG_MTD_RAW_NAND=m CONFIG_BLK_DEV_LOOP=y CONFIG_BLK_DEV_RAM=y CONFIG_BLK_DEV_RAM_SIZE=8192 -CONFIG_EEPROM_AT24=y +CONFIG_MTD_EEPROM_AT24=y # CONFIG_EEPROM_LEGACY is not set # CONFIG_SCSI_PROC_FS is not set CONFIG_BLK_DEV_SD=y diff --git a/arch/arm/configs/keystone_defconfig b/arch/arm/configs/keystone_defconfig index c1291ca290b2..c8ea405f11ab 100644 --- a/arch/arm/configs/keystone_defconfig +++ b/arch/arm/configs/keystone_defconfig @@ -124,7 +124,7 @@ CONFIG_MTD_SPI_NOR=y CONFIG_MTD_UBI=y CONFIG_BLK_DEV_LOOP=y CONFIG_SRAM=y -CONFIG_EEPROM_AT24=y +CONFIG_MTD_EEPROM_AT24=y CONFIG_SCSI=y CONFIG_BLK_DEV_SD=y CONFIG_NETDEVICES=y diff --git a/arch/arm/configs/lpc18xx_defconfig b/arch/arm/configs/lpc18xx_defconfig index f55c231e0870..da6a41364a0d 100644 --- a/arch/arm/configs/lpc18xx_defconfig +++ b/arch/arm/configs/lpc18xx_defconfig @@ -53,7 +53,7 @@ CONFIG_MTD_SPI_NOR=y CONFIG_SPI_NXP_SPIFI=y CONFIG_BLK_DEV_RAM=y CONFIG_SRAM=y -CONFIG_EEPROM_AT24=y +CONFIG_MTD_EEPROM_AT24=y CONFIG_SCSI=y CONFIG_BLK_DEV_SD=y # CONFIG_BLK_DEV_BSG is not set diff --git a/arch/arm/configs/lpc32xx_defconfig b/arch/arm/configs/lpc32xx_defconfig index 98e267213b21..fdaa3cc28886 100644 --- a/arch/arm/configs/lpc32xx_defconfig +++ b/arch/arm/configs/lpc32xx_defconfig @@ -50,7 +50,7 @@ CONFIG_BLK_DEV_RAM=y CONFIG_BLK_DEV_RAM_COUNT=1 CONFIG_BLK_DEV_RAM_SIZE=16384 CONFIG_SRAM=y -CONFIG_EEPROM_AT24=y +CONFIG_MTD_EEPROM_AT24=y CONFIG_EEPROM_AT25=y CONFIG_SCSI=y CONFIG_BLK_DEV_SD=y diff --git a/arch/arm/configs/multi_v5_defconfig b/arch/arm/configs/multi_v5_defconfig index 3f4ddcf49ec7..82d720538f11 100644 --- a/arch/arm/configs/multi_v5_defconfig +++ b/arch/arm/configs/multi_v5_defconfig @@ -86,7 +86,7 @@ CONFIG_MTD_UBI=y CONFIG_BLK_DEV_LOOP=y CONFIG_VIRTIO_BLK=y CONFIG_ATMEL_SSC=m -CONFIG_EEPROM_AT24=y +CONFIG_MTD_EEPROM_AT24=y # CONFIG_SCSI_PROC_FS is not set CONFIG_BLK_DEV_SD=y CONFIG_BLK_DEV_SR=m diff --git a/arch/arm/configs/multi_v7_defconfig b/arch/arm/configs/multi_v7_defconfig index 86bf057ac366..c8e77d34ac10 100644 --- a/arch/arm/configs/multi_v7_defconfig +++ b/arch/arm/configs/multi_v7_defconfig @@ -231,7 +231,7 @@ CONFIG_QCOM_FASTRPC=m CONFIG_APDS9802ALS=y CONFIG_ISL29003=y CONFIG_PCI_ENDPOINT_TEST=m -CONFIG_EEPROM_AT24=y +CONFIG_MTD_EEPROM_AT24=y CONFIG_BLK_DEV_SD=y CONFIG_BLK_DEV_SR=y CONFIG_ATA=y diff --git a/arch/arm/configs/mvebu_v5_defconfig b/arch/arm/configs/mvebu_v5_defconfig index 2467afd32146..13039167401c 100644 --- a/arch/arm/configs/mvebu_v5_defconfig +++ b/arch/arm/configs/mvebu_v5_defconfig @@ -68,7 +68,7 @@ CONFIG_MTD_RAW_NAND=y CONFIG_MTD_NAND_ORION=y CONFIG_MTD_SPI_NOR=y CONFIG_BLK_DEV_LOOP=y -CONFIG_EEPROM_AT24=y +CONFIG_MTD_EEPROM_AT24=y # CONFIG_SCSI_PROC_FS is not set CONFIG_BLK_DEV_SD=y CONFIG_BLK_DEV_SR=m diff --git a/arch/arm/configs/mvebu_v7_defconfig b/arch/arm/configs/mvebu_v7_defconfig index 2d2a4dc8f379..81fa4514457c 100644 --- a/arch/arm/configs/mvebu_v7_defconfig +++ b/arch/arm/configs/mvebu_v7_defconfig @@ -52,7 +52,7 @@ CONFIG_MTD_RAW_NAND=y CONFIG_MTD_NAND_MARVELL=y CONFIG_MTD_SPI_NOR=y CONFIG_MTD_UBI=y -CONFIG_EEPROM_AT24=y +CONFIG_MTD_EEPROM_AT24=y CONFIG_BLK_DEV_SD=y CONFIG_ATA=y CONFIG_SATA_AHCI=y diff --git a/arch/arm/configs/mxs_defconfig b/arch/arm/configs/mxs_defconfig index 43bc1255a5db..6a71f5fc6a23 100644 --- a/arch/arm/configs/mxs_defconfig +++ b/arch/arm/configs/mxs_defconfig @@ -52,7 +52,7 @@ CONFIG_MTD_NAND_GPMI_NAND=y CONFIG_MTD_SPI_NOR=y CONFIG_MTD_UBI=y # CONFIG_BLK_DEV is not set -CONFIG_EEPROM_AT24=y +CONFIG_MTD_EEPROM_AT24=y CONFIG_SCSI=y CONFIG_BLK_DEV_SD=y CONFIG_NETDEVICES=y diff --git a/arch/arm/configs/omap2plus_defconfig b/arch/arm/configs/omap2plus_defconfig index 3a166c2f02bd..84e2ebcec41a 100644 --- a/arch/arm/configs/omap2plus_defconfig +++ b/arch/arm/configs/omap2plus_defconfig @@ -294,7 +294,7 @@ CONFIG_BLK_DEV_RAM_SIZE=16384 CONFIG_SENSORS_TSL2550=m CONFIG_SRAM=y CONFIG_PCI_ENDPOINT_TEST=m -CONFIG_EEPROM_AT24=m +CONFIG_MTD_EEPROM_AT24=m CONFIG_EEPROM_AT25=m CONFIG_BLK_DEV_SD=y # CONFIG_BLK_DEV_BSG is not set diff --git a/arch/arm/configs/pxa_defconfig b/arch/arm/configs/pxa_defconfig index f2ca5c9131b5..a5361194977a 100644 --- a/arch/arm/configs/pxa_defconfig +++ b/arch/arm/configs/pxa_defconfig @@ -155,7 +155,7 @@ CONFIG_AD525X_DPOT_I2C=m CONFIG_ICS932S401=m CONFIG_APDS9802ALS=m CONFIG_ISL29003=m -CONFIG_EEPROM_AT24=m +CONFIG_MTD_EEPROM_AT24=m CONFIG_SENSORS_LIS3_SPI=m CONFIG_SCSI=y CONFIG_BLK_DEV_SD=m diff --git a/arch/arm/configs/s3c6400_defconfig b/arch/arm/configs/s3c6400_defconfig index a37e6ac40825..3d36bcc337fc 100644 --- a/arch/arm/configs/s3c6400_defconfig +++ b/arch/arm/configs/s3c6400_defconfig @@ -14,7 +14,7 @@ CONFIG_MTD_RAW_NAND=y CONFIG_MTD_NAND_S3C2410=y CONFIG_BLK_DEV_LOOP=y CONFIG_BLK_DEV_RAM=y -CONFIG_EEPROM_AT24=y +CONFIG_MTD_EEPROM_AT24=y CONFIG_SERIAL_8250=y CONFIG_SERIAL_SAMSUNG=y CONFIG_SERIAL_SAMSUNG_CONSOLE=y diff --git a/arch/arm/configs/sama5_defconfig b/arch/arm/configs/sama5_defconfig index 9096a99b5abd..f92783f9515e 100644 --- a/arch/arm/configs/sama5_defconfig +++ b/arch/arm/configs/sama5_defconfig @@ -64,7 +64,7 @@ CONFIG_BLK_DEV_RAM=y CONFIG_BLK_DEV_RAM_COUNT=4 CONFIG_BLK_DEV_RAM_SIZE=8192 CONFIG_ATMEL_SSC=y -CONFIG_EEPROM_AT24=y +CONFIG_MTD_EEPROM_AT24=y CONFIG_SCSI=y CONFIG_BLK_DEV_SD=y # CONFIG_BLK_DEV_BSG is not set diff --git a/arch/arm/configs/sama7_defconfig b/arch/arm/configs/sama7_defconfig index 7fa5d251ced2..8998b9cb1fd1 100644 --- a/arch/arm/configs/sama7_defconfig +++ b/arch/arm/configs/sama7_defconfig @@ -95,7 +95,7 @@ CONFIG_BLK_DEV_LOOP=y CONFIG_BLK_DEV_RAM=y CONFIG_BLK_DEV_RAM_COUNT=1 CONFIG_BLK_DEV_RAM_SIZE=8192 -CONFIG_EEPROM_AT24=y +CONFIG_MTD_EEPROM_AT24=y CONFIG_SCSI=y CONFIG_BLK_DEV_SD=y # CONFIG_BLK_DEV_BSG is not set diff --git a/arch/arm/configs/shmobile_defconfig b/arch/arm/configs/shmobile_defconfig index 56925adfe842..4a8360d7ae60 100644 --- a/arch/arm/configs/shmobile_defconfig +++ b/arch/arm/configs/shmobile_defconfig @@ -46,7 +46,7 @@ CONFIG_MTD_CFI_INTELEXT=y CONFIG_MTD_PHYSMAP=y CONFIG_MTD_PHYSMAP_OF=y CONFIG_MTD_SPI_NOR=y -CONFIG_EEPROM_AT24=y +CONFIG_MTD_EEPROM_AT24=y CONFIG_BLK_DEV_SD=y CONFIG_ATA=y CONFIG_SATA_RCAR=y diff --git a/arch/arm/configs/socfpga_defconfig b/arch/arm/configs/socfpga_defconfig index e82c3866b810..3c847568fffa 100644 --- a/arch/arm/configs/socfpga_defconfig +++ b/arch/arm/configs/socfpga_defconfig @@ -53,7 +53,7 @@ CONFIG_BLK_DEV_RAM_COUNT=2 CONFIG_BLK_DEV_RAM_SIZE=8192 CONFIG_BLK_DEV_NVME=m CONFIG_SRAM=y -CONFIG_EEPROM_AT24=y +CONFIG_MTD_EEPROM_AT24=y CONFIG_SCSI=y # CONFIG_SCSI_PROC_FS is not set CONFIG_BLK_DEV_SD=y diff --git a/arch/arm/configs/tegra_defconfig b/arch/arm/configs/tegra_defconfig index d2a094ad360c..c6eab1768591 100644 --- a/arch/arm/configs/tegra_defconfig +++ b/arch/arm/configs/tegra_defconfig @@ -85,7 +85,7 @@ CONFIG_AD525X_DPOT_I2C=y CONFIG_ICS932S401=y CONFIG_APDS9802ALS=y CONFIG_ISL29003=y -CONFIG_EEPROM_AT24=y +CONFIG_MTD_EEPROM_AT24=y CONFIG_BLK_DEV_SD=y CONFIG_BLK_DEV_SR=y # CONFIG_BLK_DEV_BSG is not set diff --git a/arch/arm/configs/wpcm450_defconfig b/arch/arm/configs/wpcm450_defconfig index 45483deab034..c72257276067 100644 --- a/arch/arm/configs/wpcm450_defconfig +++ b/arch/arm/configs/wpcm450_defconfig @@ -50,7 +50,7 @@ CONFIG_MTD_UBI_FASTMAP=y CONFIG_MTD_UBI_BLOCK=y CONFIG_BLK_DEV_LOOP=y CONFIG_SRAM=y -CONFIG_EEPROM_AT24=y +CONFIG_MTD_EEPROM_AT24=y CONFIG_SCSI=y # CONFIG_SCSI_PROC_FS is not set # CONFIG_SCSI_LOWLEVEL is not set From patchwork Mon Jul 1 13:53:45 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marco Felsch X-Patchwork-Id: 13718166 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id BFFE2C2BD09 for ; Mon, 1 Jul 2024 13:55:46 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Cc:To:In-Reply-To:References :Message-Id:Content-Transfer-Encoding:Content-Type:MIME-Version:Subject:Date: From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=uZlmy2BPE8s/+pEAdn3Cly7+g15S817TdG/sX85HQbc=; b=tlDNqr7OJJqoc7XWndrTXwtwow IGKa8C1vKBtsJFwUapP6hbEeRTFM2HTfLhs+8jiSGzJZSZzCJRBuiZ29jOOtVPEIn0cin7ZVcuPXL hkZEP909IXdw5il6s02gGLB7D9CoXo4Cvxy72lgJ5kZDv3rftNdKbo5aa76Dln3LjOz7BuuHIhQPW uqkT1ptU32z+IhPPsWbkL+MYS1utaAl9cgO0VyTXhg5tPhA6Xonz3dpHwi/XY1rnu/h5An7FFohEM CVgL+ayv7u9+kmUXYZfJkBFrU6a7wKaUaODODrZ34Jyr7vjjvJDBRjK3hbEWVohRL1PhfwQkHeJyW jSHbeaZQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sOHVG-00000003bG6-2SWl; Mon, 01 Jul 2024 13:55:34 +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 1sOHUY-00000003ais-16B9 for linux-arm-kernel@lists.infradead.org; Mon, 01 Jul 2024 13:54:53 +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 1sOHTX-0001LY-MS; Mon, 01 Jul 2024 15:53:47 +0200 From: Marco Felsch Date: Mon, 01 Jul 2024 15:53:45 +0200 Subject: [PATCH 6/9] powerpc: convert to MTD_EEPROM_AT24 MIME-Version: 1.0 Message-Id: <20240701-b4-v6-10-topic-usbc-tcpci-v1-6-3fd5f4a193cc@pengutronix.de> References: <20240701-b4-v6-10-topic-usbc-tcpci-v1-0-3fd5f4a193cc@pengutronix.de> In-Reply-To: <20240701-b4-v6-10-topic-usbc-tcpci-v1-0-3fd5f4a193cc@pengutronix.de> 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-arm-kernel@lists.infradead.org X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240701_065450_316450_51FD23D4 X-CRM114-Status: GOOD ( 12.63 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org The EEPROM_AT24 Kconfig symbol is marked as deprecated. Make use of the new Kconfig symbol to select the I2C EEPROM driver support. Signed-off-by: Marco Felsch --- 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 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/arch/powerpc/configs/44x/warp_defconfig b/arch/powerpc/configs/44x/warp_defconfig index 20891c413149..d8cab860c9d9 100644 --- a/arch/powerpc/configs/44x/warp_defconfig +++ b/arch/powerpc/configs/44x/warp_defconfig @@ -36,7 +36,7 @@ CONFIG_MTD_RAW_NAND=y CONFIG_MTD_NAND_NDFC=y CONFIG_MTD_UBI=y CONFIG_BLK_DEV_RAM=y -CONFIG_EEPROM_AT24=y +CONFIG_MTD_EEPROM_AT24=y CONFIG_SCSI=y CONFIG_BLK_DEV_SD=y CONFIG_SCSI_SPI_ATTRS=y diff --git a/arch/powerpc/configs/mpc512x_defconfig b/arch/powerpc/configs/mpc512x_defconfig index d24457bc5791..0a919a76cfb8 100644 --- a/arch/powerpc/configs/mpc512x_defconfig +++ b/arch/powerpc/configs/mpc512x_defconfig @@ -46,7 +46,7 @@ CONFIG_MTD_UBI=y CONFIG_BLK_DEV_RAM=y CONFIG_BLK_DEV_RAM_COUNT=1 CONFIG_BLK_DEV_RAM_SIZE=8192 -CONFIG_EEPROM_AT24=y +CONFIG_MTD_EEPROM_AT24=y CONFIG_EEPROM_AT25=y CONFIG_SCSI=y # CONFIG_SCSI_PROC_FS is not set diff --git a/arch/powerpc/configs/mpc5200_defconfig b/arch/powerpc/configs/mpc5200_defconfig index c0fe5e76604a..8142836ef61a 100644 --- a/arch/powerpc/configs/mpc5200_defconfig +++ b/arch/powerpc/configs/mpc5200_defconfig @@ -38,7 +38,7 @@ CONFIG_MTD_UBI=m CONFIG_BLK_DEV_LOOP=y CONFIG_BLK_DEV_RAM=y CONFIG_BLK_DEV_RAM_SIZE=32768 -CONFIG_EEPROM_AT24=y +CONFIG_MTD_EEPROM_AT24=y CONFIG_BLK_DEV_SD=y CONFIG_CHR_DEV_SG=y CONFIG_ATA=y diff --git a/arch/powerpc/configs/ppc6xx_defconfig b/arch/powerpc/configs/ppc6xx_defconfig index 66c7b28d7450..5bca729a57c2 100644 --- a/arch/powerpc/configs/ppc6xx_defconfig +++ b/arch/powerpc/configs/ppc6xx_defconfig @@ -318,7 +318,7 @@ CONFIG_CDROM_PKTCDVD=m CONFIG_VIRTIO_BLK=m CONFIG_ENCLOSURE_SERVICES=m CONFIG_SENSORS_TSL2550=m -CONFIG_EEPROM_AT24=m +CONFIG_MTD_EEPROM_AT24=m CONFIG_EEPROM_LEGACY=m CONFIG_EEPROM_MAX6875=m CONFIG_EEPROM_93CX6=m diff --git a/arch/powerpc/configs/skiroot_defconfig b/arch/powerpc/configs/skiroot_defconfig index 9d44e6630908..e9be7f217cea 100644 --- a/arch/powerpc/configs/skiroot_defconfig +++ b/arch/powerpc/configs/skiroot_defconfig @@ -77,7 +77,7 @@ CONFIG_BLK_DEV_RAM_SIZE=65536 CONFIG_VIRTIO_BLK=m CONFIG_BLK_DEV_NVME=m CONFIG_NVME_MULTIPATH=y -CONFIG_EEPROM_AT24=m +CONFIG_MTD_EEPROM_AT24=m # CONFIG_CXL is not set # CONFIG_OCXL is not set CONFIG_BLK_DEV_SD=m From patchwork Mon Jul 1 13:53:46 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marco Felsch X-Patchwork-Id: 13718172 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 62870C30653 for ; Mon, 1 Jul 2024 13:56:38 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Cc:To:In-Reply-To:References :Message-Id:Content-Transfer-Encoding:Content-Type:MIME-Version:Subject:Date: From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=uIsEOlFpuWXOq49wZrg8P7MEe74x3OZANyLvEFXUn4w=; b=yvQ2agZwr9HzaYWDGcrFnFQvXM LppYZ35zkiZXU+Ml9arvVDERrGtgStfQpeC+bsVrddhlCNAPWqsN6+F3iz0uH3tH/HeJqtGJx6fFd 34Hm6VT8CDvRJnjCgWGvClEHJjC79CEUvpSo/5AooMQf/hk+rdnXcXB+j07/wWjCl69E3ZuHRpR+0 r0Qahv34/9qhiT4QE74M3ozkgDbA3qtnt+q47Q0PHDAgSuRIZ2OyLlHVF9iseAq5ozS3HxdtfIKBz 03EKn1gsXk4ZIR7kaVLlZFO1OdXICd6thk57oSqFf3gPRCcY0S/A7W0h7pHKgOJLoC9/eyjaRGESJ uLX++P9Q==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sOHW6-00000003bee-1G6W; Mon, 01 Jul 2024 13:56:26 +0000 Received: from desiato.infradead.org ([2001:8b0:10b:1:d65d:64ff:fe57:4e05]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1sOHUl-00000003ath-10PA for linux-arm-kernel@bombadil.infradead.org; Mon, 01 Jul 2024 13:55:03 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=desiato.20200630; h=Cc:To:In-Reply-To:References: Message-Id:Content-Transfer-Encoding:Content-Type:MIME-Version:Subject:Date: From:Sender:Reply-To:Content-ID:Content-Description; bh=uIsEOlFpuWXOq49wZrg8P7MEe74x3OZANyLvEFXUn4w=; b=GH7A5DJwTea4p7Eszn52WHoOvG naLjZbz17V4cn7KOYm6jCv0Z1uW5xQAA3jNf228bquzObF+g+4tN8F6xkntx4ijfTXuAJKG8OC6Vo uRe0HiL8C1uPZiypW4m5gDFV9K4Cy705SNzWfEOqvw32MEqNTsSCvHXZiIeMnYiqqntNmaYAWfTHF cekURbwGN2vBbVX6hro5hfAgavO03LRpTmEqjsXxR9f5KLHrAaM1SYOeGBPXKCTZB4ajgkOOQZ4ba MLtWRX0I6e+OHT8MyTcn5sLXZANx5f80Su8gd6KsvzbtrpZuvn/zL3Q13DOJYp10WwDuqqLqOPjuQ r2tmS3FA==; Received: from metis.whiteo.stw.pengutronix.de ([2a0a:edc0:2:b01:1d::104]) by desiato.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1sOHUg-00000009fWo-1jyZ for linux-arm-kernel@lists.infradead.org; Mon, 01 Jul 2024 13:55:01 +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 1sOHTX-0001LY-Qc; Mon, 01 Jul 2024 15:53:47 +0200 From: Marco Felsch Date: Mon, 01 Jul 2024 15:53:46 +0200 Subject: [PATCH 7/9] MIPS: configs: convert to MTD_EEPROM_AT24 MIME-Version: 1.0 Message-Id: <20240701-b4-v6-10-topic-usbc-tcpci-v1-7-3fd5f4a193cc@pengutronix.de> References: <20240701-b4-v6-10-topic-usbc-tcpci-v1-0-3fd5f4a193cc@pengutronix.de> In-Reply-To: <20240701-b4-v6-10-topic-usbc-tcpci-v1-0-3fd5f4a193cc@pengutronix.de> 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-arm-kernel@lists.infradead.org X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240701_145458_999049_E789114E X-CRM114-Status: GOOD ( 12.15 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org The EEPROM_AT24 Kconfig symbol is marked as deprecated. Make use of the new Kconfig symbol to select the I2C EEPROM driver support. Signed-off-by: Marco Felsch --- arch/mips/configs/cavium_octeon_defconfig | 2 +- arch/mips/configs/db1xxx_defconfig | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/mips/configs/cavium_octeon_defconfig b/arch/mips/configs/cavium_octeon_defconfig index f523ee6f25bf..a5bb80a59c6e 100644 --- a/arch/mips/configs/cavium_octeon_defconfig +++ b/arch/mips/configs/cavium_octeon_defconfig @@ -50,7 +50,7 @@ CONFIG_MTD_CFI=y CONFIG_MTD_CFI_AMDSTD=y CONFIG_MTD_SLRAM=y CONFIG_BLK_DEV_LOOP=y -CONFIG_EEPROM_AT24=y +CONFIG_MTD_EEPROM_AT24=y CONFIG_EEPROM_AT25=y CONFIG_BLK_DEV_SD=y CONFIG_ATA=y diff --git a/arch/mips/configs/db1xxx_defconfig b/arch/mips/configs/db1xxx_defconfig index b2d9253ff786..b1c1777df16c 100644 --- a/arch/mips/configs/db1xxx_defconfig +++ b/arch/mips/configs/db1xxx_defconfig @@ -95,7 +95,7 @@ CONFIG_MTD_NAND_ECC_SW_BCH=y CONFIG_MTD_NAND_AU1550=y CONFIG_MTD_NAND_PLATFORM=y CONFIG_MTD_SPI_NOR=y -CONFIG_EEPROM_AT24=y +CONFIG_MTD_EEPROM_AT24=y CONFIG_EEPROM_AT25=y CONFIG_BLK_DEV_SD=y CONFIG_CHR_DEV_SG=y From patchwork Mon Jul 1 13:53:47 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marco Felsch X-Patchwork-Id: 13718170 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 64292C2BD09 for ; Mon, 1 Jul 2024 13:56:19 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Cc:To:In-Reply-To:References :Message-Id:Content-Transfer-Encoding:Content-Type:MIME-Version:Subject:Date: From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=V36OqNtP66FLS4zxJMHvoTXGW+l6JLq9gyiA1XWb3Uc=; b=uzgwg5zvzBbuAo3FeuKNHrpbvO TMHyDUAQN6MZ+V/891jINA1Tx2TPoawyhgTVts0fKMn8OOjFdOpOK8I9F95Va5wGctdB8Imk1IffZ 0+PSpiNCWZBB1kuVsqvy4k2JAC403mJyjp/Uku8YHPIR/s7tCHdHrgxzhhZht6bIbVx+qrvFBpwiA dPz1hdQykeUbWO+bvWAJAX0uP89QHrLp4+tcqP9znnDSQxAx9ae0ixWSJrQapW6KeOSrvm7ZSq278 G2M+mn26BLynmzTD0QsKoSUzOvE4yry47v3pP7VwIHrXwWDwu/pKv4rl3Q2+aBscOLDqqubpu0+4x rx0RLZ5A==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sOHVn-00000003bU4-370n; Mon, 01 Jul 2024 13:56:07 +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 1sOHUa-00000003akE-2L6w for linux-arm-kernel@lists.infradead.org; Mon, 01 Jul 2024 13:54:55 +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 1sOHTX-0001LY-UP; Mon, 01 Jul 2024 15:53:47 +0200 From: Marco Felsch Date: Mon, 01 Jul 2024 15:53:47 +0200 Subject: [PATCH 8/9] LoongArch: convert to MTD_EEPROM_AT24 MIME-Version: 1.0 Message-Id: <20240701-b4-v6-10-topic-usbc-tcpci-v1-8-3fd5f4a193cc@pengutronix.de> References: <20240701-b4-v6-10-topic-usbc-tcpci-v1-0-3fd5f4a193cc@pengutronix.de> In-Reply-To: <20240701-b4-v6-10-topic-usbc-tcpci-v1-0-3fd5f4a193cc@pengutronix.de> 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-arm-kernel@lists.infradead.org X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240701_065452_825702_C2E16214 X-CRM114-Status: GOOD ( 12.12 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org The EEPROM_AT24 Kconfig symbol is marked as deprecated. Make use of the new Kconfig symbol to select the I2C EEPROM driver support. Signed-off-by: Marco Felsch --- arch/loongarch/configs/loongson3_defconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/loongarch/configs/loongson3_defconfig b/arch/loongarch/configs/loongson3_defconfig index b4252c357c8e..31daff75a01a 100644 --- a/arch/loongarch/configs/loongson3_defconfig +++ b/arch/loongarch/configs/loongson3_defconfig @@ -433,7 +433,7 @@ CONFIG_NVME_TARGET_LOOP=m CONFIG_NVME_TARGET_RDMA=m CONFIG_NVME_TARGET_FC=m CONFIG_NVME_TARGET_TCP=m -CONFIG_EEPROM_AT24=m +CONFIG_MTD_EEPROM_AT24=m CONFIG_BLK_DEV_SD=y CONFIG_BLK_DEV_SR=y CONFIG_CHR_DEV_SG=y From patchwork Mon Jul 1 13:53:48 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marco Felsch X-Patchwork-Id: 13718169 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 121E5C2BD09 for ; Mon, 1 Jul 2024 13:56:13 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Cc:To:In-Reply-To:References :Message-Id:Content-Transfer-Encoding:Content-Type:MIME-Version:Subject:Date: From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=DB7aKAHO6FawpI1W15g6BHuvHS3/HfFmasm2d/h4Fr4=; b=KvgEFkenXD+qtqBCQcD4IxdOSk BEzbJnuaejBCr2SJ2EcACywMxhu71EO9c2gkVR5HDmdPjqedJb/zCmTkJDvB7nKZqdBuxsV3fGo0+ YWBDrB1eKR4QyvAGOjGQ6I8u62a8AnXZ8QxJ/WwsiHKyE1yX7M66Cwxs0KEUgn8DPf+uEY0TL2GEL nV5oAWMXaYmWVX4GdleylRiX1F1aHkfPMVhgrluJ1NFyZEln2e1NUopUGMp1pSCSM5MIsFs2bYr13 lmhKxn/91OVLMNljew1pcQ7nTXv+ZZ64DjnsXLEtcr0iCx60DF8f83FvuAkbUTdhw59PfhcBwDuPH JkyT5L4w==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sOHVf-00000003bPj-2989; Mon, 01 Jul 2024 13:55:59 +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 1sOHUb-00000003akW-00y4 for linux-arm-kernel@lists.infradead.org; Mon, 01 Jul 2024 13:54:55 +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 1sOHTY-0001LY-20; Mon, 01 Jul 2024 15:53:48 +0200 From: Marco Felsch Date: Mon, 01 Jul 2024 15:53:48 +0200 Subject: [PATCH 9/9] eeprom: at24: remove deprecated Kconfig symbol MIME-Version: 1.0 Message-Id: <20240701-b4-v6-10-topic-usbc-tcpci-v1-9-3fd5f4a193cc@pengutronix.de> References: <20240701-b4-v6-10-topic-usbc-tcpci-v1-0-3fd5f4a193cc@pengutronix.de> In-Reply-To: <20240701-b4-v6-10-topic-usbc-tcpci-v1-0-3fd5f4a193cc@pengutronix.de> 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-arm-kernel@lists.infradead.org X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240701_065453_286933_D151C72A X-CRM114-Status: UNSURE ( 9.77 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org All kernel users are shifted to the new MTD_EEPROM_AT24 Kconfig symbol so we can drop the old one. Signed-off-by: Marco Felsch --- drivers/misc/eeprom/Kconfig | 7 ------- 1 file changed, 7 deletions(-) diff --git a/drivers/misc/eeprom/Kconfig b/drivers/misc/eeprom/Kconfig index 3a9aaec2f2c7..9e071cfdc6c6 100644 --- a/drivers/misc/eeprom/Kconfig +++ b/drivers/misc/eeprom/Kconfig @@ -1,13 +1,6 @@ # SPDX-License-Identifier: GPL-2.0-only menu "EEPROM support" -config EEPROM_AT24 - tristate "I2C EEPROMs / RAMs / ROMs from most vendors" - select MTD_EEPROM_AT24 - help - Deprecated config option to get read/write support to most I2C - EEPROMs. Please use MTD_EEPROM_AT24 instead. - config EEPROM_AT25 tristate "SPI EEPROMs (FRAMs) from most vendors" depends on SPI && SYSFS