Thread (23 messages) 23 messages, 6 authors, 2013-12-18

[PATCH 4/5] arm: shmobile: genmai: adapt dts to use native i2c driver

flat view

From: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Date: 2013-12-17 21:57:06
Also in: linux-i2c, linux-sh

Hi Wolfram,

Thank you for the patch.

On Tuesday 17 December 2013 22:44:37 Wolfram Sang wrote:
quoted hunk ↗ jump to hunk
From: Wolfram Sang <redacted>

Switch from the gpio-driver to the shiny new native driver. Tested by
accessing the eeprom on the genmai board.

Signed-off-by: Wolfram Sang <redacted>
Acked-by: Magnus Damm <redacted>
---
 arch/arm/boot/dts/r7s72100-genmai-reference.dts | 29 +++++++++-------------
 1 file changed, 11 insertions(+), 18 deletions(-)
diff --git a/arch/arm/boot/dts/r7s72100-genmai-reference.dts
b/arch/arm/boot/dts/r7s72100-genmai-reference.dts index ce5da0b..739448a
100644
--- a/arch/arm/boot/dts/r7s72100-genmai-reference.dts
+++ b/arch/arm/boot/dts/r7s72100-genmai-reference.dts
@@ -39,24 +39,6 @@
 			gpios = <&port4 11 GPIO_ACTIVE_LOW>;
 		};
 	};
-
-	i2c at 0 {
-		compatible = "i2c-gpio";
-		gpios = <&port1 5 GPIO_ACTIVE_HIGH /* sda */
-			 &port1 4 GPIO_ACTIVE_HIGH /* scl */
-			>;
-		i2c-gpio,sda-open-drain;
-		i2c-gpio,scl-open-drain;
-		i2c-gpio,delay-us = <5>;	/* ~100 kHz */
-		#address-cells = <1>;
-		#size-cells = <0>;
-
-		flash at 50 {
-			compatible = "renesas,24c128";
-			reg = <0x50>;
-			pagesize = <64>;
-		};
-	};
 };

 &pfc {
@@ -68,3 +50,14 @@
 		renesas,function = "scif2";
 	};
 };
+
+&i2c2 {
+	status = "okay";
+	clock-frequency = <400000>;
+
+	eeprom: 24c128 at 50 {
That should be "24c128: eeprom at 50". You can actually omit the "24c128:" alias 
until it gets needed.
quoted hunk ↗ jump to hunk
+		compatible = "renesas,24c128";
+		reg = <0x50>;
+		pagesize = <64>;
+	};
+};
-- 
Regards,

Laurent Pinchart
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help