[PATCH] 2/5 powerpc: Rework PowerMac i2c part 2

This is the continuation of the previous patch. This one removes the old
PowerMac i2c drivers (i2c-keywest and i2c-pmac-smu) and replaces them
both with a single stub driver that uses the new PowerMac low i2c layer.

Now that i2c-keywest is gone, the low-i2c code is extended to support
interrupt driver transfers. All i2c busses now appear as platform
devices. Compatibility with existing drivers should be maintained as the
i2c bus names have been kept identical, except for the SMU bus but in
that later case, all users has been fixed.

With that patch added, matching a device node to an i2c_adapter becomes
trivial.

Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Paul Mackerras <paulus@samba.org>
diff --git a/drivers/macintosh/smu.c b/drivers/macintosh/smu.c
index 9ecd768..db2ae71 100644
--- a/drivers/macintosh/smu.c
+++ b/drivers/macintosh/smu.c
@@ -584,34 +584,14 @@
  * sysfs visibility
  */
 
-static void smu_create_i2c(struct device_node *np)
-{
-	char name[32];
-	u32 *reg = (u32 *)get_property(np, "reg", NULL);
-
-	if (reg != NULL) {
-		sprintf(name, "smu-i2c-%02x", *reg);
-		of_platform_device_create(np, name, &smu->of_dev->dev);
-	}
-}
-
 static void smu_expose_childs(void *unused)
 {
-	struct device_node *np, *gp;
+	struct device_node *np;
 
-	for (np = NULL; (np = of_get_next_child(smu->of_node, np)) != NULL;) {
-		if (device_is_compatible(np, "smu-i2c-control")) {
-			gp = NULL;
-			while ((gp = of_get_next_child(np, gp)) != NULL)
-				if (device_is_compatible(gp, "i2c-bus"))
-					smu_create_i2c(gp);
-		} else if (device_is_compatible(np, "smu-i2c"))
-			smu_create_i2c(np);
+	for (np = NULL; (np = of_get_next_child(smu->of_node, np)) != NULL;)
 		if (device_is_compatible(np, "smu-sensors"))
 			of_platform_device_create(np, "smu-sensors",
 						  &smu->of_dev->dev);
-	}
-
 }
 
 static DECLARE_WORK(smu_expose_childs_work, smu_expose_childs, NULL);