From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 723BDC433F5 for ; Thu, 16 Dec 2021 14:28:08 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-ID:Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=SY7ZtfMQ+ZzcqhBChJRknWnt7gE9jCei2CjS5Ui2CMA=; b=e/9Tmtcp1hdPxM OWoVTeoY7wTF8U0EuiMi3/B5bmatXlvewI8AZ/hLbJ0D6KngP18sG9kBjvDVG4SoGJE9b65D3E+ho zkdchBXgquc9eA8AqLz8qQQMcX1sv9/9Zdcmr7iPr6zcP7pjPzTdO8Mg0ZvU23baHezv8/6uL0gj/ KNPiEoQCq2j9drDihT5OJi/PADNtjwWdRNby6EQtMNnZ/BMinc6NPodm+YSIiqpBaZhn5UPFg24Bl Ui3kwyn8Cbtfta5LVvE5SNltGdRp4qrUf1gLqqUgMWQ5e3cvItY0RthjhIwxST+xH43Mo5VS2YczW wqETZXmOKix/MAvEGJXg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1mxrjF-0069V1-H6; Thu, 16 Dec 2021 14:27:29 +0000 Received: from relay9-d.mail.gandi.net ([217.70.183.199]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1mxrjB-0069Sr-Ix for linux-mtd@lists.infradead.org; Thu, 16 Dec 2021 14:27:27 +0000 Received: (Authenticated sender: miquel.raynal@bootlin.com) by relay9-d.mail.gandi.net (Postfix) with ESMTPSA id 6F35CFF804; Thu, 16 Dec 2021 14:27:19 +0000 (UTC) Date: Thu, 16 Dec 2021 15:27:17 +0100 From: Miquel Raynal To: Mark Brown Cc: Boris Brezillon , Richard Weinberger , Vignesh Raghavendra , Tudor Ambarus , Pratyush Yadav , Michael Walle , linux-mtd@lists.infradead.org, linux-spi@vger.kernel.org, Julien Su , Jaime Liao , Thomas Petazzoni , Xiangsheng Hou Subject: Re: [PATCH v5 12/13] spi: mxic: Use spi_mem_generic_supports_op() Message-ID: <20211216152717.30774928@xps13> In-Reply-To: References: <20211214114140.54629-1-miquel.raynal@bootlin.com> <20211214114140.54629-13-miquel.raynal@bootlin.com> <20211214172410.2b26c17e@collabora.com> <20211215184426.67fd3912@xps13> <20211215200548.75630b61@collabora.com> <20211216100147.46c307ff@xps13> <20211216105739.395a174d@xps13> Organization: Bootlin X-Mailer: Claws Mail 3.17.7 (GTK+ 2.24.32; x86_64-pc-linux-gnu) MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20211216_062725_802300_41C4193E X-CRM114-Status: GOOD ( 10.09 ) X-BeenThere: linux-mtd@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Linux MTD discussion mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: base64 Sender: "linux-mtd" Errors-To: linux-mtd-bounces+linux-mtd=archiver.kernel.org@lists.infradead.org SGkgTWFyaywKCmJyb29uaWVAa2VybmVsLm9yZyB3cm90ZSBvbiBUaHUsIDE2IERlYyAyMDIxIDE0 OjA0OjE4ICswMDAwOgoKPiBPb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aW5mcmFkZWFkLm9yZy9tYWlsbWFuL2xpc3RpbmZvL2xp bnV4LW10ZC8K From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id ABA71C433F5 for ; Thu, 16 Dec 2021 14:27:24 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232544AbhLPO1Y convert rfc822-to-8bit (ORCPT ); Thu, 16 Dec 2021 09:27:24 -0500 Received: from relay9-d.mail.gandi.net ([217.70.183.199]:37673 "EHLO relay9-d.mail.gandi.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237960AbhLPO1Y (ORCPT ); Thu, 16 Dec 2021 09:27:24 -0500 Received: (Authenticated sender: miquel.raynal@bootlin.com) by relay9-d.mail.gandi.net (Postfix) with ESMTPSA id 6F35CFF804; Thu, 16 Dec 2021 14:27:19 +0000 (UTC) Date: Thu, 16 Dec 2021 15:27:17 +0100 From: Miquel Raynal To: Mark Brown Cc: Boris Brezillon , Richard Weinberger , Vignesh Raghavendra , Tudor Ambarus , Pratyush Yadav , Michael Walle , linux-mtd@lists.infradead.org, linux-spi@vger.kernel.org, Julien Su , Jaime Liao , Thomas Petazzoni , Xiangsheng Hou Subject: Re: [PATCH v5 12/13] spi: mxic: Use spi_mem_generic_supports_op() Message-ID: <20211216152717.30774928@xps13> In-Reply-To: References: <20211214114140.54629-1-miquel.raynal@bootlin.com> <20211214114140.54629-13-miquel.raynal@bootlin.com> <20211214172410.2b26c17e@collabora.com> <20211215184426.67fd3912@xps13> <20211215200548.75630b61@collabora.com> <20211216100147.46c307ff@xps13> <20211216105739.395a174d@xps13> 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-spi@vger.kernel.org Hi Mark, broonie@kernel.org wrote on Thu, 16 Dec 2021 14:04:18 +0000: > On Thu, Dec 16, 2021 at 10:57:39AM +0100, Miquel Raynal wrote: > > > Actually as the spi-mem.h header is not included in spi.h, it makes > > defining a static mem_caps entry harder. I'll go for another approach. > > Maybe putting the capabilities within the spi_controller_mem_ops > > structure, as these are highly related. > > Yeah, or putting a pointer to a static declaration of the caps in there > rather than the caps directly. Yeah, that's what I ended up doing. Each controller driver supporting mem-ops must provide a capabilities structure. Drivers without specific capabilities can just reference the static &spi_mem_no_caps struct instead of defining their empty one. Thanks, Miquèl