Hi Grant,
On 7/14/2011 1:20 AM, Grant Likely wrote:
On Thu, Jul 14, 2011 at 7:06 AM, G, Manjunath Kondaiah<manjugk@xxxxxx> wrote:
The i2c-omap driver is converted for supporting both
dt and non dt builds and driver is modified to use dt
data partially.
[...]
/* NOTE: driver uses the static register mapping */
mem = platform_get_resource(pdev, IORESOURCE_MEM, 0);
if (!mem) {
@@ -1011,11 +1026,25 @@ omap_i2c_probe(struct platform_device *pdev)
if (pdata != NULL) {
speed = pdata->clkrate;
dev->set_mpu_wkup_lat = pdata->set_mpu_wkup_lat;
+#if defined(CONFIG_OF)
+ } else if (pdev->dev.of_node) {
+ u32 prop;
+ if (!of_property_read_u32(pdev->dev.of_node, "clock-frequency",
+&prop))
+ speed = prop/100;
+ else
+ speed = 100;
Do we have to modify every drivers in order to take advantage of the DT bus?
Cannot we init the already existing pdata during device creation and let
the driver untouched?
I think it is a pity to add all that #ifdefry in the driver to be able
to support two kinds of bus.
Cannot we have an intermediate phase that will deal only with the device
creation with DT?
That will allow us to clean the omap_device creation from hwmod we have
today spread everywhere in plat-omap and mach-omap2.
Regards
Benoit
--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html