From nobody Tue Sep 16 14:10:50 2025 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id B9C2EC3DA7D for ; Tue, 3 Jan 2023 16:59:35 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237883AbjACQ7e (ORCPT ); Tue, 3 Jan 2023 11:59:34 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40482 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230373AbjACQ7b (ORCPT ); Tue, 3 Jan 2023 11:59:31 -0500 Received: from pandora.armlinux.org.uk (pandora.armlinux.org.uk [IPv6:2001:4d48:ad52:32c8:5054:ff:fe00:142]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 51FB011C2C for ; Tue, 3 Jan 2023 08:59:30 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=armlinux.org.uk; s=pandora-2019; h=Date:Sender:Message-Id:Content-Type: Content-Transfer-Encoding:MIME-Version:Subject:Cc:To:From:References: In-Reply-To:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help: List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=KxDyg/GasjWDjvCU9MW5uVhbKubIVJtCyCcgRXieImg=; b=Y16nKBoLPskcCMgvh0caSjOwkI fT2US/T+l9T2zro22ZrHvU0n/XqIqaClSz9ehNxn66ilkEHexwN/08jCD4rv+X0+PMmMOudqsvzqt wPSMUtDR0bCJAhtkky77qHqBKdFdgSxFr4pxku+cEUk+vchFfyd45AmjL/EJopEd2meFmX/NnEof7 DNYahTLddJ/OYOvIb0uqvet4RqWrQ9/TRYs1v9Assw45wjUzcZqqtTtojRNbY23pVJP2Ck77+Z10U +S92GpzCJ78UcwN+qxsiUpeNwGBV2bMRA2IaCyBiU4LMW0QHzTVLz3v5bmegzY1l9GsupzZr7nlbS jxciwatQ==; Received: from e0022681537dd.dyn.armlinux.org.uk ([fd8f:7570:feb6:1:222:68ff:fe15:37dd]:33942 helo=rmk-PC.armlinux.org.uk) by pandora.armlinux.org.uk with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1pCkdM-0005cJ-2W; Tue, 03 Jan 2023 16:59:27 +0000 Received: from rmk by rmk-PC.armlinux.org.uk with local (Exim 4.94.2) (envelope-from ) id 1pCkdL-004huw-4D; Tue, 03 Jan 2023 16:59:27 +0000 In-Reply-To: References: From: "Russell King (Oracle)" To: Srinivas Kandagatla Cc: Bartosz Golaszewski , Gaosheng Cui , Greg Kroah-Hartman , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Maxime Ripard , Hector Martin Subject: [PATCH v3 3/5] nvmem: core: remove nvmem_config wp_gpio Bartosz Golaszewski ,Gaosheng Cui ,Greg Kroah-Hartman ,linux-arm-kernel@lists.infradead.org,linux-kernel@vger.kernel.org,Maxime Ripard , Hector Martin MIME-Version: 1.0 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Message-Id: Sender: Russell King Date: Tue, 03 Jan 2023 16:59:27 +0000 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org No one provides wp_gpio, so let's remove it to avoid issues with the nvmem core putting this gpio. Signed-off-by: Russell King (Oracle) --- drivers/nvmem/core.c | 4 +--- include/linux/nvmem-provider.h | 2 -- 2 files changed, 1 insertion(+), 5 deletions(-) diff --git a/drivers/nvmem/core.c b/drivers/nvmem/core.c index c1a40d9c3825..843e2f5696e6 100644 --- a/drivers/nvmem/core.c +++ b/drivers/nvmem/core.c @@ -772,9 +772,7 @@ struct nvmem_device *nvmem_register(const struct nvmem_= config *config) =20 nvmem->id =3D rval; =20 - if (config->wp_gpio) - nvmem->wp_gpio =3D config->wp_gpio; - else if (!config->ignore_wp) + if (!config->ignore_wp) nvmem->wp_gpio =3D gpiod_get_optional(config->dev, "wp", GPIOD_OUT_HIGH); if (IS_ERR(nvmem->wp_gpio)) { diff --git a/include/linux/nvmem-provider.h b/include/linux/nvmem-provider.h index 50caa117cb62..bb15c9234e21 100644 --- a/include/linux/nvmem-provider.h +++ b/include/linux/nvmem-provider.h @@ -70,7 +70,6 @@ struct nvmem_keepout { * @word_size: Minimum read/write access granularity. * @stride: Minimum read/write access stride. * @priv: User context passed to read/write callbacks. - * @wp-gpio: Write protect pin * @ignore_wp: Write Protect pin is managed by the provider. * * Note: A default "nvmem" name will be assigned to the device if @@ -85,7 +84,6 @@ struct nvmem_config { const char *name; int id; struct module *owner; - struct gpio_desc *wp_gpio; const struct nvmem_cell_info *cells; int ncells; const struct nvmem_keepout *keepout; --=20 2.30.2