[<prev] [next>] [day] [month] [year] [list]
Message-ID: <1596077771.11024.18.camel@mtksdaap41>
Date: Thu, 30 Jul 2020 10:56:11 +0800
From: Yingjoe Chen <yingjoe.chen@...iatek.com>
To: Fengping Yu <fengping.yu@...iatek.com>
CC: Dmitry Torokhov <dmitry.torokhov@...il.com>,
Andy Shevchenko <andriy.shevchenko@...ux.intel.com>,
Marco Felsch <m.felsch@...gutronix.de>,
Rob Herring <robh+dt@...nel.org>,
"Mattijs Korpershoek" <mkorpershoek@...libre.com>,
<linux-input@...r.kernel.org>,
<linux-arm-kernel@...ts.infradead.org>,
<linux-mediatek@...ts.infradead.org>,
<linux-kernel@...r.kernel.org>, <devicetree@...r.kernel.org>
Subject: Re: [PATCH v16 1/3] dt-bindings: Add keypad devicetree documentation
Hi,
Summary should specified this patch is for MediaTek:
dt-bindings: add MediaTek keypad devicetree documentation
On Mon, 2020-07-27 at 19:45 +0800, Fengping Yu wrote:
> From: "fengping.yu" <fengping.yu@...iatek.com>
> Add Mediatek matrix keypad dt-bindings doc as yaml schema.
>
> Signed-off-by: fengping.yu <fengping.yu@...iatek.com>
> ---
> .../devicetree/bindings/input/mtk-kpd.yaml | 96 +++++++++++++++++++
> 1 file changed, 96 insertions(+)
> create mode 100644 Documentation/devicetree/bindings/input/mtk-kpd.yaml
>
> diff --git a/Documentation/devicetree/bindings/input/mtk-kpd.yaml b/Documentation/devicetree/bindings/input/mtk-kpd.yaml
> new file mode 100644
> index 000000000000..3bf09e7395d0
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/input/mtk-kpd.yaml
> @@ -0,0 +1,96 @@
> +# SPDX-License-Identifier: GPL-2.0
> +%YAML 1.2
> +---
> +version: 1
> +
> +$id: http://devicetree.org/schemas/input/mtk-keypad.yaml#
> +$schema: http://devicetree.org/meta-schemas/core.yaml#
> +
> +title: Mediatek's Keypad Controller device tree bindings
> +
> +maintainer:
> + - Fengping Yu <fengping.yu@...iatek.com>
> +
> +description: |
> + 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.
> +
> +properties:
> + compatible:
> + oneOf:
> + - const: "mediatek,mt6779-keypad"
> + - const: "mediatek,mt6873-keypad"
> +
> + clock-names:
> + description: Names of the clocks listed in clocks property in the same order
> + maxItems: 1
Please list the clock-names required. In this case, 'kpd'
> +
> + clocks:
> + description: Must contain one entry, for the module clock
> + refs: devicetree/bindings/clocks/clock-bindings.txt for details.
> +
> + interrupts:
> + description: A single interrupt specifier
> + maxItems: 1
> +
> + linux,keymap:
> + description: The keymap for keys as described in the binding document
> + refs: devicetree/bindings/input/matrix-keymap.txt
> + minItems: 1
> + maxItems: 16
Why is this max at 16?
> +
> + pinctrl-0:
> + description: Specify pin control groups used for this controller
> + refs: devicetree/bindings/pinctrl/pinctrl-bindings.txt
> +
> + pinctrl-names:
> + description: Names for optional pin modes
> + maxItems: 1
I'm not sure we should list pinctrl here.
> +
> + reg:
> + description: The base address of the Keypad register bank
> + maxItems: 1
> +
> + wakeup-source:
> + description: use any event on keypad as wakeup event
> + type: boolean
> +
> + keypad,num-columns:
> + description: 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
> +
> + keypad,num-rows:
> + description: 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
So the values depend on IC HW. These are not listed as required. Can
your driver works without them? Default value?
> +
> + mediatek,debounce-us:
> + description: Debounce interval in microseconds, if not specified, the default
> + value is 16000
> + maximum: 256000
> +
> +required:
> + - compatible
> + - reg
> + - interrupts
> + - linux,keymap
> + - pinctrl
> + - clocks
> + - clock-names
> +
> +examples:
> + - |
> +
> + keypad: kp@...10000 {
This should be 'keypad' or instead of kp.
Joe.C
> + compatible = "mediatek,mt6779-keypad";
> + reg = <0 0x10010000 0 0x1000>;
> + linux,keymap = < MATRIX_KEY(0x00, 0x00, KEY_VOLUMEDOWN) >;
> + interrupts = <GIC_SPI 75 IRQ_TYPE_EDGE_FALLING>;
> + clocks = <&clk26m>;
> + clock-names = "kpd";
> + pinctrl-names = "default";
> + pinctrl-0 = <&kpd_gpios_def_cfg>;
> + };
Powered by blists - more mailing lists