From: Rob Herring <robh@kernel.org>
To: "Michal Vokáč" <michal.vokac@ysoft.com>
Cc: Dmitry Torokhov <dmitry.torokhov@gmail.com>,
Shawn Guo <shawnguo@kernel.org>,
Fabio Estevam <festevam@gmail.com>,
linux-input@vger.kernel.org, devicetree@vger.kernel.org
Subject: Re: [PATCH input-next 2/4] dt-bindings: input: mpr121: Add poll-interval property
Date: Tue, 3 Sep 2019 08:01:23 +0100 [thread overview]
Message-ID: <20190903070123.GA15981@bogus> (raw)
In-Reply-To: <1567424417-3914-3-git-send-email-michal.vokac@ysoft.com>
On Mon, Sep 02, 2019 at 01:40:15PM +0200, Michal Vokáč wrote:
> Add an option to periodicaly poll the device to get the buttons states
> as the interrupt line may not be used on some platforms.
>
> Signed-off-by: Michal Vokáč <michal.vokac@ysoft.com>
> ---
> I am not sure how to propperly handle this.
> Either interrupt or linux,poll-interval is required, but not both.
Add this at the top level:
oneOf:
- required: [ interrupts ]
- required: [ linux,poll-interval ]
>
> .../bindings/input/fsl,mpr121-touchkey.yaml | 20 +++++++++++++++++++-
> 1 file changed, 19 insertions(+), 1 deletion(-)
>
> diff --git a/Documentation/devicetree/bindings/input/fsl,mpr121-touchkey.yaml b/Documentation/devicetree/bindings/input/fsl,mpr121-touchkey.yaml
> index c463c1c81755..2b3073a3c9f4 100644
> --- a/Documentation/devicetree/bindings/input/fsl,mpr121-touchkey.yaml
> +++ b/Documentation/devicetree/bindings/input/fsl,mpr121-touchkey.yaml
> @@ -34,6 +34,10 @@ properties:
> minItems: 1
> maxItems: 12
>
> + linux,poll-interval:
> + description: Poll interval time in milliseconds.
> + maxItems: 1
We already have 'poll-interval' in several bindings. Use that.
This should have a type definition and you don't need maxItems:
$ref: /schemas/types.yaml#/definitions/uint32
Really this should go in a common input schema doc.
> +
> wakeup-source: Use any event on keypad as wakeup event.
> type: boolean
>
> @@ -44,12 +48,12 @@ properties:
> required:
> - compatible
> - reg
> - - interrupts
> - vdd-supply
> - linux,keycodes
>
> examples:
> - |
> + // Example with interrupts
> #include "dt-bindings/input/input.h"
> touchkey: mpr121@5a {
> compatible = "fsl,mpr121-touchkey";
> @@ -62,3 +66,17 @@ examples:
> <KEY_4> <KEY_5>, <KEY_6>, <KEY_7>,
> <KEY_8>, <KEY_9>, <KEY_A>, <KEY_B>;
> };
> +
> + - |
> + // Example with polling
> + #include "dt-bindings/input/input.h"
> + touchkey: mpr121@5a {
> + compatible = "fsl,mpr121-touchkey";
> + reg = <0x5a>;
> + linux,poll-interval = <20>;
> + autorepeat;
> + vdd-supply = <&ldo4_reg>;
> + linux,keycodes = <KEY_0>, <KEY_1>, <KEY_2>, <KEY_3>,
> + <KEY_4> <KEY_5>, <KEY_6>, <KEY_7>,
> + <KEY_8>, <KEY_9>, <KEY_A>, <KEY_B>;
> + );
> --
> 2.1.4
>
next prev parent reply other threads:[~2019-09-03 7:01 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-09-02 11:40 [PATCH input-next 0/4] Add polling mode to the MPR121 touchkey Michal Vokáč
2019-09-02 11:40 ` [PATCH input-next 1/4] dt-bindings: input: Convert mpr121 binding to json-schema Michal Vokáč
2019-09-03 6:56 ` Rob Herring
[not found] ` <29307819-fcac-cbf8-0439-23c831d87278@ysoft.com>
2019-09-27 6:45 ` Michal Vokáč
2019-09-02 11:40 ` [PATCH input-next 2/4] dt-bindings: input: mpr121: Add poll-interval property Michal Vokáč
2019-09-03 7:01 ` Rob Herring [this message]
[not found] ` <c8c909e5-1e1f-23a7-dc22-f112fcaeab4c@ysoft.com>
2019-09-27 6:47 ` Michal Vokáč
2019-09-27 12:46 ` Rob Herring
2019-09-02 11:40 ` [PATCH input-next 3/4] Input: mpr121: Add polling mode Michal Vokáč
2019-09-02 11:40 ` [PATCH input-next 4/4] ARM: dts: imx6dl-yapp4: Enable the MPR121 touchkey controller on Hydra Michal Vokáč
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=20190903070123.GA15981@bogus \
--to=robh@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=dmitry.torokhov@gmail.com \
--cc=festevam@gmail.com \
--cc=linux-input@vger.kernel.org \
--cc=michal.vokac@ysoft.com \
--cc=shawnguo@kernel.org \
/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.