Received: from DS7PR03CA0221.namprd03.prod.outlook.com
 (2603:10b6:5:3ba::16) by CH3PR11MB8381.namprd11.prod.outlook.com
 (2603:10b6:610:17b::17) with Microsoft SMTP Server (version=TLS1_2,
 cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6222.28; Tue, 28 Mar
 2023 13:44:22 +0000
Received: from DM6NAM10FT084.eop-nam10.prod.protection.outlook.com
 (2603:10b6:5:3ba:cafe::ef) by DS7PR03CA0221.outlook.office365.com
 (2603:10b6:5:3ba::16) with Microsoft SMTP Server (version=TLS1_2,
 cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6178.43 via Frontend
 Transport; Tue, 28 Mar 2023 13:44:22 +0000
Received: from email.microchip.com (170.129.1.10) by
 DM6NAM10FT084.mail.protection.outlook.com (10.13.153.208) with Microsoft
 SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256)
 id 15.20.6222.22 via Frontend Transport; Tue, 28 Mar 2023 13:44:21 +0000
Received: from chn-vm-ex02.mchp-main.com (10.10.87.72) by
 chn-vm-ex02.mchp-main.com (10.10.87.72) with Microsoft SMTP Server
 (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id
 15.1.2507.21; Tue, 28 Mar 2023 06:43:57 -0700
Received: from esa.microchip.iphmx.com (10.10.215.10) by
 email.microchip.com (10.10.87.72) with Microsoft SMTP Server
 (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id
 15.1.2507.21 via Frontend Transport; Tue, 28 Mar 2023 06:43:57 -0700
Received: from dfw.source.kernel.org ([139.178.84.217]) by
 esa1.microchip.iphmx.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 28 Mar
 2023 06:43:56 -0700
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 dfw.source.kernel.org (Postfix) with ESMTPS id
 018AF61537 for <tharunkumar.pasumarthi@microchip.com>; Tue, 28 Mar 2023
 13:43:56 +0000 (UTC)
Received: by smtp.kernel.org (Postfix) with ESMTPSA id 87C1BC433D2;
	Tue, 28 Mar 2023 13:43:54 +0000 (UTC)
From: Mark Brown <broonie@kernel.org>
To: Tharunkumar Pasumarthi - I67821 <Tharunkumar.Pasumarthi@microchip.com>
CC: "linux-spi@vger.kernel.org" <linux-spi@vger.kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH SPI for-next] spi: microchip: pci1xxxx: Fix minor bugs
 in spi-pci1xxxx driver
Thread-Topic: [PATCH SPI for-next] spi: microchip: pci1xxxx: Fix minor bugs
 in spi-pci1xxxx driver
Thread-Index: AQHZYXtoAkmg0Jz2n0m0Uw2JIelspg==
X-MS-Exchange-MessageSentRepresentingType: 1
Date: Tue, 28 Mar 2023 13:43:50 +0000
Message-ID: <97c57e1b-9779-4e36-9eac-754fdcb9c504@sirena.org.uk>
References: <20230328054212.139312-1-tharunkumar.pasumarthi@microchip.com>
In-Reply-To: <20230328054212.139312-1-tharunkumar.pasumarthi@microchip.com>
X-MS-Exchange-Organization-AuthAs: Anonymous
X-MS-Exchange-Organization-AuthSource: DM6NAM10FT084.eop-nam10.prod.protection.outlook.com
X-MS-Has-Attach: yes
X-MS-Exchange-Organization-Network-Message-Id: 691ea8b3-38a8-46ef-d8b5-08db2f928928
X-MS-TNEF-Correlator:
x-ms-publictraffictype: Email
received-spf: None (esa1.microchip.iphmx.com: no sender  authenticity
 information available from domain of  postmaster@dfw.source.kernel.org)
 identity=helo;  client-ip=139.178.84.217;
 receiver=esa1.microchip.iphmx.com; envelope-from="broonie@kernel.org";
 x-sender="postmaster@dfw.source.kernel.org";  x-conformance=spf_only
Content-Type: multipart/signed; micalg=pgp-sha512;
	protocol="application/pgp-signature"; boundary="2PS2/CgMOCO2Hp2O"
MIME-Version: 1.0

--2PS2/CgMOCO2Hp2O
Content-Type: text/plain; charset=iso-8859-1
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

On Tue, Mar 28, 2023 at 11:12:12AM +0530, Tharun Kumar P wrote:
> Following bugs are fixed in this patch:
> 1. pci1xxxx_spi_resume API masks SPI interrupt bit which prohibits
> firing of interrupt to the host at the end of the transaction after
> suspend-resume. This patch unmasks this bit at resume.
> 2. In=A0pci1xxxx_spi_transfer_one API, length of SPI transaction gets
> cleared by unmasking length field. Set length of transaction after
> unmasking length field.
> 3. Remove support for disabling chip select as hardware does not support
> the same.

As covered in submitting-patches.rst you should send one patch per
change, this makes things much easier to review.

>  drivers/spi/spi-pci1xxxx.c | 12 ++++--------
>  1 file changed, 4 insertions(+), 8 deletions(-)

The subject says this is a patch for the microchip driver...

>  	/* Set the DEV_SEL bits of the SPI_MST_CTL_REG */
>  	regval =3D readl(par->reg_base + SPI_MST_CTL_REG_OFFSET(p->hw_inst));
> -	if (enable) {
> +	if (!enable) {
>  		regval &=3D ~SPI_MST_CTL_DEVSEL_MASK;
>  		regval |=3D (spi_get_chipselect(spi, 0) << 25);
>  		writel(regval,
>  		       par->reg_base + SPI_MST_CTL_REG_OFFSET(p->hw_inst));
> -	} else {
> -		regval &=3D ~(spi_get_chipselect(spi, 0) << 25);
> -		writel(regval,
> -		       par->reg_base + SPI_MST_CTL_REG_OFFSET(p->hw_inst));
> -

I am unclear how chip select will ever be asserted with this change?
Now the value is only written if we are disabling.

--2PS2/CgMOCO2Hp2O
Content-Type: application/pgp-signature; name="signature.asc"

-----BEGIN PGP SIGNATURE-----

iQEzBAABCgAdFiEEreZoqmdXGLWf4p/qJNaLcl1Uh9AFAmQi7xIACgkQJNaLcl1U
h9Ch8gf+O/MluZL0YuDTHhZLLMwc6B5ISaKg7aLC6AxuIXjQ/I04oR+OhSexo/p7
KvgYa4WouYJxeZim7h98p2qWUjMrTTfUltXnbifLd6L1N3g/l/S1jr6DPGaa2SwV
KiFB5DO7cNuc6GVun1Sv2Q/15w39UbMwRUfqioeHluDn2Na1dCjab8t8G2AokU0B
gzWGZ7mSU+aSf+kmNlDHImh6rsQJqDIkD39CxLppbcyTSIB3WBI2kyCY5LbUhxUE
wdGKDtuVwyfHZHBY/EY+ejyb0mccWoxdshAlcyCN6gj5WVo8Y45B5eoZliBEc60b
6epymPQxByl5AL6IX+XyDTxHg12TLA==
=eYBI
-----END PGP SIGNATURE-----

--2PS2/CgMOCO2Hp2O--
