Re: [PATCH 1/7] spi: Add support for device table matching

2009-08-04 Thread Anton Vorontsov
On Mon, Aug 03, 2009 at 07:21:22PM -0700, David Brownell wrote: > On Wednesday 29 July 2009, Ben Dooks wrote: > > >  struct spi_driver { > > > + const struct spi_device_id *id_table; > > > + int (*probe_id)(struct spi_device *spi, > > > + 

Re: [PATCH 1/7] spi: Add support for device table matching

2009-08-04 Thread David Brownell
On Wednesday 29 July 2009, Ben Dooks wrote: > >  struct spi_driver { > > + const struct spi_device_id *id_table; > > + int (*probe_id)(struct spi_device *spi, > > +     const struct spi_device_id *id); > > how about leaving it at just

Re: [PATCH 1/7] spi: Add support for device table matching

2009-07-29 Thread Anton Vorontsov
On Thu, Jul 30, 2009 at 02:40:50AM +0400, Anton Vorontsov wrote: [...] > - If you don't store "id" in the device struct, you'll have > to look up the device table twice (at first during bus->match(), > and second time in drivers' probe() hook, i.e. > probe(struct bus_dev *dev) { > id =

Re: [PATCH 1/7] spi: Add support for device table matching

2009-07-29 Thread Anton Vorontsov
On Thu, Jul 30, 2009 at 02:32:23AM +0400, Anton Vorontsov wrote: > On Wed, Jul 29, 2009 at 10:44:46PM +0100, Ben Dooks wrote: > [...] > > > + const struct spi_device_id *id_table; > > > + int (*probe_id)(struct spi_device *spi, > > > + const s

Re: [PATCH 1/7] spi: Add support for device table matching

2009-07-29 Thread Anton Vorontsov
On Wed, Jul 29, 2009 at 10:44:46PM +0100, Ben Dooks wrote: [...] > > + const struct spi_device_id *id_table; > > + int (*probe_id)(struct spi_device *spi, > > + const struct spi_device_id *id); > > how about leaving it at just probe and

Re: [PATCH 1/7] spi: Add support for device table matching

2009-07-29 Thread Ben Dooks
On Wed, Jul 29, 2009 at 09:04:57PM +0400, Anton Vorontsov wrote: > With this patch spi drivers can use standard spi_driver.id_table and > MODULE_DEVICE_TABLE() mechanisms to bind against the devices. Just > like we do with I2C drivers. > > This is useful when a single driver supports several varia