From: Fengping Yu <fengping.yu@mediatek.com> To: Marco Felsch <m.felsch@pengutronix.de>, Andy Shevchenko <andriy.shevchenko@linux.intel.com>, Dmitry Torokhov <dmitry.torokhov@gmail.com>, Yingjoe Chen <yingjoe.chen@mediatek.com> Cc: "fengping.yu" <fengping.yu@mediatek.com>, linux-mediatek@lists.infradead.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-input@vger.kernel.org Subject: [PATCH v6 1/3] dt-bindings: Change keypad documentation schema Date: Sat, 9 May 2020 10:04:59 +0800 [thread overview] Message-ID: <20200509020458.8359-2-fengping.yu@mediatek.com> (raw) In-Reply-To: <20200509020458.8359-1-fengping.yu@mediatek.com> From: "fengping.yu" <fengping.yu@mediatek.com> Change Mediatek matrix keypad dt-bindings doc to yaml schema. Signed-off-by: fengping.yu <fengping.yu@mediatek.com> --- .../devicetree/bindings/input/mtk-kpd.txt | 61 ------------ .../devicetree/bindings/input/mtk-kpd.yaml | 93 +++++++++++++++++++ 2 files changed, 93 insertions(+), 61 deletions(-) delete mode 100644 Documentation/devicetree/bindings/input/mtk-kpd.txt create mode 100644 Documentation/devicetree/bindings/input/mtk-kpd.yaml diff --git a/Documentation/devicetree/bindings/input/mtk-kpd.txt b/Documentation/devicetree/bindings/input/mtk-kpd.txt deleted file mode 100644 index 8b154a5e2f7d..000000000000 --- a/Documentation/devicetree/bindings/input/mtk-kpd.txt +++ /dev/null @@ -1,61 +0,0 @@ -* Mediatek's Keypad Controller device tree binding - -Mediatek's Keypad controller is used to interface a SoC with a matrix-type -keypad device. The keypad controller supports multiple row and column lines. -A key can be placed at each intersection of a unique row and a unique column. -The keypad controller can sense a key-press and key-release and report the -event using a interrupt to the cpu. - -Required properties: -- compatible should contain: - * "mediatek,kp" for common keypad - * "mediatek,mt6779-keypad" for specific keypad chip - -- reg: The base address of the Keypad register bank. - -- interrupts: A single interrupt specifier. - -- mediatek,debounce-us: Debounce interval in microseconds, maximum value - is 256000 microseconds. - -- keypad,num-rows: Number of row lines connected to the keypad controller, it is - not equal to PCB rows number, instead you should add required value for each IC. - -- keypad,num-columns: Number of column lines connected to the keypad controller, - it is not equal to PCB columns number, instead you should add required value - for each IC. - -- linux,keymap: The keymap for keys as described in the binding document - devicetree/bindings/input/matrix-keymap.txt. - -- pinctrl: Should specify pin control groups used for this controller. - See ../pinctrl/pinctrl-bindings.txt for details. - -- clocks: Must contain one entry, for the module clock. - See ../clocks/clock-bindings.txt for details. - -- clock-names: Names of the clocks listed in clocks property in the same order. - -Optional Properties: -- wakeup-source: use any event on keypad as wakeup event. - -Example: - - keypad: kp@10010000 { - compatible = "mediatek,kp"; - reg = <0 0x10010000 0 0x1000>; - wakeup-source; - interrupts = <GIC_SPI 75 IRQ_TYPE_EDGE_FALLING>; - clocks = <&clk26m>; - clock-names = "kpd"; - }; - - &keypad { - mediatek,debounce-us = <32000>; - keypad,num-rows = <8>; - keypad,num-columns = <9>; - linux,keymap = < MATRIX_KEY(0x00, 0x00, KEY_VOLUMEDOWN) >; - status = "okay"; - pinctrl-names = "default"; - pinctrl-0 = <&kpd_gpios_def_cfg>; - }; diff --git a/Documentation/devicetree/bindings/input/mtk-kpd.yaml b/Documentation/devicetree/bindings/input/mtk-kpd.yaml new file mode 100644 index 000000000000..bd4247322e3c --- /dev/null +++ b/Documentation/devicetree/bindings/input/mtk-kpd.yaml @@ -0,0 +1,93 @@ +%YAML 1.2 +--- +version: 1 + +id: mtk-keypad + +title: Mediatek's Keypad Controller device tree bindings + +maintainer: + - name: Fengping Yu <fengping.yu@mediatek.com> + +description: > + TODO + +properties: + - name: "compatible" + constraint: | + "mediatek,mt6779-keypad" + "mediatek, kp" + clock-names: + clocks: + interrupts: + linux,keymap + pinctrl-0: + pinctrl-names: + reg: + wakeup-source: + keypad,num-columns: + keypad,num-rows: + mediatek,debounce-us + status: +... +# * Mediatek's Keypad Controller device tree binding +# +# Mediatek's Keypad controller is used to interface a SoC with a matrix-type +# keypad device. The keypad controller supports multiple row and column lines. +# A key can be placed at each intersection of a unique row and a unique column. +# The keypad controller can sense a key-press and key-release and report the +# event using a interrupt to the cpu. +# +# Required properties: +# - compatible should contain: +# * "mediatek,kp" for common keypad +# * "mediatek,mt6779-keypad" for specific keypad chip +# +# - reg: The base address of the Keypad register bank. +# +# - interrupts: A single interrupt specifier. +# +# - mediatek,debounce-us: Debounce interval in microseconds, maximum value +# is 256000 microseconds. +# +# - keypad,num-rows: Number of row lines connected to the keypad controller, it is +# not equal to PCB rows number, instead you should add required value for each IC. +# +# - keypad,num-columns: Number of column lines connected to the keypad controller, +# it is not equal to PCB columns number, instead you should add required value +# for each IC. +# +# - linux,keymap: The keymap for keys as described in the binding document +# devicetree/bindings/input/matrix-keymap.txt. +# +# - pinctrl: Should specify pin control groups used for this controller. +# See ../pinctrl/pinctrl-bindings.txt for details. +# +# - clocks: Must contain one entry, for the module clock. +# See ../clocks/clock-bindings.txt for details. +# +# - clock-names: Names of the clocks listed in clocks property in the same order. +# +# Optional Properties: +# - wakeup-source: use any event on keypad as wakeup event. +# +# Example: +# +# keypad: kp@10010000 { +# compatible = "mediatek,kp"; +# reg = <0 0x10010000 0 0x1000>; +# wakeup-source; +# interrupts = <GIC_SPI 75 IRQ_TYPE_EDGE_FALLING>; +# clocks = <&clk26m>; +# clock-names = "kpd"; +# }; +# +# &keypad { +# mediatek,debounce-us = <32000>; +# keypad,num-rows = <8>; +# keypad,num-columns = <9>; +# linux,keymap = < MATRIX_KEY(0x00, 0x00, KEY_VOLUMEDOWN) >; +# status = "okay"; +# pinctrl-names = "default"; +# pinctrl-0 = <&kpd_gpios_def_cfg>; +# }; -- 2.18.0 _______________________________________________ Linux-mediatek mailing list Linux-mediatek@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-mediatek
WARNING: multiple messages have this Message-ID (diff)
From: Fengping Yu <fengping.yu@mediatek.com> To: Marco Felsch <m.felsch@pengutronix.de>, Andy Shevchenko <andriy.shevchenko@linux.intel.com>, Dmitry Torokhov <dmitry.torokhov@gmail.com>, Yingjoe Chen <yingjoe.chen@mediatek.com> Cc: "fengping.yu" <fengping.yu@mediatek.com>, linux-mediatek@lists.infradead.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-input@vger.kernel.org Subject: [PATCH v6 1/3] dt-bindings: Change keypad documentation schema Date: Sat, 9 May 2020 10:04:59 +0800 [thread overview] Message-ID: <20200509020458.8359-2-fengping.yu@mediatek.com> (raw) In-Reply-To: <20200509020458.8359-1-fengping.yu@mediatek.com> From: "fengping.yu" <fengping.yu@mediatek.com> Change Mediatek matrix keypad dt-bindings doc to yaml schema. Signed-off-by: fengping.yu <fengping.yu@mediatek.com> --- .../devicetree/bindings/input/mtk-kpd.txt | 61 ------------ .../devicetree/bindings/input/mtk-kpd.yaml | 93 +++++++++++++++++++ 2 files changed, 93 insertions(+), 61 deletions(-) delete mode 100644 Documentation/devicetree/bindings/input/mtk-kpd.txt create mode 100644 Documentation/devicetree/bindings/input/mtk-kpd.yaml diff --git a/Documentation/devicetree/bindings/input/mtk-kpd.txt b/Documentation/devicetree/bindings/input/mtk-kpd.txt deleted file mode 100644 index 8b154a5e2f7d..000000000000 --- a/Documentation/devicetree/bindings/input/mtk-kpd.txt +++ /dev/null @@ -1,61 +0,0 @@ -* Mediatek's Keypad Controller device tree binding - -Mediatek's Keypad controller is used to interface a SoC with a matrix-type -keypad device. The keypad controller supports multiple row and column lines. -A key can be placed at each intersection of a unique row and a unique column. -The keypad controller can sense a key-press and key-release and report the -event using a interrupt to the cpu. - -Required properties: -- compatible should contain: - * "mediatek,kp" for common keypad - * "mediatek,mt6779-keypad" for specific keypad chip - -- reg: The base address of the Keypad register bank. - -- interrupts: A single interrupt specifier. - -- mediatek,debounce-us: Debounce interval in microseconds, maximum value - is 256000 microseconds. - -- keypad,num-rows: Number of row lines connected to the keypad controller, it is - not equal to PCB rows number, instead you should add required value for each IC. - -- keypad,num-columns: Number of column lines connected to the keypad controller, - it is not equal to PCB columns number, instead you should add required value - for each IC. - -- linux,keymap: The keymap for keys as described in the binding document - devicetree/bindings/input/matrix-keymap.txt. - -- pinctrl: Should specify pin control groups used for this controller. - See ../pinctrl/pinctrl-bindings.txt for details. - -- clocks: Must contain one entry, for the module clock. - See ../clocks/clock-bindings.txt for details. - -- clock-names: Names of the clocks listed in clocks property in the same order. - -Optional Properties: -- wakeup-source: use any event on keypad as wakeup event. - -Example: - - keypad: kp@10010000 { - compatible = "mediatek,kp"; - reg = <0 0x10010000 0 0x1000>; - wakeup-source; - interrupts = <GIC_SPI 75 IRQ_TYPE_EDGE_FALLING>; - clocks = <&clk26m>; - clock-names = "kpd"; - }; - - &keypad { - mediatek,debounce-us = <32000>; - keypad,num-rows = <8>; - keypad,num-columns = <9>; - linux,keymap = < MATRIX_KEY(0x00, 0x00, KEY_VOLUMEDOWN) >; - status = "okay"; - pinctrl-names = "default"; - pinctrl-0 = <&kpd_gpios_def_cfg>; - }; diff --git a/Documentation/devicetree/bindings/input/mtk-kpd.yaml b/Documentation/devicetree/bindings/input/mtk-kpd.yaml new file mode 100644 index 000000000000..bd4247322e3c --- /dev/null +++ b/Documentation/devicetree/bindings/input/mtk-kpd.yaml @@ -0,0 +1,93 @@ +%YAML 1.2 +--- +version: 1 + +id: mtk-keypad + +title: Mediatek's Keypad Controller device tree bindings + +maintainer: + - name: Fengping Yu <fengping.yu@mediatek.com> + +description: > + TODO + +properties: + - name: "compatible" + constraint: | + "mediatek,mt6779-keypad" + "mediatek, kp" + clock-names: + clocks: + interrupts: + linux,keymap + pinctrl-0: + pinctrl-names: + reg: + wakeup-source: + keypad,num-columns: + keypad,num-rows: + mediatek,debounce-us + status: +... +# * Mediatek's Keypad Controller device tree binding +# +# Mediatek's Keypad controller is used to interface a SoC with a matrix-type +# keypad device. The keypad controller supports multiple row and column lines. +# A key can be placed at each intersection of a unique row and a unique column. +# The keypad controller can sense a key-press and key-release and report the +# event using a interrupt to the cpu. +# +# Required properties: +# - compatible should contain: +# * "mediatek,kp" for common keypad +# * "mediatek,mt6779-keypad" for specific keypad chip +# +# - reg: The base address of the Keypad register bank. +# +# - interrupts: A single interrupt specifier. +# +# - mediatek,debounce-us: Debounce interval in microseconds, maximum value +# is 256000 microseconds. +# +# - keypad,num-rows: Number of row lines connected to the keypad controller, it is +# not equal to PCB rows number, instead you should add required value for each IC. +# +# - keypad,num-columns: Number of column lines connected to the keypad controller, +# it is not equal to PCB columns number, instead you should add required value +# for each IC. +# +# - linux,keymap: The keymap for keys as described in the binding document +# devicetree/bindings/input/matrix-keymap.txt. +# +# - pinctrl: Should specify pin control groups used for this controller. +# See ../pinctrl/pinctrl-bindings.txt for details. +# +# - clocks: Must contain one entry, for the module clock. +# See ../clocks/clock-bindings.txt for details. +# +# - clock-names: Names of the clocks listed in clocks property in the same order. +# +# Optional Properties: +# - wakeup-source: use any event on keypad as wakeup event. +# +# Example: +# +# keypad: kp@10010000 { +# compatible = "mediatek,kp"; +# reg = <0 0x10010000 0 0x1000>; +# wakeup-source; +# interrupts = <GIC_SPI 75 IRQ_TYPE_EDGE_FALLING>; +# clocks = <&clk26m>; +# clock-names = "kpd"; +# }; +# +# &keypad { +# mediatek,debounce-us = <32000>; +# keypad,num-rows = <8>; +# keypad,num-columns = <9>; +# linux,keymap = < MATRIX_KEY(0x00, 0x00, KEY_VOLUMEDOWN) >; +# status = "okay"; +# pinctrl-names = "default"; +# pinctrl-0 = <&kpd_gpios_def_cfg>; +# }; -- 2.18.0 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
next prev parent reply other threads:[~2020-05-09 2:20 UTC|newest] Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top 2020-05-09 2:04 [PATCH v6] Add mtk matrix keypad driver for keypad on MTK SoC Fengping Yu 2020-05-09 2:04 ` Fengping Yu 2020-05-09 2:04 ` Fengping Yu 2020-05-09 2:04 ` Fengping Yu [this message] 2020-05-09 2:04 ` [PATCH v6 1/3] dt-bindings: Change keypad documentation schema Fengping Yu 2020-05-09 2:05 ` [PATCH v6 2/3] drivers: input: keyboard: Add mtk keypad driver Fengping Yu 2020-05-09 2:05 ` Fengping Yu 2020-05-09 2:05 ` [PATCH v6 3/3] configs: defconfig: Add CONFIG_KEYBOARD_MTK_KPD=y Fengping Yu 2020-05-09 2:05 ` Fengping Yu 2020-05-09 9:39 ` [PATCH v6] Add mtk matrix keypad driver for keypad on MTK SoC Marco Felsch 2020-05-09 9:39 ` Marco Felsch 2020-05-09 9:39 ` Marco Felsch
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=20200509020458.8359-2-fengping.yu@mediatek.com \ --to=fengping.yu@mediatek.com \ --cc=andriy.shevchenko@linux.intel.com \ --cc=dmitry.torokhov@gmail.com \ --cc=linux-arm-kernel@lists.infradead.org \ --cc=linux-input@vger.kernel.org \ --cc=linux-kernel@vger.kernel.org \ --cc=linux-mediatek@lists.infradead.org \ --cc=m.felsch@pengutronix.de \ --cc=yingjoe.chen@mediatek.com \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.