Received: by 2002:a5d:925a:0:0:0:0:0 with SMTP id e26csp351450iol; Thu, 9 Jun 2022 05:17:02 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxEZqq3BlIxVvbatbiR5ROTFQRiYjWVub8mIh+WpuMxGF9unLZG/nn+mGYigSTeASQNKV71 X-Received: by 2002:a05:6a00:4211:b0:51c:45e:532b with SMTP id cd17-20020a056a00421100b0051c045e532bmr24548537pfb.10.1654777021987; Thu, 09 Jun 2022 05:17:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1654777021; cv=none; d=google.com; s=arc-20160816; b=tj/4FCN/bpJHVaiqeZiEJVyJSHpqihQ9WZRzwlAhBP9ClAAW5nOsxDcskH+xEiN6jz 0RFRhwcHfYli1+3w+K9ME067E5/wdRCr3wni9FsIwjwJKVmZ+B0BdPoy7arKWfdc1GxH 9gQOXnaFT7BOf+NkhnvhQwifdDRAlnj4DUr8jGSbB/DbIK71JP179E8rnVZpMIKx24eR 5U/Lg88kyq1/CxfVN/U36kc6rIhpmfiqjLiDAi8gUXSKl2Ho/sng4hV0u6D/FYBGNwlt v4qKWljkz3jgwNbASosho1PDctqp6y2iH0yGmJryN3Fes7c3/bvyS6gBuZ4JXYZHUvSb /cIQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=QnlLOvFhMV3HctV7o0yxBCmv/BNsnNkn6Nmgm/oYlJc=; b=slp5w9yVQWGlyRbRyKDWb6TGF8xyqv6XPoFrrJpj9KMf3yA1gx87Pdln/B9uiRNscy EBJOJGwgqOyPL/Y/G4lxOgRDNBFs3yaY+mdI1V9BHBhRba6G9No9xMmc7fvNzWYAhng6 6S+n+HM10oew+pZk8oQOaHA8KVpz80PQwQWFLgBO361mbAR9o6owLEcgrj+8+6kKz2ry vtEqz1k3JbIXAoPPZAxDlk/6QysJKb7+Yoj0ehfPReCYNjIoTRqhuBWW0X2i6X76RWGf 0TBbYMQCwJ329qrMYTMBBLt+3W2SZ0AbXx0l6HMumHUqjmAsKT0xtdyAHwVA9WzmOVCy xrXA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=qxvUp7I0; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id q18-20020a170902e31200b0016391462249si27802653plc.306.2022.06.09.05.16.44; Thu, 09 Jun 2022 05:17:01 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=qxvUp7I0; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S244302AbiFILyi (ORCPT + 99 others); Thu, 9 Jun 2022 07:54:38 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51788 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235123AbiFILyg (ORCPT ); Thu, 9 Jun 2022 07:54:36 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E3EBE2AF5; Thu, 9 Jun 2022 04:54:33 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id 9CF65B82D2A; Thu, 9 Jun 2022 11:54:32 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id CAE14C34114; Thu, 9 Jun 2022 11:54:28 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1654775671; bh=W1JWHnccUeXeAdpiFbBoUz5WTQ95dDENGZmMGVO/HCw=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=qxvUp7I06JbQcQ1Ts5s+jxq7RgLhlztPitqQElHUmbhCwAWbQXoEveAJnO+fb2JPn KZCr7755OH2Sk8WSRFRBfvlItBmyYUM4as4j38U6BAtI/79y5dx9BXM9gtpPWITv6T VT0nnQ0KpsL98b6uDPT/y3hwhcQBq9a8DUyOdNC18vzxOpfz8ozjE/YYAdzeaspgOM XBLv4lEP5GnSCpAnkoxeCGTZkagXQLcbRs9PQeli3RCV4xHYAlnZ12ukx0fqK5Pwj/ 1HOt52OjyRureUhAHb135ViPF6n1fOE9PzN6wABgWe70eBcQ71n00TcXxaYyCczjAk oskBBB3AEwoEw== Date: Thu, 9 Jun 2022 12:54:25 +0100 From: Mark Brown To: Amit Kumar Mahapatra Cc: p.yadav@ti.com, miquel.raynal@bootlin.com, richard@nod.at, vigneshr@ti.com, git@xilinx.com, michal.simek@xilinx.com, linux-spi@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, michael@walle.cc, linux-mtd@lists.infradead.org Subject: Re: [RFC PATCH 1/2] spi: Add multiple CS support for a single SPI device Message-ID: References: <20220606112607.20800-1-amit.kumar-mahapatra@xilinx.com> <20220606112607.20800-2-amit.kumar-mahapatra@xilinx.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="jdtMuzYKequAryYb" Content-Disposition: inline In-Reply-To: <20220606112607.20800-2-amit.kumar-mahapatra@xilinx.com> X-Cookie: Space is limited. X-Spam-Status: No, score=-8.3 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --jdtMuzYKequAryYb Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mon, Jun 06, 2022 at 04:56:06PM +0530, Amit Kumar Mahapatra wrote: > --- > drivers/spi/spi-zynqmp-gqspi.c | 30 ++++++++++++++++++++++++++---- > drivers/spi/spi.c | 10 +++++++--- > include/linux/spi/spi.h | 10 +++++++++- > 3 files changed, 42 insertions(+), 8 deletions(-) Please split the core and driver support into separate patches, they are separate things. > --- a/drivers/spi/spi.c > +++ b/drivers/spi/spi.c > @@ -2082,6 +2082,8 @@ static int of_spi_parse_dt(struct spi_controller *c= tlr, struct spi_device *spi, > { > u32 value; > int rc; > + u32 cs[SPI_CS_CNT_MAX]; > + u8 idx; > =20 > /* Mode (clock phase/polarity/etc.) */ > if (of_property_read_bool(nc, "spi-cpha")) This is changing the DT binding but doesn't have any updates to the binding document. The binding code also doesn't validate that we don't have too many chip selects. > + /* Bit mask of the chipselect(s) that the driver > + * need to use form the chipselect array. > + */ > + u8 cs_index_mask : 2; Why make this a bitfield? =20 I'm also not seeing anything here that checks that the driver supports multiple chip selects - it seems like something that's going to cause issues and we should probably have something to handle that situation. --jdtMuzYKequAryYb Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEzBAABCgAdFiEEreZoqmdXGLWf4p/qJNaLcl1Uh9AFAmKh33AACgkQJNaLcl1U h9CsYAf+K7KXAUBJmbfepS1Fpu01afQQATn4uiX25nly77oXZeedKRHFW8DxNljZ YrOPvrEgZ1RifDvfB2rXf7nqI1vbnPYs7V5fDbXEmY+CHgkkuoQTVmEI68woVgmh bLGBMoegY4LCy9p+WVKdQNQ+qVjLC+DZvfzdvhCnWfNtvPV0dwyAZfkrtzzwLNdn r2gtsF0vRwXeWXXWf4SzYdEhwjgGjJDM8ZRI/BIx4Q5Qzi80xTQIhy6lpps/YmTk BgCy9wXOjDysA5+pPv9JB+V4n75ReIyNCVcYTztEmdGEJZPVswnKgzjUC0Da1h9K uH3JL+kR4RFtVVb5+a6522VKxKGNdg== =xJNv -----END PGP SIGNATURE----- --jdtMuzYKequAryYb--