Re: [RFC] [PATCH] Device Tree on ARM platform

From: David Miller
Date: Wed May 27 2009 - 16:28:41 EST


From: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@xxxxxxxxxxxx>
Date: Wed, 27 May 2009 21:39:27 +0200

> when you have to support the same driver for non OF and OF platform it's
> really a pain in the ass

We could embed the platform_device object into the of_platform_device
structure, it's just an implementation issue.

But more to the point, I can tell you that anything platform_device
does can be implemented in terms of of_platform_device but the
opposite is not true.

Actually, I kind of appreciate the existence of both kinds of objects.
When you're instantiating LEDs or similar small devices on a MDIO
bus, and the LED driver has to work on OF and non-OF platforms,
I see nothing wrong with using platform devices for instantiation.
And I've done this myself for system LED devices on sparc64 boxes.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/