Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp2460141ybl; Thu, 9 Jan 2020 13:10:30 -0800 (PST) X-Google-Smtp-Source: APXvYqwake1oYEMsMc7WqEhmckRNT4GHXBunpcgJgtDIHExg7yGwsmajkeMpYcDpXaCrsMQ9l4y7 X-Received: by 2002:a05:6830:20cf:: with SMTP id z15mr10212236otq.277.1578604230668; Thu, 09 Jan 2020 13:10:30 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1578604230; cv=none; d=google.com; s=arc-20160816; b=o2jHn1gruhCSiElvOrpVgjE2n0YGzHtd8dY+jqMhWOJaMvp/L0GENA0ihPGnOPjxk3 VPBgODUZKm/Fz2LWoL5zwX6AFOksBjjDsYAQZx3MZZR7MC38nDVkOO+/VchA8FxshT8n gwbl6qFc0f3f97rmyM4kpPjQ0rfM3bKCzSHMEJeCAvNb+FR1bKbHqYxsM3RX58hCmBCl 64kHLpQKY1kcV29jOWfvAEbzG7r7WYWbloQb7S06W5RCg0vqzbFsE2MXz1VmWVTDEe3O YiOksFE7m0XmtUp6m4+FeMzLDVwwANY2uDi2RcMDSQGxUjrB5Cb8gny7A1XsTauFYbhN NzFw== 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=7HVabypFE2JpfEPaaaOEncnmL/2tlS7szDIuSzfNCGA=; b=oXYLSM5/zHdNwOLOGqNnj/QWgsyIsxpXaDoyzzk0vd3kizCxxYS6BNl+W2uCoGjq8d FJDJ0+4AlSHKn5GPaU8Ik2rrCxAK6tkWmS9Kz+qr7Jv4W7u7Qf99mU5mJsGAb8luVnAu BfRWEHtTNQxTy4zZpGjbLINtr6lYtTx/tYvFmtgjb88NzyXcaqEdOYcAXln+an3iuBPP M6CcLQ3mqGo334423rYe4kQFgvkcFl4IYI1ly/nBgD0JUg1YAgF03RnO6isifOsuxTs3 U7KjSvwsmI6PJ/Ih3M8ys2HpXx6cRSAfxz6ZnBxI+vHIMpb97ZUEJl8j6WNzxtp+NIpJ c1qw== 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=collabora.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id a29si4885387otd.268.2020.01.09.13.10.19; Thu, 09 Jan 2020 13:10:30 -0800 (PST) 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=collabora.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730267AbgAITa7 (ORCPT + 99 others); Thu, 9 Jan 2020 14:30:59 -0500 Received: from bhuna.collabora.co.uk ([46.235.227.227]:44222 "EHLO bhuna.collabora.co.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728823AbgAITa7 (ORCPT ); Thu, 9 Jan 2020 14:30:59 -0500 Received: from localhost (unknown [IPv6:2a01:e0a:2c:6930:5cf4:84a1:2763:fe0d]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) (Authenticated sender: bbrezillon) by bhuna.collabora.co.uk (Postfix) with ESMTPSA id 19D4E2934E8; Thu, 9 Jan 2020 19:30:58 +0000 (GMT) Date: Thu, 9 Jan 2020 20:30:55 +0100 From: Boris Brezillon To: Mason Yang Cc: miquel.raynal@bootlin.com, richard@nod.at, marek.vasut@gmail.com, dwmw2@infradead.org, bbrezillon@kernel.org, computersforpeace@gmail.com, vigneshr@ti.com, juliensu@mxic.com.tw, linux-kernel@vger.kernel.org, linux-mtd@lists.infradead.org Subject: Re: [PATCH v2 1/4] mtd: rawnand: Add support manufacturer specific lock/unlock operatoin Message-ID: <20200109203055.2370a358@collabora.com> In-Reply-To: <1572256527-5074-2-git-send-email-masonccyang@mxic.com.tw> References: <1572256527-5074-1-git-send-email-masonccyang@mxic.com.tw> <1572256527-5074-2-git-send-email-masonccyang@mxic.com.tw> Organization: Collabora X-Mailer: Claws Mail 3.17.4 (GTK+ 2.24.32; x86_64-redhat-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, 28 Oct 2019 17:55:24 +0800 Mason Yang wrote: > /* Set default functions */ > static void nand_set_defaults(struct nand_chip *chip) > { > @@ -5782,8 +5810,8 @@ static int nand_scan_tail(struct nand_chip *chip) > mtd->_read_oob = nand_read_oob; > mtd->_write_oob = nand_write_oob; > mtd->_sync = nand_sync; > - mtd->_lock = NULL; > - mtd->_unlock = NULL; > + mtd->_lock = nand_lock; > + mtd->_unlock = nand_unlock; > mtd->_suspend = nand_suspend; > mtd->_resume = nand_resume; > mtd->_reboot = nand_shutdown; > diff --git a/include/linux/mtd/rawnand.h b/include/linux/mtd/rawnand.h > index 4ab9bcc..2430ecd 100644 > --- a/include/linux/mtd/rawnand.h > +++ b/include/linux/mtd/rawnand.h > @@ -1136,6 +1136,9 @@ struct nand_chip { > const struct nand_manufacturer *desc; > void *priv; > } manufacturer; > + > + int (*_lock)(struct nand_chip *chip, loff_t ofs, uint64_t len); > + int (*_unlock)(struct nand_chip *chip, loff_t ofs, uint64_t len); Please drop this _ prefix. > };