From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1761509Ab2KAN77 (ORCPT ); Thu, 1 Nov 2012 09:59:59 -0400 Received: from li42-95.members.linode.com ([209.123.162.95]:41722 "EHLO li42-95.members.linode.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756011Ab2KAN74 convert rfc822-to-8bit (ORCPT ); Thu, 1 Nov 2012 09:59:56 -0400 Subject: Re: [PATCH 0/3] capebus moving omap_devices to mach-omap2 Mime-Version: 1.0 (Apple Message framework v1085) Content-Type: text/plain; charset=iso-8859-1 From: Pantelis Antoniou In-Reply-To: <20121101135148.382aec00@pyramind.ukuu.org.uk> Date: Thu, 1 Nov 2012 15:59:50 +0200 Cc: , "Cousson, Benoit" , Tony Lindgren , , Koen Kooi , Matt Porter , Russ Dill , , Kevin Hilman , Paul Walmsley Content-Transfer-Encoding: 8BIT Message-Id: <9F25E89E-9194-4725-8A8C-053DCBADA1DB@antoniou-consulting.com> References: <20121031212639.GQ12739@atomide.com> <8B058B00-6C21-4410-A24B-75651D49F6EC@antoniou-consulting.com> <20121031221402.GA29490@arwen.pp.htv.fi> <50924DA3.1060901@ti.com> <20121101110418.GF410@arwen.pp.htv.fi> <3AF5A6FC-61D9-40CA-85B3-81C2C788CB76@antoniou-consulting.com> <20121101124025.GA12489@arwen.pp.htv.fi> <20121101131609.GC12489@arwen.pp.htv.fi> <20121101135148.382aec00@pyramind.ukuu.org.uk> To: Alan Cox X-Mailer: Apple Mail (2.1085) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Alan, On Nov 1, 2012, at 3:51 PM, Alan Cox wrote: >> What they want, and what every user wants, is I plug this board in, and >> the driver make sure everything is loaded and ready. No, the end users >> don't want to see any of the implementation details of how the bitfile >> is transported; the driver can handle it. > > That doesn't necessarily make it a bus merely some kind of hotplug > enumeration of devices. That should all work properly both for devices > and busses with spi and i²c as the final bits needed for it got fixed > some time ago. > > In an ideal world you don't want to be writing custom drivers for stuff. > If your cape routes an i²c serial device to the existing system i²c > busses then you want to just create an instance of any existing driver on > the existing i²c bus not create a whole new layer of goop. > > It does need to do the plumbing and resource management for the plumbing > but thats not the same as being a bus. > > Alan Fair enough. But there's no such thing a 'hotplug enumeration construct' in Linux yet, and a bus is the closest thing to it. It does take advantage of the nice way device code matches drivers and devices though. I'm afraid that having the I2C/SPI drivers doing the detection won't work. The capes can have arbitrary I2C/SPI devices (and even more weird components). There is no way to assure for example that the I2C device responding to address 'foo' in cape A is the same I2C device responding to the same address in cape B. In a nutshell, no, I'm not writing any custom drivers for the stuff that exists already. There is no extra layer after the device is created and operates as it was located in the proper place in the DTS. The custom drivers are only needed for complex capes where you can't have the device simply work by creating the devices. Regards -- Pantelis From mboxrd@z Thu Jan 1 00:00:00 1970 From: Pantelis Antoniou Subject: Re: [PATCH 0/3] capebus moving omap_devices to mach-omap2 Date: Thu, 1 Nov 2012 15:59:50 +0200 Message-ID: <9F25E89E-9194-4725-8A8C-053DCBADA1DB@antoniou-consulting.com> References: <20121031212639.GQ12739@atomide.com> <8B058B00-6C21-4410-A24B-75651D49F6EC@antoniou-consulting.com> <20121031221402.GA29490@arwen.pp.htv.fi> <50924DA3.1060901@ti.com> <20121101110418.GF410@arwen.pp.htv.fi> <3AF5A6FC-61D9-40CA-85B3-81C2C788CB76@antoniou-consulting.com> <20121101124025.GA12489@arwen.pp.htv.fi> <20121101131609.GC12489@arwen.pp.htv.fi> <20121101135148.382aec00@pyramind.ukuu.org.uk> Mime-Version: 1.0 (Apple Message framework v1085) Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: QUOTED-PRINTABLE Return-path: In-Reply-To: <20121101135148.382aec00@pyramind.ukuu.org.uk> Sender: linux-kernel-owner@vger.kernel.org To: Alan Cox Cc: balbi@ti.com, "Cousson, Benoit" , Tony Lindgren , linux-kernel@vger.kernel.org, Koen Kooi , Matt Porter , Russ Dill , linux-omap@vger.kernel.org, Kevin Hilman , Paul Walmsley List-Id: linux-omap@vger.kernel.org Hi Alan, On Nov 1, 2012, at 3:51 PM, Alan Cox wrote: >> What they want, and what every user wants, is I plug this board in, = and >> the driver make sure everything is loaded and ready. No, the end use= rs >> don't want to see any of the implementation details of how the bitfi= le >> is transported; the driver can handle it. >=20 > That doesn't necessarily make it a bus merely some kind of hotplug > enumeration of devices. That should all work properly both for device= s > and busses with spi and i=B2c as the final bits needed for it got fix= ed > some time ago. >=20 > In an ideal world you don't want to be writing custom drivers for stu= ff. > If your cape routes an i=B2c serial device to the existing system i=B2= c > busses then you want to just create an instance of any existing drive= r on > the existing i=B2c bus not create a whole new layer of goop. >=20 > It does need to do the plumbing and resource management for the plumb= ing > but thats not the same as being a bus. >=20 > Alan =46air enough. But there's no such thing a 'hotplug enumeration constru= ct' in Linux=20 yet, and a bus is the closest thing to it. It does take advantage of th= e nice way device code matches drivers and devices though. I'm afraid that having the I2C/SPI drivers doing the detection won't wo= rk. The capes can have arbitrary I2C/SPI devices (and even more weird compo= nents). There is no way to assure for example that the I2C device responding to= address 'foo' in cape A is the same I2C device responding to the same address in cape= B. In a nutshell, no, I'm not writing any custom drivers for the stuff tha= t exists already. There is no extra layer after the device is created and operat= es as it was located in the proper place in the DTS. The custom drivers are only needed for complex capes where you can't have the device simply work by creating the devices. Regards -- Pantelis