Received: by 2002:a25:d7c1:0:0:0:0:0 with SMTP id o184csp3915151ybg; Mon, 21 Oct 2019 00:27:57 -0700 (PDT) X-Google-Smtp-Source: APXvYqzFAYQP5YcV08Al3FXVm+C+w1ACxW4hvFJhyTAjHGpZWOew9n8agGpnKRlvBvLYJtP0OHjS X-Received: by 2002:a17:906:6094:: with SMTP id t20mr20803812ejj.316.1571642877322; Mon, 21 Oct 2019 00:27:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1571642877; cv=none; d=google.com; s=arc-20160816; b=QLWee6pYlJQ05Vf25MsNVZ08nmK3sqKDSxd6ubD1rUaQb9KV4wPqFd1BOeR7BTypH4 H0y/ClXlHP2Acd7nuPBmGXRCBFRsUDBcf7ubuLiHXJ68VGdLI2L9q2oSZZIZn8saBtHY Hg2otNW1lW6mk10vulqLSuJPtABQjrhZJLJkFOXbw27zhNrh/29w9VydN/gJuwYtIPbn 9jguKgL4IjadrYS/0Onn1X18pBAyD+AHtjp7upWFw3YRyxJXyrYiQIX7tTacggzSRFyW WJMwrasFk8HLlPkksNmKK+i7m96d67hRCkcnRyp3UnwGL5BDVIY4racmS9FYZCP4zDUR gDfg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:to:date:from:message-id:mime-version :subject:cc:references:in-reply-to; bh=5HvLJD4YCgt4y2iVbAaJngmh3gaVyS0j0cbVD3H1CcE=; b=0Tbu57JAEytlzfeZtKapgDbx45oc++U6xOIiewK7DXdnjlnjWZrMCCf1iT0+xz812Y jxshMD449xumk6WgbTmp0sbSdeumKvYvoW7WU61vkEI88379izN4LDfrJHtWKtBUkGfc Al7iqRXq4E9+K/Gb+/TX1U/TtjGr1mES1bYu26Z8IBSiyKHXOro1ARpAqZqqVrT5rDg6 CM2J6Lq4NeYOkGCb2EDHgWiCqJpOp8ghhQQ2JEZstZuf0lkKHqPJFMLH43upE6J/LXOI Sk/Y1xc8ok0Avr0iOR6xEg31B6LBzzeUS9mx6Z31dGcuZTro3t2kbAsY7e7TFm1HX1do IVRA== 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 b8si7740799eju.351.2019.10.21.00.27.33; Mon, 21 Oct 2019 00:27:57 -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 S1727481AbfJUHYC (ORCPT + 99 others); Mon, 21 Oct 2019 03:24:02 -0400 Received: from twhmllg4.macronix.com ([122.147.135.202]:11104 "EHLO TWHMLLG4.macronix.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727047AbfJUHYC (ORCPT ); Mon, 21 Oct 2019 03:24:02 -0400 Received: from twhfmnt1.mxic.com.tw (twhfm1p2.macronix.com [172.17.20.92]) by TWHMLLG4.macronix.com with ESMTP id x9L7NsEP063347; Mon, 21 Oct 2019 15:23:54 +0800 (GMT-8) (envelope-from masonccyang@mxic.com.tw) Received: from MXML06C.mxic.com.tw (mxml06c.mxic.com.tw [172.17.14.55]) by Forcepoint Email with ESMTP id 871A5A0A7356F4B7AAD3; Mon, 21 Oct 2019 15:23:55 +0800 (CST) In-Reply-To: References: <1568793387-25199-1-git-send-email-masonccyang@mxic.com.tw> <1568793387-25199-2-git-send-email-masonccyang@mxic.com.tw> <20191007104511.5aa7b8f2@xps13> <20191007112442.783e4fbe@xps13> <20191008170249.06bd45ce@xps13> Cc: bbrezillon@kernel.org, computersforpeace@gmail.com, dwmw2@infradead.org, frieder.schrempf@kontron.de, gregkh@linuxfoundation.org, juliensu@mxic.com.tw, linux-kernel@vger.kernel.org, linux-mtd@lists.infradead.org, marcel.ziswiler@toradex.com, marek.vasut@gmail.com, "Miquel Raynal" , richard@nod.at, tglx@linutronix.de, vigneshr@ti.com Subject: Re: [PATCH RFC 2/3] mtd: rawnand: Add support Macronix Block Protection function MIME-Version: 1.0 X-KeepSent: 894937F3:4B6774EB-4825849A:0027B2DF; type=4; name=$KeepSent X-Mailer: Lotus Notes Release 8.5.3FP4 SHF90 June 10, 2013 Message-ID: From: masonccyang@mxic.com.tw Date: Mon, 21 Oct 2019 15:23:57 +0800 X-MIMETrack: Serialize by Router on MXML06C/TAIWAN/MXIC(Release 9.0.1FP10 HF265|July 25, 2018) at 2019/10/21 PM 03:23:55, Serialize complete at 2019/10/21 PM 03:23:55 Content-Type: text/plain; charset="US-ASCII" X-MAIL: TWHMLLG4.macronix.com x9L7NsEP063347 To: unlisted-recipients:; (no To-header on input) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Miquel, > > > > Then fill-in these two hooks from the manufacturer code, without the > > > > postponed init. > > > > > > > > > > But in the final of nand_scan_tail(), mtd->_lock/_unlock will be > > > filled by NULL, right ? > > > > The NAND core should set mtd->_lock/_unlock() to NAND specific hooks so > > that the MTD layer is abstracted and and drivers do not see it. Then, > > in the NAND helper, either there is no specific hook defined by a > > manufacturer driver and you return -ENOTSUPP, or you execute the > > defined hook. > > okay, patch specific manufacturer _lock/_unlock driver > in nand_manufacturer_init(); > > and in the final of nand_scan_tail() > if (!mtd->_lock) > mtd->_lock = NULL; > if (!mtd->_unlock) > mtd->_unlock = NULL; I'm still considering of post_init() in nand_scan_tail() for MTD layer default call-back function replacement because there would be more call-back functions need it. i.e., MTD->_lock/_unlokc MTD->_suspend/_resume NTD->_point/_unpoint ... actually, my patch series are including MTD->_locl/_unlock and MTD->_suspend/_resume. how do you think ? thanks for your time & comments. Mason CONFIDENTIALITY NOTE: This e-mail and any attachments may contain confidential information and/or personal data, which is protected by applicable laws. Please be reminded that duplication, disclosure, distribution, or use of this e-mail (and/or its attachments) or any part thereof is prohibited. If you receive this e-mail in error, please notify us immediately and delete this mail as well as its attachment(s) from your system. In addition, please be informed that collection, processing, and/or use of personal data is prohibited unless expressly permitted by personal data protection laws. Thank you for your attention and cooperation. Macronix International Co., Ltd. ===================================================================== ============================================================================ CONFIDENTIALITY NOTE: This e-mail and any attachments may contain confidential information and/or personal data, which is protected by applicable laws. Please be reminded that duplication, disclosure, distribution, or use of this e-mail (and/or its attachments) or any part thereof is prohibited. If you receive this e-mail in error, please notify us immediately and delete this mail as well as its attachment(s) from your system. In addition, please be informed that collection, processing, and/or use of personal data is prohibited unless expressly permitted by personal data protection laws. Thank you for your attention and cooperation. Macronix International Co., Ltd. =====================================================================