ARM: tegra: enable gpio-keys on dalmore
Subsystems (2)
PATCH v2 1/1 ARM: tegra: enable gpio-keys on dalmore
Dalmore have the keys mounted on board which are connected to different pins of Tegra.
Add the keys entry in DTS file to enable key functionality. This will enable KEY_POWER, KEY_HOME, KEY_VOLUMEUP and KEY_VOLUMEDOWN.
---
Changes from V1:
- Reorder the nodes.
arch/arm/boot/dts/tegra114-dalmore.dts | 30 ++++++++++++++++++++++++++++++ 1 files changed, 30 insertions(+), 0 deletions(-)
arch/arm/boot/dts/tegra114-dalmore.dts +30 -0
@@ -883,6 +883,35 @@ }; }; + gpio-keys { + compatible = "gpio-keys"; + + home { + label = "Home"; + gpios = <&gpio TEGRA_GPIO(I, 5) GPIO_ACTIVE_LOW>; + linux,code = <102>; /* KEY_HOME */ + }; + + power { + label = "Power"; + gpios = <&gpio TEGRA_GPIO(Q, 0) GPIO_ACTIVE_LOW>; + linux,code = <116>; /* KEY_POWER */ + gpio-key,wakeup; + }; + + volume_down { + label = "VolumeDown"; + gpios = <&gpio TEGRA_GPIO(R, 1) GPIO_ACTIVE_LOW>; + linux,code = <114>; /* KEY_VOLUMEDOWN */ + }; + + volume_up { + label = "VolumeUp"; + gpios = <&gpio TEGRA_GPIO(R, 2) GPIO_ACTIVE_LOW>; + linux,code = <115>; /* KEY_VOLUMEUP */ + }; + }; + regulators { compatible = "simple-bus"; #address-cells = <1>;
@@ -976,4 +1005,5 @@ <&tegra_car TEGRA114_CLK_EXTERN1>; clock-names = "pll_a", "pll_a_out0", "mclk"; }; + };
Signature · 1 line
1.7.1.1
Quoted 10 lines · Laxman Dewangan
Dalmore have the keys mounted on board which are connected to different pins of Tegra.
Add the keys entry in DTS file to enable key functionality. This will enable
KEY_POWER,KEY_HOME,KEY_VOLUMEUPandKEY_VOLUMEDOWN.
arch/arm/boot/dts/tegra114-dalmore.dts line 1009
Quoted 5 lines
arch/arm/boot/dts/tegra114-dalmore.dts +1
-0@@ -976,4 +1005,5 @@ <&tegra_car TEGRA114_CLK_EXTERN1>; clock-names = "pll_a", "pll_a_out0", "mclk"; }; + };
What's that? I'll try to remember to fix this up when applying, but proof-reading would help.
Quoted 11 lines · Stephen Warren
arch/arm/boot/dts/tegra114-dalmore.dts line 1009
Quoted 7 lines · Laxman Dewangan
arch/arm/boot/dts/tegra114-dalmore.dts +1
-0@@ -976,4 +1005,5 @@ <&tegra_car TEGRA114_CLK_EXTERN1>; clock-names = "pll_a", "pll_a_out0", "mclk"; }; + };What's that? I'll try to remember to fix this up when applying, but proof-reading would help.
Oops.. My bad.. Did not see the bottom when doing patch review.
Let me know if I need to send V4 if it is easy for you to handle?
Quoted 20 lines · Laxman Dewangan
Dalmore have the keys mounted on board which are connected to different pins of Tegra.
Add the keys entry in DTS file to enable key functionality. This will enable
KEY_POWER,KEY_HOME,KEY_VOLUMEUPandKEY_VOLUMEDOWN.Signed-off-by Laxman Dewangan <[email protected]>---
Changes from V1:
- Reorder the nodes.arch/arm/boot/dts/tegra114-dalmore.dts | 30 ++++++++++++++++++++++++++++++ 1 files changed, 30 insertions(+), 0 deletions(-)arch/arm/boot/dts/tegra114-dalmore.dts +0
-0
arch/arm/boot/dts/tegra114-dalmore.dts line 892
Quoted 10 lines
arch/arm/boot/dts/tegra114-dalmore.dts +7
-0@@ -883,6 +883,35 @@ }; }; + gpio-keys { + compatible = "gpio-keys"; + + home { + label = "Home"; + gpios = <&gpio TEGRA_GPIO(I, 5) GPIO_ACTIVE_LOW>; + linux,code = <102>; /* KEY_HOME */
I wonder if these should maybe go into a header file as well so that symbolic names can be used. That'll make the value self-descriptive and allow the comment to be dropped.
arch/arm/boot/dts/tegra114-dalmore.dts line 913
Quoted 12 lines
arch/arm/boot/dts/tegra114-dalmore.dts +12
-0+ volume_down { + label = "VolumeDown"; + gpios = <&gpio TEGRA_GPIO(R, 1) GPIO_ACTIVE_LOW>; + linux,code = <114>; /* KEY_VOLUMEDOWN */ + }; + + volume_up { + label = "VolumeUp"; + gpios = <&gpio TEGRA_GPIO(R, 2) GPIO_ACTIVE_LOW>; + linux,code = <115>; /* KEY_VOLUMEUP */ + }; + };
Nit: Perhaps the labels should be "Volume Down" and "Volume Up" here?
Thierry
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20130709/75068339/attachment.sig>
Quoted 13 lines · Thierry Reding
* PGP Signed by an unknown key
arch/arm/boot/dts/tegra114-dalmore.dts line 892
Quoted 6 lines · Laxman Dewangan
D
arch/arm/boot/dts/tegra114-dalmore.dts +5
-0+ + home { + label = "Home"; + gpios = <&gpio TEGRA_GPIO(I, 5) GPIO_ACTIVE_LOW>; + linux,code = <102>; /* KEY_HOME */I wonder if these should maybe go into a header file as well so that symbolic names can be used. That'll make the value self-descriptive and allow the comment to be dropped.
Currently there is no header for input.h in dt-binding include. We need to add them first and then use it. Probably it can be done along with all cleanups on dts file atleast for Tegra.
I can start this if no one faster than me for this activity but for this patch, I like to go on legacy way.