Received: by 2002:ac0:a582:0:0:0:0:0 with SMTP id m2-v6csp1004240imm; Thu, 4 Oct 2018 06:52:19 -0700 (PDT) X-Google-Smtp-Source: ACcGV62BX0u+iQBLisJsaUzYLQ7098dBb8oeaVWxRIsk9F33/9RVClmJFF48JhVV2zDLUNBVmSk5 X-Received: by 2002:a17:902:968d:: with SMTP id n13-v6mr6739460plp.33.1538661139010; Thu, 04 Oct 2018 06:52:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1538661138; cv=none; d=google.com; s=arc-20160816; b=cA00zO55tb1JqRgx4U3ECTfsirB7p+EjeXl4B4wh1XEAxjFCrNaXMEj5eanOUMIePF WsN2Ew5o4tBlk34gl1VG+D6riJQG17uI7G9iyJtGIGMn8jBdmURNfLF9N6TPVruiNUSD sqg9e1RN7xyznypRrxfqaj35Us4R1FkKvuVQT4Py/APb6jfh73g3oMfXzjZjX/Y8PrIe Xz7mepWqAqK8eUJzhW9dhNSJ2g0LCdpj9zz0L7XczpxaoXuCrMsI9BIvz7pY9xa0UwfU M6sRU7UTVTxsdDhr+zvd9zw8v1kNGLn4S19PlsnG0MeS39POkNvtJ/d6wKP5A1/bmaVa M/qw== 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:date:subject:cc:to:from :dkim-signature; bh=UVfjx/J81Asw8N+3qCIoCNsFmK4yPA5krqUhqaSEz24=; b=m1Qgu+8to1orqoOndoh84n6aHB/t/zZNoe9wUCSjPXuwzuV5j6/bCPfVa6L8VH370X WwElyiyYHgu4j2PJnA04Veqa4xgq/SF6F0bcnlgMdFtiPVRIhE/Bl2qcgooBAo7Ao5X+ YCritU0M7UgxglIYTv0CYxmgHYr1fAGsBPTxHhtWUKJeMMAt3dP1IzQvWlsrp61mw+B0 1O46L50cLsYI2Ppb2J+xIyj0zo0axxULs8y5dEVvGN365T2BWgjhJySrT98V0gzp2Ji1 Nx/hIlb8iV0PCWCtGYF0tg2UNbeQM9dv+iyvMpQSn+8BEm96+Ae6TiaIdlv57yhnUVGq qCog== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=CIvIY9hl; 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=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id x1-v6si5599708pfx.105.2018.10.04.06.52.03; Thu, 04 Oct 2018 06:52:18 -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; dkim=pass header.i=@gmail.com header.s=20161025 header.b=CIvIY9hl; 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=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727998AbeJDUow (ORCPT + 99 others); Thu, 4 Oct 2018 16:44:52 -0400 Received: from mail-lj1-f195.google.com ([209.85.208.195]:34475 "EHLO mail-lj1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727628AbeJDUov (ORCPT ); Thu, 4 Oct 2018 16:44:51 -0400 Received: by mail-lj1-f195.google.com with SMTP id f8-v6so8465468ljk.1 for ; Thu, 04 Oct 2018 06:51:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=UVfjx/J81Asw8N+3qCIoCNsFmK4yPA5krqUhqaSEz24=; b=CIvIY9hlO6VBkbfcmsN+cNJv/KAnUA/JxZ/53VCQPDxn7n18ZJaX+iLAg+aL94tZ55 ZVp+dXJbMBgZ88RbeHXLbVvix9Sf0rEUJnI8UXMSXLuKDsiv3FfxLnTrwhGUzk6K83ex IX1qx6wDjH1lYlqp116BBaePtqpQR/6zaNocAOCI8gbRwaA9PPBq6PJXtoGyXyoWZgGb wbGyy8rNgO1vUzqEl0SoSsz8ish0NAaIb5mMPsjhwQ8k62bt8FnUEAoFCuQyoWpC2SY+ 9Iga2IFr7DMYIbgDUT9/BR9YaLlDz9/aa1HLiSxi39S9EKecHVYva/QONK5G4tipiYRR wT4w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=UVfjx/J81Asw8N+3qCIoCNsFmK4yPA5krqUhqaSEz24=; b=eBnP8ERGfi7cEzhyfzwCShxqol6HGF7z8gzO28IWZNCchGADHCk4r52EQIMbhAjT2e ZvPq3YyKrPlXfF83yYf6IozDDvq6AbAZUuFXahLl5OT1AxUkvhCkyOeENpMqusbG83Rj BaQwB3pdvMDE2nStyU6V1mE1Ta+mjYuWaJllgSlmF3bs/Ayz8CjxrW8kRn7kBuOM7PVB 10BdHUZc20NSNzrf8V8rVI1tilxEuicI+vdFrZdUGcBz5gWmT9iyLnzReyWeNRdLzCw4 +mN6c8aDe/G0G9LXI4j9o10sGifADpdW2AtugNRLk2NnN0/gcoAf89e/ZWAJQbXgbira /neA== X-Gm-Message-State: ABuFfog4jcDNO1q1HtYUfdinMVtANAQyhTGrQs6xoT8E2psPZE2mG+O6 GZUJJ77TztFQ/DRLHwfWwP8= X-Received: by 2002:a2e:3006:: with SMTP id w6-v6mr1607051ljw.146.1538661086253; Thu, 04 Oct 2018 06:51:26 -0700 (PDT) Received: from z50.localnet (78-10-164-223.static.ip.netia.com.pl. [78.10.164.223]) by smtp.gmail.com with ESMTPSA id k9-v6sm172612lje.51.2018.10.04.06.51.24 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 04 Oct 2018 06:51:25 -0700 (PDT) From: Janusz Krzysztofik To: Boris Brezillon Cc: Miquel Raynal , Richard Weinberger , David Woodhouse , Brian Norris , Marek Vasut , linux-mtd@lists.infradead.org, linux-kernel@vger.kernel.org, Janusz Krzysztofik Subject: Re: [RFC PATCH] mtd: rawnand: ams-delta: use ->exec_op() Date: Thu, 04 Oct 2018 15:52:57 +0200 Message-ID: <7546835.d2Xs8Qh0bZ@z50> In-Reply-To: <20181003160634.147dd95c@bbrezillon> References: <20180719081508.5dafebde@bbrezillon> <4278198.vlhjLe5TOR@z50> <20181003160634.147dd95c@bbrezillon> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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? Thanks, Janusz