Received: by 2002:ac0:a582:0:0:0:0:0 with SMTP id m2-v6csp1014903imm; Thu, 4 Oct 2018 07:01:38 -0700 (PDT) X-Google-Smtp-Source: ACcGV63RebHIhVHiuSFiLRZFIFby+Bi1P3yb6CbRDq0kI02qLXJEgyZ4wtm3Z5JSrdsZ8C3iH0eY X-Received: by 2002:a17:902:b70d:: with SMTP id d13-v6mr6721747pls.44.1538661698322; Thu, 04 Oct 2018 07:01:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1538661698; cv=none; d=google.com; s=arc-20160816; b=zfBxqCi5mvEYlEujINbTrPzHSWEmBgnbiHczHNJ48lIO+v8NUdvTxb7TX3DRQB0f87 ZKhJYOUQ/D8Wh//HpTVpMBtmaxb7/2oYaU04NTgVLk7R39ZJJXfn1eZuvh7RJGMarMyp ij3SVvX5a20GarcnRbTaj4MFqPI3nu4ohiToMrFUX+7mBY51QiXEYix7EMKY5qcNOCEN P/lpCzrHhOm1LFWb8olPaLSkTmHUDJfI009SCRcWu8Xh7exTE++DJTkKCvd2BAUyMk23 7C0LEsYbHrZzP/vUFgNpXfkmBwqyxnQrd8rqMjvlaboYxxmi5gx8CIaFVmhHE5eQ3krr xC0g== 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 :references:in-reply-to:message-id:subject:cc:to:from:date; bh=b4k6Q359WaC7K3DKbfNPEYrQnu8jz+T0pxUUAGLjnrQ=; b=LVa8MscFIr00ueXxIu1IYNjunlLfs+1/fiFjEn/mDwrFyxktWBdu3ZAiQqfHWBJLKF 4czwRwdFKOloKl+RGfXCx75NTPuPZurU+UYkuAx9sDnRCfkw9F2cnRgmi9owcWJX02yg 1WYFg9Co5AV9Zg9ZladumCKtIzojun0SBH04snDUToLtKATqExy0oK/CcTe/Ttx66XFg e6EOmyGykZKnnHp3F8j34gOchqRxMkDRXrEZ4cHK1crhArACRaNCtJHFUyBgLtsBZFwA Lqpj6hawdNTLr8H/9naNM9VZaclciJhoA2MkPj2HdHItTG5Z2wR+gWspywKHnVaNbuKP f8Lg== 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 v33-v6si4876624pga.450.2018.10.04.07.01.22; Thu, 04 Oct 2018 07:01:38 -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 S1727661AbeJDUxB (ORCPT + 99 others); Thu, 4 Oct 2018 16:53:01 -0400 Received: from mail.bootlin.com ([62.4.15.54]:40467 "EHLO mail.bootlin.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727314AbeJDUxB (ORCPT ); Thu, 4 Oct 2018 16:53:01 -0400 Received: by mail.bootlin.com (Postfix, from userid 110) id 3221E208B7; Thu, 4 Oct 2018 15:59:33 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on mail.bootlin.com X-Spam-Level: X-Spam-Status: No, score=-1.0 required=5.0 tests=ALL_TRUSTED,SHORTCIRCUIT shortcircuit=ham autolearn=disabled version=3.4.0 Received: from bbrezillon (AAubervilliers-681-1-28-153.w90-88.abo.wanadoo.fr [90.88.148.153]) by mail.bootlin.com (Postfix) with ESMTPSA id EA5EE20890; Thu, 4 Oct 2018 15:59:32 +0200 (CEST) Date: Thu, 4 Oct 2018 15:59:33 +0200 From: Boris Brezillon To: Janusz Krzysztofik Cc: Miquel Raynal , Richard Weinberger , David Woodhouse , Brian Norris , Marek Vasut , linux-mtd@lists.infradead.org, linux-kernel@vger.kernel.org Subject: Re: [RFC PATCH] mtd: rawnand: ams-delta: use ->exec_op() Message-ID: <20181004155933.0a32c4ac@bbrezillon> In-Reply-To: <7546835.d2Xs8Qh0bZ@z50> References: <20180719081508.5dafebde@bbrezillon> <4278198.vlhjLe5TOR@z50> <20181003160634.147dd95c@bbrezillon> <7546835.d2Xs8Qh0bZ@z50> X-Mailer: Claws Mail 3.15.0-dirty (GTK+ 2.24.31; x86_64-pc-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 Thu, 04 Oct 2018 15:52:57 +0200 Janusz Krzysztofik wrote: > Hi Boris, > > On Wednesday, October 3, 2018 4:06:34 PM CEST Boris Brezillon wrote: > > On Wed, 03 Oct 2018 15:55:25 +0200 > > Janusz Krzysztofik wrote: > > > > > > > > > > > > Implementation of NAND_OP_WAITRDY_INSTR has been based on legacy > > > > > nand_wait_ready(), > > > > > > > > I don't remember what the ams-delta ->dev_ready()/->waitfunc() hooks > > > > are doing, but is shouldn't be too hard to replace them by an > > > > ams_delta_wait_ready() func. > > > > > > Default nand_wait() is used as ->waitfunc(), and ->dev_ready() returns R/B > > > GPIO pin status. > > > > Okay. Then it might make sense to provide a generic helper to poll a > > gpio. > > > > void nand_gpio_waitrdy(struct nand_chip *chip, struct gpio_desc *gpiod) > > { > > ... > > } > > How about a still more generic helper which accepts dev_ready() callback as an > argument? Nope, I still prefer the GPIO based one. We'll see if others need a a more generic helper, but I doubt it.