Received: by 2002:a05:6a10:7420:0:0:0:0 with SMTP id hk32csp1390410pxb; Fri, 18 Feb 2022 06:55:17 -0800 (PST) X-Google-Smtp-Source: ABdhPJxRpY7HZVNVtSN8mwz+edXYxDrqjUZI3Yq4JcXc5WWN5H8ci0sPdJ7mEAUn87kLIexSaPU2 X-Received: by 2002:a17:902:a9c3:b0:14d:c5cc:d26c with SMTP id b3-20020a170902a9c300b0014dc5ccd26cmr7964416plr.18.1645196117300; Fri, 18 Feb 2022 06:55:17 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1645196117; cv=none; d=google.com; s=arc-20160816; b=fyPfyj/zvkvsHdiAAlDV2SH8KuSjWw+z4nIc+yzYD0ZcpiAGgn2gKNJWyQsP9CGQXT kVyZG/AEipMbce3GZoZv6viDXmIeMvyh2pHUZjVv5699PTMBG2yyYm49bqp3xBISqZfh nKUiGIXHD16Xacib1Xf+V9LtYIhF/7XAiIOibTEBfwC3TBwKsU5MnBes8X01rH86we+n +xXXTpXI5Il8rgrMzmzyaLN1Fu2EfnfUdjnnNhXRee5ojoEVuEWKpvmHUOENG4kVJ6n9 nQ8BhrZj6k/pE2A2VHO1iDtLKeuimmOz7WkWczdnOANFm6sANRDd38Ft4zudXcLuls0F JGDg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :organization:references:in-reply-to:message-id:subject:cc:to:from :date:dkim-signature; bh=UJEWhVniuoP8Wv8IPEKZ0mxt7FVUl58XIp244xy2duY=; b=geMzf/YJlAvMJPrgprQJdPpw9tKcC0+gE4Ee9vWs6PlLWM8T9aEPbRFipSi4SzLgeo E997xTw/90LO0nsqLv7bdYfc5gTmnGvJkojWsCWjPSyxUkIHwTkUhPTJZgIHMg/nj7u/ GviIYn23qEUBSV3a7sMKJJVvoEzPpg4NFV2ZdDHLdvQYqFV3LF7IdKmtQZpN21AxLsAz /Ob/lug/nr1UNkIFPi2a9EUHoYDFwG87ehzIK3JariLsJiJBfbWB61tbShY/mUUUAuOt 3KtoV3HesL1bO6rWNTb5C11Xyz7TTh0RACo9t2PV45/kS8myqnsXS4Dr6/xf8pQRz7PH diLA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@bootlin.com header.s=gm1 header.b=LzULFzHX; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=bootlin.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id p24si22997413plo.435.2022.02.18.06.55.00; Fri, 18 Feb 2022 06:55:17 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@bootlin.com header.s=gm1 header.b=LzULFzHX; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=bootlin.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235746AbiBRNXG (ORCPT + 99 others); Fri, 18 Feb 2022 08:23:06 -0500 Received: from mxb-00190b01.gslb.pphosted.com ([23.128.96.19]:57094 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229719AbiBRNXF (ORCPT ); Fri, 18 Feb 2022 08:23:05 -0500 Received: from relay7-d.mail.gandi.net (relay7-d.mail.gandi.net [IPv6:2001:4b98:dc4:8::227]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DEA4C25B2E9; Fri, 18 Feb 2022 05:22:47 -0800 (PST) Received: (Authenticated sender: miquel.raynal@bootlin.com) by mail.gandi.net (Postfix) with ESMTPSA id 3FC0120005; Fri, 18 Feb 2022 13:22:42 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=gm1; t=1645190565; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=UJEWhVniuoP8Wv8IPEKZ0mxt7FVUl58XIp244xy2duY=; b=LzULFzHXsRRMF/aaeUa6mektFIhZ/f4dORt1x78hcfXZk8QMj48BuH8gh7qoyc6wfcHThY zhrt5FC4FAdBUMV3YeI9NOiNpSXdyoWP2+MPZ8TcIosg1qGrBg7UOYgDgQ+qg4yvRYpBth v+8+KxvTRGdZLKZYke3qEFEeqdJwnss38RIEmQDMkmPltaoPB6hegkO0F3oynxVYfL8OOX yHnsv9FKWxmRQLWLJwBMH/z8ewDRHmiRRyICIAikcrZLlGFK9bR4ZtIHZhqUdAHGOE6wgI Dquwt5s2PGZTUWEYb3u3Wuggoi3NK9KEHevrLyJG5F1cByqvFwD2YNNtRkbxOQ== Date: Fri, 18 Feb 2022 14:22:41 +0100 From: Miquel Raynal To: Christophe Kerello Cc: , , , , , , , , , , Subject: Re: [PATCH v3 4/4] mtd: core: Fix a conflict between MTD and NVMEM on wp-gpios property Message-ID: <20220218142241.7a86aebb@xps13> In-Reply-To: <20220217144755.270679-5-christophe.kerello@foss.st.com> References: <20220217144755.270679-1-christophe.kerello@foss.st.com> <20220217144755.270679-5-christophe.kerello@foss.st.com> Organization: Bootlin X-Mailer: Claws Mail 3.17.7 (GTK+ 2.24.32; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Srinivas, christophe.kerello@foss.st.com wrote on Thu, 17 Feb 2022 15:47:55 +0100: > Wp-gpios property can be used on NVMEM nodes and the same property can > be also used on MTD NAND nodes. In case of the wp-gpios property is > defined at NAND level node, the GPIO management is done at NAND driver > level. Write protect is disabled when the driver is probed or resumed > and is enabled when the driver is released or suspended. >=20 > When no partitions are defined in the NAND DT node, then the NAND DT node > will be passed to NVMEM framework. If wp-gpios property is defined in > this node, the GPIO resource is taken twice and the NAND controller > driver fails to probe. >=20 > A new Boolean flag named ignore_wp has been added in nvmem_config. > In case ignore_wp is set, it means that the GPIO is handled by the > provider. Lets set this flag in MTD layer to avoid the conflict on > wp_gpios property. >=20 > Fixes: 2a127da461a9 ("nvmem: add support for the write-protect pin") > Signed-off-by: Christophe Kerello > Cc: stable@vger.kernel.org You can take patches 3 and 4 through the nvmem tree. Acked-by: Miquel Raynal Thanks, Miqu=C3=A8l