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