diff mbox

[v2,3/4] ARM: dts: sun5i: Add lradc node

Message ID 1413879890-7254-4-git-send-email-hdegoede@redhat.com (mailing list archive)
State New, archived
Headers show

Commit Message

Hans de Goede Oct. 21, 2014, 8:24 a.m. UTC
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
---
 arch/arm/boot/dts/sun5i-a10s-olinuxino-micro.dts | 36 ++++++++++++++++++++++++
 arch/arm/boot/dts/sun5i-a10s.dtsi                |  7 +++++
 arch/arm/boot/dts/sun5i-a13-olinuxino.dts        | 36 ++++++++++++++++++++++++
 arch/arm/boot/dts/sun5i-a13.dtsi                 |  7 +++++
 4 files changed, 86 insertions(+)

Comments

Dmitry Torokhov Oct. 21, 2014, 4:21 p.m. UTC | #1
Hi Hans,

On Tue, Oct 21, 2014 at 10:24:49AM +0200, Hans de Goede wrote:
> +			button@98 {
> +				label = "Home";
> +				linux,code = <KEY_HOME>;

I do not think you really want KEY_HOME (go to the beginning of the
line) here, KEY_HOMEPAGE or similar would suit better.

> +				channel = <0>;
> +				voltage = <987387>;
> +			};
> +		};

Thanks.
Hans de Goede Oct. 21, 2014, 8:29 p.m. UTC | #2
Hi,

