From mboxrd@z Thu Jan 1 00:00:00 1970 From: Mark Brown Subject: Re: [PATCH] spi/spi-altera: Allow to explicitely override bus number via dts Date: Wed, 1 Feb 2012 14:35:58 +0000 Message-ID: <20120201143558.GF13723@sirena.org.uk> References: <1328025246-23450-1-git-send-email-tklauser@distanz.ch> <20120201135524.GD13723@sirena.org.uk> <20120201140838.GE13723@sirena.org.uk> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Content-Disposition: inline In-Reply-To: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: devicetree-discuss-bounces+gldd-devicetree-discuss=m.gmane.org-uLR06cmDAlY/bJ5BZ2RsiQ@public.gmane.org Sender: devicetree-discuss-bounces+gldd-devicetree-discuss=m.gmane.org-uLR06cmDAlY/bJ5BZ2RsiQ@public.gmane.org To: Frederic LAMBERT Cc: spi-devel-general-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org, devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ@public.gmane.org, Rob Herring , Tobias Klauser List-Id: devicetree@vger.kernel.org On Wed, Feb 01, 2012 at 03:25:33PM +0100, Frederic LAMBERT wrote: > > > Because this bus number is used to create the device name on > > > /sys/bus/spi/..., name that the user app must know to work with. > > Why must the user application know this? What is missing to allow the > > application to discover an appropriate device to work with automatically? > Good question. I have a nvSRAM that I access using the AT25 driver, and I > don't know how access it without its /sys/bus/ name. If there is another > way, it is worse to consider it. For this I'd expect the application to be able to enumerate all the SPI devices and offer the user a selection of those with the appropriate driver bound (though I can see that simple scripts might not have bothered).