[PATCH 9/13] powerpc: Add arch/powerpc mv64x60 I2C platform data setup

Paul Mackerras paulus at samba.org
Tue May 1 14:45:25 EST 2007


Arnd Bergmann writes:

> What your glue code does is to find a backdoor into the device tree
> (through of_find_compatible_node) and create a second struct device
> for the same hardware, in an unrelated location in the linux device tree.

I disagree that of_find_compatible_node is a "backdoor".

He won't have an of_device already unless he has arranged for the
mv64x60 node to be scanned by of_platform_bus_probe.  Which he hasn't
AFAICS.

> This is very confusing if you look at sysfs, e.g. trying to find out
> which driver is attached to a given of_device.
> It also makes you lose the ability to autoload the driver module,
> because autoloading is not supported for a platform_driver (there
> is no MODULE_DEVICE_TABLE()).

There's nothing preventing autoloading of modules for platform
devices, if desired.

Paul.



More information about the Linuxppc-dev mailing list