* [PATCH] devicetree: Add support for I2C and related devices to TI-NSPIRE platform
@ 2015-05-31 9:44 Daniel Tang
2015-06-01 15:51 ` Arnd Bergmann
0 siblings, 1 reply; 2+ messages in thread
From: Daniel Tang @ 2015-05-31 9:44 UTC (permalink / raw)
To: arm; +Cc: linux-arm-kernel, linux-kernel, Daniel Tang
This patch adds device tree entries for I2C hardware to the TI-NSPIRE
platforms that have it.
It also adds support for the touchpad that communicates over the I2C
bus.
Signed-off-by: Daniel Tang <dt.tangr@gmail.com>
---
arch/arm/boot/dts/nspire-cx.dts | 13 +++++++++++++
arch/arm/boot/dts/nspire-tp.dts | 14 ++++++++++++++
2 files changed, 27 insertions(+)
diff --git a/arch/arm/boot/dts/nspire-cx.dts b/arch/arm/boot/dts/nspire-cx.dts
index 08e0b81..e369e3b 100644
--- a/arch/arm/boot/dts/nspire-cx.dts
+++ b/arch/arm/boot/dts/nspire-cx.dts
@@ -104,9 +104,22 @@
#size-cells = <1>;
i2c@90050000 {
+ #address-cells = <1>;
+ #size-cells = <0>;
+
compatible = "snps,designware-i2c";
reg = <0x90050000 0x1000>;
interrupts = <20>;
+
+ clocks = <&apb_pclk>;
+
+ i2c-sda-falling-time-ns = <810>;
+ i2c-scl-falling-time-ns = <2410>;
+
+ touchpad@20 {
+ compatible = "synaptics_i2c";
+ reg = <0x20>;
+ };
};
};
};
diff --git a/arch/arm/boot/dts/nspire-tp.dts b/arch/arm/boot/dts/nspire-tp.dts
index 621391c..49fb97a 100644
--- a/arch/arm/boot/dts/nspire-tp.dts
+++ b/arch/arm/boot/dts/nspire-tp.dts
@@ -41,4 +41,18 @@
/ {
model = "TI-NSPIRE Touchpad";
compatible = "ti,nspire-tp";
+
+ i2c@gpio {
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ compatible = "i2c-gpio";
+ gpios = < &gpio 3 0 /* sda */
+ &gpio 1 0 /* scl */ >;
+
+ touchpad@20 {
+ compatible = "synaptics_i2c";
+ reg = <0x20>;
+ };
+ };
};
--
2.2.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] devicetree: Add support for I2C and related devices to TI-NSPIRE platform
2015-05-31 9:44 [PATCH] devicetree: Add support for I2C and related devices to TI-NSPIRE platform Daniel Tang
@ 2015-06-01 15:51 ` Arnd Bergmann
0 siblings, 0 replies; 2+ messages in thread
From: Arnd Bergmann @ 2015-06-01 15:51 UTC (permalink / raw)
To: Daniel Tang; +Cc: arm, linux-arm-kernel, linux-kernel, devicetree
On Sunday 31 May 2015 19:44:02 Daniel Tang wrote:
> +
> + touchpad@20 {
> + compatible = "synaptics_i2c";
> + reg = <0x20>;
> + };
> };
While this works, "synaptics_i2c" is not a well-formed DT compatible string,
we should do it right.
Please submit three patches:
a) one patch add "syna" as the vendor string in
Documentation/devicetree/bindings/vendor-prefixes.txt
As this is a publicly traded company, we use the stock ticker
symbol by convention. Cc the patch to devicetree@vger.kernel.org
for review, but I can merge it along with the dts patch if nobody
else does
b) a patch to add an of_device_id match table to
drivers/input/mouse/synaptics_i2c.c, with the proper name of the
device. Ideally, this would be the full name of the component that
is used here, something like "syna,abc12345-touchscreen". If you
have no way of finding out the real name, "syna,i2c-touchscreen"
will have to suffice.
c) This patch, with the correct string used for compatible.
Arnd
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2015-06-01 15:51 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-05-31 9:44 [PATCH] devicetree: Add support for I2C and related devices to TI-NSPIRE platform Daniel Tang
2015-06-01 15:51 ` Arnd Bergmann
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox