Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932518AbbD0LTF (ORCPT ); Mon, 27 Apr 2015 07:19:05 -0400 Received: from mail-wi0-f180.google.com ([209.85.212.180]:33857 "EHLO mail-wi0-f180.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932219AbbD0LTD (ORCPT ); Mon, 27 Apr 2015 07:19:03 -0400 MIME-Version: 1.0 In-Reply-To: <20150427100436.GP5627@lukather> References: <20150426110144.GK22845@sirena.org.uk> <553CCABA.3090504@redhat.com> <12F80B18-7418-430E-94F7-5A20C133BA9A@martin.sperl.org> <20150426125113.GF5627@lukather> <20150426143359.GI5627@lukather> <20150426155404.GL5627@lukather> <20150427100436.GP5627@lukather> From: Michal Suchanek Date: Mon, 27 Apr 2015 13:18:21 +0200 Message-ID: Subject: Re: [linux-sunxi] [PATCH 2/3] spidev: Add DT binding example. To: Maxime Ripard Cc: Martin Sperl , Hans de Goede , Mark Brown , linux-sunxi , Jonathan Corbet , linux-spi , linux-doc , Linux Kernel Mailing List Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2026 Lines: 49 On 27 April 2015 at 12:04, Maxime Ripard wrote: > On Sun, Apr 26, 2015 at 08:53:16PM +0200, Michal Suchanek wrote: >> >> Also for driver prototyping you need a compatible which makes the >> >> device accessible. >> >> >> >> If no spidev general compatible is available people will just use >> >> compatible for some random device which happens to bind to spidev and >> >> will send many letters of thanks to the DT maintainers when the device >> >> used for this purpose suddenly grows a Linux driver. >> > >> > If people do dumb things, they should expect it to backfire. >> >> Yes, dumb things like not allowing people to say in the DT that the >> board actually has pins on it connected to a SPI bus. Which is the >> actual hardware which should be described in the DT. > > It's not connected to an SPI bus. It's connected to a device using an > SPI bus. If you just had floating SPI lines, I'm pretty sure you > wouldn't care about spidev at all. > >> Do you have to describe a modem or terminal emulator in DT to connect >> it to your serial port? You just describe the port. So here you have a >> SPI port and it should be described in the DT as faithfully as the >> serial port. > > Except that in the serial port, you have a representation of a bus, > while spidev represents a *device* connected on an SPI bus. So these > are two different things, really. No it's the same thing, really. With serial you just have serial lines which you expose on a connector. With SPI you have CS so you can technically have several connectors for the same SPI bus selected by different CS. So yes, making a spidev entry for the connector under SPI bus is the equivalent of making an UART entry to specify that there is a connector. Thanks Michal -- 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/