Received: by 2002:a05:6a10:c604:0:0:0:0 with SMTP id y4csp886986pxt; Fri, 6 Aug 2021 17:02:08 -0700 (PDT) X-Google-Smtp-Source: ABdhPJz47ME24Dy4pxdP/L9cMZhV0Ny91NrrtX0bYJQfBE6hunKXuDuGqMEbDpMwd0Qw4JDYSMDj X-Received: by 2002:a05:6e02:1093:: with SMTP id r19mr16711ilj.246.1628294528001; Fri, 06 Aug 2021 17:02:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1628294527; cv=none; d=google.com; s=arc-20160816; b=D4C3cIkFK2yvKtl3jw6xQKS0zt5tStJFeHt41zZSXiCWOps+oZWYMa9BNpA9Dya1HK tJF8LHkj/a1ehY43BbSwG9SDVzK26o5xOYrOwgUjBKY5nU8kosn+h8hJC4vnRDR8++TD BjYnJEyFCfJwP5yrkJX7hnudawuTCHCsNf1dbzSrsPUpcsabW4jK6QeefSTzZ2vdbUgt f7NssKSUZJwimYefWirMAAGsGwEXHjuW+I52xaF8BjE7Vdu9T7/Fq6GMBfRJBgdTBMSh jMgcFgpeHbbtKKX7RBv9XelPbonFMCqeOJH04LoJhh5+oKwt2EJUrPuaniZf9mE2m/Bc e2Kg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :organization:references:in-reply-to:message-id:subject:cc:to:from :date; bh=ARv8+ABtTiZSJQ52+7UUeUcbV2s0AYxnfcXCu1LKoVc=; b=PHYSJCkIULj6Qa2wfaUTaTyXVInYFX3oJjfpJYUSHrFQc0pVSD2tBqkTOOG5RFldPr paROjP+zKBQ4Jx2fJ3wbv5VIpeSOCaB622s1gONfUWxZ6Fq7tHGt+ncdYeFzxsSZngPF GlASm2X3aX9Em7ANAnw1zbL47DlUFyxLVfxH6lP2F4370HnuumBzz+RNRH6u0YxCvpCU wvJAjA3ZuUIsWIYntZ4qsB51WCYFgbHmcRkMeoHSNu0SSKI7tqF1JH4F9S+C/C51FpVp 2ZsmQjgZRCzEg4zeu9BDZz7UGTZ/pRkviyDJ297HpE7rZ+bSBGTpPo/CWtPG3SJAVJvR /Z7Q== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id w4si9983759ioa.95.2021.08.06.17.01.56; Fri, 06 Aug 2021 17:02:07 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S241299AbhHFSad convert rfc822-to-8bit (ORCPT + 99 others); Fri, 6 Aug 2021 14:30:33 -0400 Received: from relay11.mail.gandi.net ([217.70.178.231]:46749 "EHLO relay11.mail.gandi.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S240879AbhHFSad (ORCPT ); Fri, 6 Aug 2021 14:30:33 -0400 Received: (Authenticated sender: miquel.raynal@bootlin.com) by relay11.mail.gandi.net (Postfix) with ESMTPSA id BD8EB100002; Fri, 6 Aug 2021 18:30:14 +0000 (UTC) Date: Fri, 6 Aug 2021 20:30:13 +0200 From: Miquel Raynal To: Apurva Nandan Cc: Richard Weinberger , Vignesh Raghavendra , Mark Brown , Patrice Chotard , Boris Brezillon , , , , Pratyush Yadav Subject: Re: [PATCH 03/13] mtd: spinand: Setup spi_mem_op for the SPI IO protocol using reg_proto Message-ID: <20210806203013.30a41fd5@xps13> In-Reply-To: <20210713130538.646-4-a-nandan@ti.com> References: <20210713130538.646-1-a-nandan@ti.com> <20210713130538.646-4-a-nandan@ti.com> Organization: Bootlin X-Mailer: Claws Mail 3.17.7 (GTK+ 2.24.32; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8BIT Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Apurva, Apurva Nandan wrote on Tue, 13 Jul 2021 13:05:28 +0000: > Currently, the op macros in spinand.h don't give the option to setup > any non-array access instructions for Dual/Quad/Octal DTR SPI bus. > Having a function that setups the op based on reg_proto would be > better than trying to write all the setup logic in op macros. > > Create a spimem_setup_op() that would setup cmd, addr, dummy and data > phase of the spi_mem op, for the given spinand->reg_proto. And hence, > call the spimem_setup_op() before executing any spi_mem op. > > Note: In this commit, spimem_setup_op() isn't called in the > read_reg_op(), write_reg_op() and wait() functions, as they need > modifications in address value and data nbytes when in Octal DTR mode. > This will be fixed in a later commit. Thanks for this series! So far I am fine with your changes, but I don't like the setup_op() naming much. I don't yet have a better idea, could you propose something more meaningful? > Signed-off-by: Apurva Nandan Thanks, Miquèl