RFC OF-glue devices for I2C/SPI (was: Re: [PATCH 4/7] gpiolib: implement dev_gpiochip_{add,remove} calls
Get series with b4
b4 am [email protected]Versions newest first
- v1 RFC Latest6 patches 2 repliesIn review
Patches in v1 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/6 | of/base: Add new helper of_should_create_pdev()drivers/ include/ | +28 | 0 replies | |
| 2/6 | of/of_i2c: implement of_{,un}register_i2c_devicedrivers/ include/ | +48 | 0 replies | |
| 3/6 | of/of_i2c: add support for dedicated OF I2C devicesdrivers/ | +12 | 1 reply | |
| 4/6 | of/gpio: add support for two-stage registration for the of_gpio_chipsdrivers/ drivers/ include/ | +25 | 0 replies | |
| 5/6 | gpio/pca953x: pass gpio_chip pointer to the setup/teardown callbacksdrivers/ include/ | +8 | 0 replies | |
| 6/6 | gpio: OpenFirmware bindings for the pca953xdrivers/ drivers/ drivers/ +1 more | +163 | 0 replies |
Reviews trailers per patch
No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.
Cover letter [PATCH 0/6 RFC] OF-glue devices for I2C/SPI (was: Re: [PATCH 4/7] gpiolib: implement dev_gpiochip_{add,remove} calls
On Wed, Oct 22, 2008 at 02:46:06PM +0400, Anton Vorontsov wrote:
[...]
Quoted 13 lines
Quoted 13 lines
Quoted 8 lines
Like what I suggested: "chip-aware OF glue drivers". The relevant bus code being the "
of_platform_bus_type" infrastructure.Example: instead of Anton's patch #6 modifying the existing pca953x driver, an
of_pca953xdriver that knows how to poke around in the OF device attributes to (a) create thepca953x_platform_data, (b) calli2c_register_board_info()to make that available later, and then finally (c) vanish, since it's not needed any longer.Heh. You tell me my first approach:
http://ozlabs.org/pipermail/linuxppc-dev/2008-May/056730.html (
mmc_spi)
Quoted 8 lines
Quoted 3 lines
The OF people didn't like the patch which was used to support this approach:
http://ozlabs.org/pipermail/linuxppc-dev/2008-May/056728.htmlThough, I think I'll able to persuade Grant that two registration paths are inevitable (i.e. for simple devices we should use
drivers/of/of_{i2c,spi}.cand for complex cases we'll have to have another method of registration).
Ok, here it is.
I don't like this approach because:
1. It feels like an overhead to create an of_device for each i2c device that needs platform data.
2. We have to do ugly of_should_create_pdev() in the i2c code, and duplicate lists of supported devices.
Could anybody convince me that this isn't a big deal? ;-)
Otherwise I'll stick with this approach:
http://lkml.org/lkml/2008/10/22/471
Thanks,
Signature · 3 lines
Anton Vorontsov email: [email protected] irc://irc.freenode.net/bd2