Thread (1 message) 1 message, 1 author, 2011-12-18

[PATCH 1/3] i2c: tegra: Support DVC controller in device tree

From: Thierry Reding <hidden>
Date: 2011-12-18 15:46:21
Also in: linux-devicetree, linux-i2c, linux-tegra

* Thierry Reding wrote:
* Stephen Warren wrote:
[...]
quoted
@@ -636,7 +649,18 @@ static int tegra_i2c_probe(struct platform_device *pdev)
 			i2c_dev->bus_clk_rate = be32_to_cpup(prop);
 	}
 
-	if (pdev->id == 3)
+#if defined(CONFIG_OF)
+	if (pdev->dev.of_node) {
+		const struct of_device_id *match;
+
+		match = of_match_device(tegra_i2c_of_match, &pdev->dev);
+		if (!match)
+			return -EINVAL;
+
+		i2c_dev->is_dvc = match->data;
+	}
+#endif
+	else if (pdev->id == 3)
Shouldn't the "else" move into the CONFIG_OF branch?
Okay, I hadn't seen v2. Please ignore.

Thierry
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20111218/34f0f8ab/attachment.sig>
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help