On 10/21/2014 06:21 PM, Dmitry Torokhov wrote:
> Hi Hans,
>
> On Tue, Oct 21, 2014 at 10:24:49AM +0200, Hans de Goede wrote:
>> +			button@98 {
>> +				label = "Home";
>> +				linux,code = <KEY_HOME>;
>
> I do not think you really want KEY_HOME (go to the beginning of the
> line) here, KEY_HOMEPAGE or similar would suit better.

I can understand where you're coming from, but KEY_HOME is what these
keys typically send under android, and what android expects them to
send...

Not sure if that is a good argument to keep it as KEY_HOME though.

Please let me know which way you want this key to be mapped, and
I'll update it for the next version.

Regards,

Hans
--
To unsubscribe from this list: send the line "unsubscribe linux-input" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Hans de Goede Oct. 22, 2014, 10:42 a.m. UTC | #3
Hi,

On 10/21/2014 10:29 PM, Hans de Goede wrote:
> Hi,
> 
> On 10/21/2014 06:21 PM, Dmitry Torokhov wrote:
>> Hi Hans,
>>
>> On Tue, Oct 21, 2014 at 10:24:49AM +0200, Hans de Goede wrote:
>>> +            button@98 {
>>> +                label = "Home";
>>> +                linux,code = <KEY_HOME>;
>>
>> I do not think you really want KEY_HOME (go to the beginning of the
>> line) here, KEY_HOMEPAGE or similar would suit better.
> 
> I can understand where you're coming from, but KEY_HOME is what these
> keys typically send under android, and what android expects them to
> send...
> 
> Not sure if that is a good argument to keep it as KEY_HOME though.
> 
> Please let me know which way you want this key to be mapped, and
> I'll update it for the next version.

Sleeping a night on this I fully agree that what android is doing /
expecting here is just plain wrong, so I'll change this to KEY_HOMEPAGE
when I respin the set.

Regards,

Hans
--
To unsubscribe from this list: send the line "unsubscribe linux-input" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/arch/arm/boot/dts/sun5i-a10s-olinuxino-micro.dts b/arch/arm/boot/dts/sun5i-a10s-olinuxino-micro.dts
index ea9519d..84df85e 100644
--- a/arch/arm/boot/dts/sun5i-a10s-olinuxino-micro.dts
+++ b/arch/arm/boot/dts/sun5i-a10s-olinuxino-micro.dts
@@ -14,6 +14,7 @@ 
 /dts-v1/;
 /include/ "sun5i-a10s.dtsi"
 /include/ "sunxi-common-regulators.dtsi"
+#include <dt-bindings/input/input.h>
 
 / {
 	model = "Olimex A10s-Olinuxino Micro";
@@ -98,6 +99,41 @@ 
 			};
 		};
 
+		lradc: lradc@01c22800 {
+			vref-supply = <&reg_vcc3v0>;
+			status = "okay";
+			button@19 {
+				label = "Volume Up";
+				linux,code = <KEY_VOLUMEUP>;
+				channel = <0>;
+				voltage = <191274>;
+			};
+			button@39 {
+				label = "Volume Down";
+				linux,code = <KEY_VOLUMEDOWN>;
+				channel = <0>;
+				voltage = <392644>;
+			};
+			button@60 {
+				label = "Menu";
+				linux,code = <KEY_MENU>;
+				channel = <0>;
+				voltage = <601151>;
+			};
+			button@80 {
+				label = "Enter";
+				linux,code = <KEY_ENTER>;
+				channel = <0>;
+				voltage = <795090>;
+			};
+			button@98 {
+				label = "Home";
+				linux,code = <KEY_HOME>;
+				channel = <0>;
+				voltage = <987387>;
+			};
+		};
+
 		uart0: serial@01c28000 {
 			pinctrl-names = "default";
 			pinctrl-0 = <&uart0_pins_a>;
diff --git a/arch/arm/boot/dts/sun5i-a10s.dtsi b/arch/arm/boot/dts/sun5i-a10s.dtsi
index 531272c..a73cec4 100644
--- a/arch/arm/boot/dts/sun5i-a10s.dtsi
+++ b/arch/arm/boot/dts/sun5i-a10s.dtsi
@@ -520,6 +520,13 @@ 
 			reg = <0x01c20c90 0x10>;
 		};
 
+		lradc: lradc@01c22800 {
+			compatible = "allwinner,sun4i-lradc-keys";
+			reg = <0x01c22800 0x100>;
+			interrupts = <31>;
+			status = "disabled";
+		};
+
 		sid: eeprom@01c23800 {
 			compatible = "allwinner,sun4i-a10-sid";
 			reg = <0x01c23800 0x10>;
diff --git a/arch/arm/boot/dts/sun5i-a13-olinuxino.dts b/arch/arm/boot/dts/sun5i-a13-olinuxino.dts
index 429994e..11ecb36 100644
--- a/arch/arm/boot/dts/sun5i-a13-olinuxino.dts
+++ b/arch/arm/boot/dts/sun5i-a13-olinuxino.dts
@@ -14,6 +14,7 @@ 
 /dts-v1/;
 /include/ "sun5i-a13.dtsi"
 /include/ "sunxi-common-regulators.dtsi"
+#include <dt-bindings/input/input.h>
 
 / {
 	model = "Olimex A13-Olinuxino";
@@ -66,6 +67,41 @@ 
 			};
 		};
 
+		lradc: lradc@01c22800 {
+			vref-supply = <&reg_vcc3v0>;
+			status = "okay";
+			button@19 {
+				label = "Volume Up";
+				linux,code = <KEY_VOLUMEUP>;
+				channel = <0>;
+				voltage = <191274>;
+			};
+			button@39 {
+				label = "Volume Down";
+				linux,code = <KEY_VOLUMEDOWN>;
+				channel = <0>;
+				voltage = <392644>;
+			};
+			button@60 {
+				label = "Menu";
+				linux,code = <KEY_MENU>;
+				channel = <0>;
+				voltage = <601151>;
+			};
+			button@80 {
+				label = "Enter";
+				linux,code = <KEY_ENTER>;
+				channel = <0>;
+				voltage = <795090>;
+			};
+			button@98 {
+				label = "Home";
+				linux,code = <KEY_HOME>;
+				channel = <0>;
+				voltage = <987387>;
+			};
+		};
+
 		uart1: serial@01c28400 {
 			pinctrl-names = "default";
 			pinctrl-0 = <&uart1_pins_b>;
diff --git a/arch/arm/boot/dts/sun5i-a13.dtsi b/arch/arm/boot/dts/sun5i-a13.dtsi
index b131068..528d0d6 100644
--- a/arch/arm/boot/dts/sun5i-a13.dtsi
+++ b/arch/arm/boot/dts/sun5i-a13.dtsi
@@ -468,6 +468,13 @@ 
 			reg = <0x01c20c90 0x10>;
 		};
 
+		lradc: lradc@01c22800 {
+			compatible = "allwinner,sun4i-lradc-keys";
+			reg = <0x01c22800 0x100>;
+			interrupts = <31>;
+			status = "disabled";
+		};
+
 		sid: eeprom@01c23800 {
 			compatible = "allwinner,sun4i-a10-sid";
 			reg = <0x01c23800 0x10>;