Received: by 2002:a25:e7d8:0:0:0:0:0 with SMTP id e207csp278143ybh; Wed, 11 Mar 2020 00:43:43 -0700 (PDT) X-Google-Smtp-Source: ADFU+vs12s6AK/CVauFsRxn1bLIl/xJ5PQ2DFVRTosZqKt1L3zgw/cd8Z3dQbYklWy7m7gJ+68+E X-Received: by 2002:a05:6830:10da:: with SMTP id z26mr1258668oto.27.1583912623070; Wed, 11 Mar 2020 00:43:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1583912623; cv=none; d=google.com; s=arc-20160816; b=gmfsSGsPcfou8Jsi0zheYjBlJ97pzdPrnGvz40u0ZbgWxhgFf2r+uyBczr/qksMYph IGzx6sMKrsD29dOvRFRWz/cs2gLICZmbyRF1fQbjLs0wCidWNezHDGqM6W6Sawq9m2ls xJ3na7Yhmic2fWKeKk+/lRSHSmCrDpLbWgiPH2KZxbK9N6al+YQFDoP3a2EufKxJ3ycW HvY3s+ZY+amBAZ1N/1Dq1LHrGnMLz2VkIZps3g2YJa7GX81sacHKyY+gy1YSaKMrgKHs KNL0rB9OT1ixBac0jp7J7ZNUadkAJpQIQsNYlBGkCHGGKX2IfeoXUTfh9eHDYlmE0h0a /SLw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :organization:references:in-reply-to:message-id:subject:cc:to:from :date; bh=uarH7RWJ9i6J9OfGhp6+Fin2I59Y0lWYj4MC6ZHb2ps=; b=Ev3ItgJz4t54jNpxd2cdNtbVTOedBrroPp96E5c6ihOlP6DZ1Q8+GiPf/cuT/H+tNy 4WCyfZ284NQ+h/1KCbMKb6iYQ4kFRHcJp2785Te89Spmclf5E0F9lIpkQU15MJ4SnLSq 9tsx1B+ek1Ifu+iSrW4qhHKSgfgk93XZ8mGJPcpVvYlVrpVlf1HDKAhJj79serV4LOGS K+vvnia+EYXZR9/LtX87suNddjCMzgpPmHxDrSn7dyAqmJCZu2V40i914ofrL4IbIgat 5se0rB4bIamkXw54AukpJiVbqDy6fwvKQXElRfquqqEz47Tw0T1jGATQKWolh9sniZIg ojrw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id f18si780272oti.289.2020.03.11.00.43.30; Wed, 11 Mar 2020 00:43:43 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728459AbgCKHnL convert rfc822-to-8bit (ORCPT + 99 others); Wed, 11 Mar 2020 03:43:11 -0400 Received: from relay8-d.mail.gandi.net ([217.70.183.201]:50665 "EHLO relay8-d.mail.gandi.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726362AbgCKHnK (ORCPT ); Wed, 11 Mar 2020 03:43:10 -0400 X-Originating-IP: 90.89.41.158 Received: from xps13 (lfbn-tou-1-1473-158.w90-89.abo.wanadoo.fr [90.89.41.158]) (Authenticated sender: miquel.raynal@bootlin.com) by relay8-d.mail.gandi.net (Postfix) with ESMTPSA id D9B991BF20B; Wed, 11 Mar 2020 07:43:04 +0000 (UTC) Date: Wed, 11 Mar 2020 08:43:04 +0100 From: Miquel Raynal To: masonccyang@mxic.com.tw Cc: "Boris Brezillon" , allison@lohutok.net, bbrezillon@kernel.org, frieder.schrempf@kontron.de, juliensu@mxic.com.tw, linux-kernel@vger.kernel.org, linux-mtd@lists.infradead.org, rfontana@redhat.com, richard@nod.at, s.hauer@pengutronix.de, stefan@agner.ch, tglx@linutronix.de, vigneshr@ti.com, yuehaibing@huawei.com Subject: Re: [PATCH v3 3/4] mtd: rawnand: Add support manufacturer specific suspend/resume operation Message-ID: <20200311084304.580bec79@xps13> In-Reply-To: References: <1583220084-10890-1-git-send-email-masonccyang@mxic.com.tw> <1583220084-10890-4-git-send-email-masonccyang@mxic.com.tw> <20200310203310.5fe74c57@collabora.com> Organization: Bootlin X-Mailer: Claws Mail 3.17.4 (GTK+ 2.24.32; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8BIT Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Mason, masonccyang@mxic.com.tw wrote on Wed, 11 Mar 2020 13:40:52 +0800: > Hi Boris, > > > > diff --git a/include/linux/mtd/rawnand.h b/include/linux/mtd/rawnand.h > > > index bc2fa3c..c0055ed 100644 > > > --- a/include/linux/mtd/rawnand.h > > > +++ b/include/linux/mtd/rawnand.h > > > @@ -1064,6 +1064,8 @@ struct nand_legacy { > > > * @lock: lock protecting the suspended field. Also used to > > > * serialize accesses to the NAND device. > > > * @suspended: set to 1 when the device is suspended, 0 when > it's not. > > > + * @_suspend: [REPLACEABLE] specific NAND device suspend > operation > > > + * @_resume: [REPLACEABLE] specific NAND device resume operation > > > * @bbt: [INTERN] bad block table pointer > > > * @bbt_td: [REPLACEABLE] bad block table descriptor for flash > > > * lookup. > > > @@ -1119,6 +1121,8 @@ struct nand_chip { > > > > > > struct mutex lock; > > > unsigned int suspended : 1; > > > + int (*_suspend)(struct nand_chip *chip); > > > + void (*_resume)(struct nand_chip *chip); > > > > I thought we agreed on not prefixing new hooks with _ ? > > For [PATCH v2] series, you mentioned to drop the _ prefix > of _lock/_unlock only and we finally patched to lock_area/unlock_area. > I missed this _, this is not something we want to add. Also, when applying your patches I had several issues because they where not base on the last -rc1. Finally, I think I forgot a line when patching manually so it produces a warning now. I am dropping patch 3 and 4, I keep patch 1 and 2 which seem fine. Please send a rebased and edited v4 for these, don't forget to drop the kbuildtest robot tag and please also follow these slightly edited commit logs: 2/4 mtd: rawnand: Add support for manufacturer specific suspend/resume operation Patch nand_suspend() & nand_resume() to let manufacturers overwrite suspend/resume operations. 3/4 mtd: rawnand: macronix: Add support for deep power down mode Macronix AD series support deep power down mode for a minimum power consumption state. Overlaod nand_suspend() & nand_resume() in Macronix specific code to support deep power down mode. Thanks, Miquèl