Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933064AbbD0SAZ (ORCPT ); Mon, 27 Apr 2015 14:00:25 -0400 Received: from mezzanine.sirena.org.uk ([106.187.55.193]:39809 "EHLO mezzanine.sirena.org.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932946AbbD0SAV (ORCPT ); Mon, 27 Apr 2015 14:00:21 -0400 Date: Mon, 27 Apr 2015 18:59:57 +0100 From: Mark Brown To: Martin Sperl Cc: Hans de Goede , Michal Suchanek , Maxime Ripard , linux-sunxi , Jonathan Corbet , linux-spi , linux-doc , Linux Kernel Mailing List Message-ID: <20150427175957.GV22845@sirena.org.uk> References: <12F80B18-7418-430E-94F7-5A20C133BA9A@martin.sperl.org> <20150426125113.GF5627@lukather> <20150427093618.GL22845@sirena.org.uk> <553E099C.4070208@redhat.com> <20150427112539.GR22845@sirena.org.uk> <553E4447.6080202@martin.sperl.org> <20150427152705.GU22845@sirena.org.uk> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="MZc9ndojYYCMh/B/" Content-Disposition: inline In-Reply-To: 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: [linux-sunxi] [PATCH 2/3] spidev: Add DT binding example. 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: 4856 Lines: 111 --MZc9ndojYYCMh/B/ Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mon, Apr 27, 2015 at 06:25:26PM +0200, Martin Sperl wrote: > > On 27.04.2015, at 17:27, Mark Brown wrote: > > OK, so that is just a default overlay which is abusing the fact that we > > will bind to spidev without a DT compatible and when the binding is > > undocumented (which also applies to other devices and buses sadly). > > Unfortunately nobody ever mentioned this upstream and the feedback > > upstream that listing spidev in a DT is a bad idea has been ignored. > Maybe it should also have been documented as such in > Documentation/spi/spidev or in Documentation/devicetree/bindings/spi/ It was documented in the DT bindings in that there was no documented binding; people are in general expected to know that anything they're using should be documented. For the main spidev document I guess it's something similar, though if you can think of something there by all means send a patch. > > The whole reason we're doing this in the first place is that we got sick > > of telling people that using spidev in DTs like this was a bad idea. > The only reference I found in my history of the spi-list is this email: It mostly comes up in review of DT files for boards so won't be on the SPI list. > > It does sound like the people maintianing the u-boot fork for the Pi > > need to talk to both u-boot upstream (nothing here is specific to the > > Pi that I can see) and the kernel community a bit more. I'd be a bit > > worried that they may be relying on other things that just happen to > > work without being intentional (and are therefore more vulnerable to > > issues) and it's a bit depressing to see things like this stuck in a > > fork where only a limited community can make use of them. > Actually this functionality is not in u-boot, but in the firmware > boot-loader itself, which can load the kernel (and the devicetree) > without u-boot, but which can also load u-boot as an additional > intermediate boot-stage. Ugh, right. The thing about talking to the kernel community does still stand though. > >> The only thing that could possibly be better would be that > >> the user would define the "real" name of the device in the > >> device tree and spidev would bind to it if there is no driver > >> available (but that would require this "fallback" binding by > >> spidev in case of no driver). > > Yes, that is exactly the solution I'd suggest - change the UI to provide > > a DT compatible to be used for the new device. That would also have the > > benefit of meaning that users who have connected some device that does > > have a driver that works with a simple binding wouldn't need to write an > > overlay which seems like it should be useful. > Well then why did you just make the system complain loudly and bringing > problems to people instead of solving it in a usable manner that does not > require people to maintain an out of tree patch to work around that warni= ng? This is quite honestly the first time I've heard of this bootloader interface that's been implemented for the Pi. All the other users I've been aware of have been writing DT files or overlays in tree and therefore it's not a substantial effort (and indeed the misuse is basically just people being lazy) - if you can use the shipped binaries it's a very different tradeoff. > We still have the one-line warning about using the depreciated=20 > spi_master.transfer interface, but it is not such loud warning as this on= e. Right, that is a purely in kernel interface visible only to people directly working on implementing SPI controller drivers that isn't especially open to misuse and therefore both less serious and more likely to be noticed. > I guess the time spent discussing this could have been better spent > implementing that solution instead. > All we need is a volunteer to get that implemented. Yes. --MZc9ndojYYCMh/B/ Content-Type: application/pgp-signature; name="signature.asc" Content-Description: Digital signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQEcBAEBCAAGBQJVPnkcAAoJECTWi3JdVIfQpZsH/RtDzeUbi/auQQMw0Zcm3k8A upWrSRCLjalflimiD0nxNUS4ggFK/89yAXFzBJdQrPWFeN70bES7KJO5FjH8jYYW w/5ueQw87Luha17drD3Kk8dhvErFqdaooB8op6RfmlMBYCq44PVN4UMz4FSseQpQ xYix9AwlY+eIaUQZk2ePOlU6MPxD+tW7aIeqCoSLIhKPY6iwyAvjgaFwydSlLUs1 /TJoij99VMDQqiGhSvvgaVjKK/OOL4d+JfZ3PNdEOqvZjESTclSW6p+exH8bNeOg o6+eUcWr55yF6ucdIGi6rjKSAwVAfhTcY9KguY6q/L1wcwCc1XyDX7F8KkWU0iM= =XojM -----END PGP SIGNATURE----- --MZc9ndojYYCMh/B/-- -- 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/