Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1225144 > unrolled thread
| Started by | yassinjaffer@gmail.com |
|---|---|
| First post | 2015-09-15 16:10 +0200 |
| Last post | 2015-09-15 17:40 +0200 |
| Articles | 2 — 2 participants |
Back to article view | Back to linux.kernel
This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by
below is the oldest one visible, not the original post.
[PATCH 4/4] devicetree: bindings:Allwinner sun4i keypad yassinjaffer@gmail.com - 2015-09-15 16:10 +0200
Re: [PATCH 4/4] devicetree: bindings:Allwinner sun4i keypad Maxime Ripard <maxime.ripard@free-electrons.com> - 2015-09-15 17:40 +0200
| From | yassinjaffer@gmail.com |
|---|---|
| Date | 2015-09-15 16:10 +0200 |
| Subject | [PATCH 4/4] devicetree: bindings:Allwinner sun4i keypad |
| Message-ID | <q8Z5M-73c-21@gated-at.bofh.it> |
From: Yassin Jaffer <yassinjaffer@gmail.com>
Signed-off-by: Yassin Jaffer <yassinjaffer@gmail.com>
---
.../devicetree/bindings/input/sun4i-keypad.txt | 56 ++++++++++++++++++++++
1 file changed, 56 insertions(+)
create mode 100644 Documentation/devicetree/bindings/input/sun4i-keypad.txt
diff --git a/Documentation/devicetree/bindings/input/sun4i-keypad.txt b/Documentation/devicetree/bindings/input/sun4i-keypad.txt
new file mode 100644
index 0000000..60ed0f2
--- /dev/null
+++ b/Documentation/devicetree/bindings/input/sun4i-keypad.txt
@@ -0,0 +1,56 @@
+Allwinner sun4i keypad
+------------------------------------------------
+
+Required properties:
+ - compatible: "allwinner,sun4i-a10-keypad"
+ - reg: mmio address range of the chip
+ - interrupts: interrupt to which the chip is connected
+ - clocks : shall reference keypad controller clocks.
+ - clock-names : keypad controller internal clock names. Shall contain :
+ * "apb" : APB gating clock
+ * "keypad" : keypad controller clock
+
+Required Board Specific Properties:
+- pinctrl-names: The definition can be found at
+pinctrl/pinctrl-bindings.txt.
+
+- pinctrl-0: The definition can be found at
+pinctrl/pinctrl-bindings.txt.
+
+- linux,keymap: The definition can be found at
+bindings/input/matrix-keymap.txt.
+
+Optional properties:
+ - scan-cycle: device specific scan cycle
+ - debounce-cycle: device specific debounce cycle
+ - autorepeat: If specified device will autorepeat
+
+Example:
+
+#include <dt-bindings/input/input.h>
+
+ kp: kp@01c23000 {
+ compatible = "allwinner,sun4i-a10-keypad";
+ reg = <0x01c23000 0x400>;
+ interrupts = <GIC_SPI 21 IRQ_TYPE_LEVEL_HIGH>;
+ clocks = <&apb0_gates 10>, <&keypad_clk>;
+ clock-names = "apb", "keypad";
+ pinctrl-names = "default";
+ pinctrl-0 = <&keypad_rows>, <&keypad_cols>;
+ linux,keymap = <0x00000067 /* KEY_UP */
+ 0x0001006c /* KEY_DOWN */
+ 0x00020072 /* KEY_VOLUMEDOWN */
+ 0x00030066 /* KEY_HOME */
+ 0x0100006a /* KEY_RIGHT */
+ 0x01010069 /* KEY_LEFT */
+ 0x0102001c /* KEY_ENTER */
+ 0x01030073 /* KEY_VOLUMEUP */
+ 0x02000040 /* KEY_F6 */
+ 0x02010042 /* KEY_F8 */
+ 0x02020043 /* KEY_F9 */
+ 0x02030044 /* KEY_F10 */
+ 0x0300003b /* KEY_F1 */
+ 0x0301003c /* KEY_F2 */
+ 0x0302003d /* KEY_F3 */
+ 0x03030074>; /* KEY_POWER */
+ };
--
1.9.1
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
[toc] | [next] | [standalone]
| From | Maxime Ripard <maxime.ripard@free-electrons.com> |
|---|---|
| Date | 2015-09-15 17:40 +0200 |
| Message-ID | <q90uS-xv-25@gated-at.bofh.it> |
| In reply to | #1225144 |
[Multipart message — attachments visible in raw view] — view raw
On Wed, Sep 16, 2015 at 12:05:57AM +1000, yassinjaffer@gmail.com wrote:
> From: Yassin Jaffer <yassinjaffer@gmail.com>
>
> Signed-off-by: Yassin Jaffer <yassinjaffer@gmail.com>
> ---
> .../devicetree/bindings/input/sun4i-keypad.txt | 56 ++++++++++++++++++++++
> 1 file changed, 56 insertions(+)
> create mode 100644 Documentation/devicetree/bindings/input/sun4i-keypad.txt
>
> diff --git a/Documentation/devicetree/bindings/input/sun4i-keypad.txt b/Documentation/devicetree/bindings/input/sun4i-keypad.txt
> new file mode 100644
> index 0000000..60ed0f2
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/input/sun4i-keypad.txt
> @@ -0,0 +1,56 @@
> +Allwinner sun4i keypad
> +------------------------------------------------
> +
> +Required properties:
> + - compatible: "allwinner,sun4i-a10-keypad"
> + - reg: mmio address range of the chip
> + - interrupts: interrupt to which the chip is connected
> + - clocks : shall reference keypad controller clocks.
> + - clock-names : keypad controller internal clock names. Shall contain :
> + * "apb" : APB gating clock
> + * "keypad" : keypad controller clock
> +
> +Required Board Specific Properties:
> +- pinctrl-names: The definition can be found at
> +pinctrl/pinctrl-bindings.txt.
> +
> +- pinctrl-0: The definition can be found at
> +pinctrl/pinctrl-bindings.txt.
> +
> +- linux,keymap: The definition can be found at
> +bindings/input/matrix-keymap.txt.
> +
> +Optional properties:
> + - scan-cycle: device specific scan cycle
> + - debounce-cycle: device specific debounce cycle
> + - autorepeat: If specified device will autorepeat
Are those properties generic? I couldn't find them defined anywhere.
In which units are those properties?
> +
> +Example:
> +
> +#include <dt-bindings/input/input.h>
> +
> + kp: kp@01c23000 {
> + compatible = "allwinner,sun4i-a10-keypad";
> + reg = <0x01c23000 0x400>;
> + interrupts = <GIC_SPI 21 IRQ_TYPE_LEVEL_HIGH>;
> + clocks = <&apb0_gates 10>, <&keypad_clk>;
> + clock-names = "apb", "keypad";
> + pinctrl-names = "default";
> + pinctrl-0 = <&keypad_rows>, <&keypad_cols>;
> + linux,keymap = <0x00000067 /* KEY_UP */
> + 0x0001006c /* KEY_DOWN */
> + 0x00020072 /* KEY_VOLUMEDOWN */
> + 0x00030066 /* KEY_HOME */
> + 0x0100006a /* KEY_RIGHT */
> + 0x01010069 /* KEY_LEFT */
> + 0x0102001c /* KEY_ENTER */
> + 0x01030073 /* KEY_VOLUMEUP */
> + 0x02000040 /* KEY_F6 */
> + 0x02010042 /* KEY_F8 */
> + 0x02020043 /* KEY_F9 */
> + 0x02030044 /* KEY_F10 */
> + 0x0300003b /* KEY_F1 */
> + 0x0301003c /* KEY_F2 */
> + 0x0302003d /* KEY_F3 */
> + 0x03030074>; /* KEY_POWER */
You don't seem to use the header you just told us to include.
Thanks!
Maxime
--
Maxime Ripard, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web