Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753369AbbDULKU (ORCPT ); Tue, 21 Apr 2015 07:10:20 -0400 Received: from mezzanine.sirena.org.uk ([106.187.55.193]:43533 "EHLO mezzanine.sirena.org.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751792AbbDULKJ (ORCPT ); Tue, 21 Apr 2015 07:10:09 -0400 Date: Tue, 21 Apr 2015 12:09:58 +0100 From: Mark Brown To: Bert Vermeulen Cc: Geert Uytterhoeven , linux-spi , "linux-kernel@vger.kernel.org" Message-ID: <20150421110958.GH22845@sirena.org.uk> References: <1429538005-1985-1-git-send-email-bert@biot.com> <20150420203703.GG14892@sirena.org.uk> <55362E02.3070309@biot.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="8/pVXlBMPtxfSuJG" Content-Disposition: inline In-Reply-To: <55362E02.3070309@biot.com> X-Cookie: Your present plans will be successful. User-Agent: Mutt/1.5.23 (2014-03-12) X-SA-Exim-Connect-IP: 94.175.94.161 X-SA-Exim-Mail-From: broonie@sirena.org.uk Subject: Re: [PATCH] spi: rb4xx: Fix set_cs logic. X-SA-Exim-Version: 4.2.1 (built Mon, 26 Dec 2011 16:24:06 +0000) X-SA-Exim-Scanned: Yes (on mezzanine.sirena.org.uk) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2155 Lines: 55 --8/pVXlBMPtxfSuJG Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Tue, Apr 21, 2015 at 01:01:22PM +0200, Bert Vermeulen wrote: > On 04/21/2015 11:46 AM, Geert Uytterhoeven wrote: > > On Mon, Apr 20, 2015 at 10:37 PM, Mark Brown wrote: > >> No, the enable parameter *should* refer to chip select assertion (see > >> how we handle GPIO chip selects). However it's possible that this > >> device has an inverted chip select and should be registered with the > >> SPI_CS_HIGH flag? > > It's logic level: > > * @set_cs: set the logic level of the chip select line. May be called > > * from interrupt context. > Right It's the implementation which doesn't really make sense IMHO: it > always inverts the "enable" parameter (unless SPI_CS_HIGH is set), in > keeping with the default active-low. The default chip select is active low so an enebled chip select is low. > So the docs are right, but "enable" doesn't match what it does. Chip select > assertion would be a better API here. Is it worth fixing? I suspect it's going to cause more breakage than it fixes with people upstreaming things to change the sense of the paramter betwen kernel versions - renaming the parameter to be clearer is probably about as good as it gets. --8/pVXlBMPtxfSuJG Content-Type: application/pgp-signature; name="signature.asc" Content-Description: Digital signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQEcBAEBCAAGBQJVNjAGAAoJECTWi3JdVIfQOh8H/javTiHXBBKHp8zf1GMU3Vc3 EDkuwb2/jZlq55TTuAAsgJ8RecI4Jfr9B5IRiTzVc8F130Jiz2JptDr4vcxqNRYm mboyJcVLc6R8BaHWhAwxGWcqCi+W9qRhrh89hRJ5F0ElDrLE7h5A8/mMMqUS9/7X ONmZNxOmlXmDfjfCc9whCOxEijT3QljsSQcptzZ0GHJEtlWDpbHCvfSC4+d1Taji VycLTyxSffxgx0yDSiawYrsJ/D7Cav8/X7IWTrnspDPcijMlbEfFB2q6TiCnyC0Z DvsUMBhdE8yIShl2NFO/VZBFUr6xwVdpb0TI4+WcTEieDEJyZk/SMMHh6GvSVvA= =eQLl -----END PGP SIGNATURE----- --8/pVXlBMPtxfSuJG-- -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/