[RFC PATCHv1 1/2] Export SoC info through sysfs
Arnd Bergmann
arnd at arndb.de
Thu Mar 10 09:29:25 EST 2011
On Thursday 10 March 2011, Mark Brown wrote:
> On Thu, Mar 10, 2011 at 02:25:19PM +0100, Linus Walleij wrote:
>
> > "platform" means "platform bus" in this context, does it not?
> > So your reasoning is that since on SoC:s there is one dominant
> > bus called the platform bus that should also hold a reference to the
> > SoC-specific stuff.
>
> Lots of stuff (like the MFD children of I2C devices) gets shoved on the
> platform bus on Linux - every time someone considers creating a new bus
> type for trivial devices the discussion ends up saying that the code
> will end up being pretty much identical to the platform bus as it's so
> straightforward so there's no point in cut'n'pasting the code.
Note that there is a difference between using top-level platform
devices (the ones that show up in /sys/devices/platform/) and platform
devices that are children of others (all the others that are in
/sys/bus/platform).
Creating a new bus_type for trivial things is rather pointless,
so using a platform device is fine for MFD, since the child devices
just show up in the hierarchy.
What some broken drivers do is to create platform devices ad hoc
and just put them into /sys/platform/ directly although the
devices clearly have a parent somewhere. These are bugs that should
be fixed.
Arnd
More information about the linux-arm-kernel
mailing list