All of lore.kernel.org
 help / color / mirror / Atom feed
From: Marco Felsch <m.felsch@pengutronix.de>
To: Fengping Yu <fengping.yu@mediatek.com>
Cc: Yingjoe Chen <yingjoe.chen@mediatek.com>,
	Dmitry Torokhov <dmitry.torokhov@gmail.com>,
	Andy Shevchenko <andriy.shevchenko@linux.intel.com>,
	linux-arm-kernel@lists.infradead.org,
	linux-mediatek@lists.infradead.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v7 1/3] dt-bindings: Add keypad devicetree documentation
Date: Thu, 14 May 2020 11:31:16 +0200	[thread overview]
Message-ID: <20200514093116.coiz5ofsjmxhafma@pengutronix.de> (raw)
In-Reply-To: <20200514061747.25466-2-fengping.yu@mediatek.com>

Hi,

On 20-05-14 14:17, Fengping Yu wrote:
> From: "fengping.yu" <fengping.yu@mediatek.com>
> 
> Add Mediatek matrix keypad dt-binding doc as yaml schema.
> 
> Signed-off-by: fengping.yu <fengping.yu@mediatek.com>
> ---
>  .../devicetree/bindings/input/mtk-kpd.yaml    | 102 ++++++++++++++++++
>  1 file changed, 102 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..8f594fe0bfc2
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/input/mtk-kpd.yaml
> @@ -0,0 +1,102 @@
> +%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@mediatek.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:
> +      constraint: |

enum or const ?

> +        "mediatek,mt6779-keypad"
> +        "mediatek, kp"
> +
> +    clock-names:
> +	description: Names of the clocks listed in clocks property in the same order
> +
> +    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
> +
> +    linux,keymap:
> +	description: The keymap for keys as described in the binding document
> +	refs: devicetree/bindings/input/matrix-keymap.txt
> +
> +    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
> +
> +    reg:
> +	description: The base address of the Keypad register bank
> +
> +    wakeup-source:
> +	description: use any event on keypad as wakeup event
> +
> +    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
> +
> +    mediatek,debounce-us:
> +	description: Debounce interval in microseconds
> +	maximum: 256000

I think that you are missing the maxItems on all your properties so we
can't make any validation. Also the indent looks wrong.

> +
> +
> +required:
> +  - compatible
> +  - reg
> +  - interrupts
> +  - mediatek,debounce-us
> +  - keypad,num-rows
> +  - keypad,num-columns
> +  - linux,keymap
> +  - pinctrl
> +  - clocks
> +  - clock-names
> +
> +optional:
> +  - wakeup-source:

I think the optional can be dropped.

> +examples:
> +  - |
> +
> +    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>;
> +    };

Pls squash those nodes.

Regards,
  Marco

> -- 
> 2.18.0

WARNING: multiple messages have this Message-ID (diff)
From: Marco Felsch <m.felsch@pengutronix.de>
To: Fengping Yu <fengping.yu@mediatek.com>
Cc: Dmitry Torokhov <dmitry.torokhov@gmail.com>,
	linux-kernel@vger.kernel.org, linux-mediatek@lists.infradead.org,
	Yingjoe Chen <yingjoe.chen@mediatek.com>,
	Andy Shevchenko <andriy.shevchenko@linux.intel.com>,
	linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH v7 1/3] dt-bindings: Add keypad devicetree documentation
Date: Thu, 14 May 2020 11:31:16 +0200	[thread overview]
Message-ID: <20200514093116.coiz5ofsjmxhafma@pengutronix.de> (raw)
In-Reply-To: <20200514061747.25466-2-fengping.yu@mediatek.com>

Hi,

On 20-05-14 14:17, Fengping Yu wrote:
> From: "fengping.yu" <fengping.yu@mediatek.com>
> 
> Add Mediatek matrix keypad dt-binding doc as yaml schema.
> 
> Signed-off-by: fengping.yu <fengping.yu@mediatek.com>
> ---
>  .../devicetree/bindings/input/mtk-kpd.yaml    | 102 ++++++++++++++++++
>  1 file changed, 102 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..8f594fe0bfc2
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/input/mtk-kpd.yaml
> @@ -0,0 +1,102 @@
> +%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@mediatek.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:
> +      constraint: |

enum or const ?

> +        "mediatek,mt6779-keypad"
> +        "mediatek, kp"
> +
> +    clock-names:
> +	description: Names of the clocks listed in clocks property in the same order
> +
> +    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
> +
> +    linux,keymap:
> +	description: The keymap for keys as described in the binding document
> +	refs: devicetree/bindings/input/matrix-keymap.txt
> +
> +    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
> +
> +    reg:
> +	description: The base address of the Keypad register bank
> +
> +    wakeup-source:
> +	description: use any event on keypad as wakeup event
> +
> +    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
> +
> +    mediatek,debounce-us:
> +	description: Debounce interval in microseconds
> +	maximum: 256000

I think that you are missing the maxItems on all your properties so we
can't make any validation. Also the indent looks wrong.

> +
> +
> +required:
> +  - compatible
> +  - reg
> +  - interrupts
> +  - mediatek,debounce-us
> +  - keypad,num-rows
> +  - keypad,num-columns
> +  - linux,keymap
> +  - pinctrl
> +  - clocks
> +  - clock-names
> +
> +optional:
> +  - wakeup-source:

