From patchwork Tue Jan 3 16:59:27 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Russell King (Oracle)" X-Patchwork-Id: 13087858 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 8E4B0C3DA7D for ; Tue, 3 Jan 2023 18:27:55 +0000 (UTC) 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:Date:Message-Id: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-Owner; bh=pyD1ys+iXoUNgbFDBYYut88slj/WyCPRV98ud4UHCw4=; b=ofg0tuP9BtBDMS r9JrEoIUM8r3pXnPr8NM80VwFQsh8IyglC46k2GQ/MfscX9NkpJuu7InXMPzMG3EnR8Xtca1jCXJd eHXp9jZT66oI88IMWdSlpRe5N7QdTRCXT3XsziDJ/wPzmiwJ+23Zeyii+7leK2v4MuBj7q0hNX31m cClCE5Aa6mrNtcrRgpe7EXdi2SV+f6eb0yKqyslp0S7fT8egJT/hflMovBIB6nkSzIsuYjfCmAwdK mK586kJQU9I1bUSgu9B92GpcxKWxOGWuE20AdBluBqp/cI7wF9dQN89drq+hXvrB5LJ2ubgx0ifEo f3CYpGnzIkPlffywio7Q==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1pClz0-003rPX-G0; Tue, 03 Jan 2023 18:25:55 +0000 Received: from pandora.armlinux.org.uk ([2001:4d48:ad52:32c8:5054:ff:fe00:142]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1pCkdN-003Awc-MY for linux-arm-kernel@lists.infradead.org; Tue, 03 Jan 2023 16:59:31 +0000 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 Message-Id: Date: Tue, 03 Jan 2023 16:59:27 +0000 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230103_085929_834260_0B686A4B X-CRM114-Status: GOOD ( 11.60 ) 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 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) nvmem->id = rval; - if (config->wp_gpio) - nvmem->wp_gpio = config->wp_gpio; - else if (!config->ignore_wp) + if (!config->ignore_wp) nvmem->wp_gpio = 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;