I think the optional can be dropped.

> +examples:
> +  - |
> +
> +    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>;
> +    };

Pls squash those nodes.

Regards,
  Marco

> -- 
> 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: Marco Felsch <m.felsch@pengutronix.de>
To: Fengping Yu <fengping.yu@mediatek.com>
Cc: Dmitry Torokhov <dmitry.torokhov@gmail.com>,
	linux-kernel@vger.kernel.org, linux-mediatek@lists.infradead.org,
	Yingjoe Chen <yingjoe.chen@mediatek.com>,
	Andy Shevchenko <andriy.shevchenko@linux.intel.com>,
	linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH v7 1/3] dt-bindings: Add keypad devicetree documentation
Date: Thu, 14 May 2020 11:31:16 +0200	[thread overview]
Message-ID: <20200514093116.coiz5ofsjmxhafma@pengutronix.de> (raw)
In-Reply-To: <20200514061747.25466-2-fengping.yu@mediatek.com>

Hi,

On 20-05-14 14:17, Fengping Yu wrote:
> From: "fengping.yu" <fengping.yu@mediatek.com>
> 
> Add Mediatek matrix keypad dt-binding doc as yaml schema.
> 
> Signed-off-by: fengping.yu <fengping.yu@mediatek.com>
> ---
>  .../devicetree/bindings/input/mtk-kpd.yaml    | 102 ++++++++++++++++++
>  1 file changed, 102 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..8f594fe0bfc2
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/input/mtk-kpd.yaml
> @@ -0,0 +1,102 @@
> +%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@mediatek.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:
> +      constraint: |

enum or const ?

> +        "mediatek,mt6779-keypad"
> +        "mediatek, kp"
> +
> +    clock-names:
> +	description: Names of the clocks listed in clocks property in the same order
> +
> +    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
> +
> +    linux,keymap:
> +	description: The keymap for keys as described in the binding document
> +	refs: devicetree/bindings/input/matrix-keymap.txt
> +
> +    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
> +
> +    reg:
> +	description: The base address of the Keypad register bank
> +
> +    wakeup-source:
> +	description: use any event on keypad as wakeup event
> +
> +    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
> +
> +    mediatek,debounce-us:
> +	description: Debounce interval in microseconds
> +	maximum: 256000

I think that you are missing the maxItems on all your properties so we
can't make any validation. Also the indent looks wrong.

> +
> +
> +required:
> +  - compatible
> +  - reg
> +  - interrupts
> +  - mediatek,debounce-us
> +  - keypad,num-rows
> +  - keypad,num-columns
> +  - linux,keymap
> +  - pinctrl
> +  - clocks
> +  - clock-names
> +
> +optional:
> +  - wakeup-source:

I think the optional can be dropped.

> +examples:
> +  - |
> +
> +    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>;
> +    };

Pls squash those nodes.

Regards,
  Marco

> -- 
> 2.18.0

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

  reply	other threads:[~2020-05-14  9:31 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-05-14  6:17 [PATCH v7] Add matrix keypad driver support for Mediatek SoCs Fengping Yu
2020-05-14  6:17 ` Fengping Yu
2020-05-14  6:17 ` Fengping Yu
2020-05-14  6:17 ` [PATCH v7 1/3] dt-bindings: Add keypad devicetree documentation Fengping Yu
2020-05-14  6:17   ` Fengping Yu
2020-05-14  9:31   ` Marco Felsch [this message]
2020-05-14  9:31     ` Marco Felsch
2020-05-14  9:31     ` Marco Felsch
2020-05-14 10:04   ` Matthias Brugger
2020-05-14 10:04     ` Matthias Brugger
2020-05-14 10:04     ` Matthias Brugger
2020-05-14  6:17 ` [PATCH v7 2/3] drivers: input: keyboard: Add mtk keypad driver Fengping Yu
2020-05-14  6:17   ` Fengping Yu
2020-05-14  9:24   ` Marco Felsch
2020-05-14  9:24     ` Marco Felsch
2020-05-14  9:24     ` Marco Felsch
2020-05-14 10:27   ` Andy Shevchenko
2020-05-14 10:27     ` Andy Shevchenko
2020-05-14 10:27     ` Andy Shevchenko
2020-05-14 10:30     ` Andy Shevchenko
2020-05-14 10:30       ` Andy Shevchenko
2020-05-14 10:30       ` Andy Shevchenko
2020-05-14  6:17 ` [PATCH v7 3/3] configs: defconfig: Add CONFIG_KEYBOARD_MTK_KPD=y Fengping Yu
2020-05-14  6:17   ` Fengping Yu
2020-05-14  8:56   ` Marco Felsch
2020-05-14  8:56     ` Marco Felsch
2020-05-14  8:56     ` 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=20200514093116.coiz5ofsjmxhafma@pengutronix.de \
    --to=m.felsch@pengutronix.de \
    --cc=andriy.shevchenko@linux.intel.com \
    --cc=dmitry.torokhov@gmail.com \
    --cc=fengping.yu@mediatek.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mediatek@lists.infradead.org \
    --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: link
Be 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.