From patchwork Mon Sep 2 11:40:15 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?b?TWljaGFsIFZva8OhxI0=?= X-Patchwork-Id: 11126491 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 728361398 for ; Mon, 2 Sep 2019 11:40:47 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 518242173E for ; Mon, 2 Sep 2019 11:40:47 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=ysoft.com header.i=@ysoft.com header.b="Ld/8aFhB" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731001AbfIBLkp (ORCPT ); Mon, 2 Sep 2019 07:40:45 -0400 Received: from uho.ysoft.cz ([81.19.3.130]:43748 "EHLO uho.ysoft.cz" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730975AbfIBLko (ORCPT ); Mon, 2 Sep 2019 07:40:44 -0400 Received: from iota-build.ysoft.local (unknown [10.1.5.151]) by uho.ysoft.cz (Postfix) with ESMTP id 9168DA3572; Mon, 2 Sep 2019 13:40:42 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ysoft.com; s=20160406-ysoft-com; t=1567424442; bh=6RQ2RglASyvtA3arVyeg0dngL0bF8rz4y3wnPK/XtDE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Ld/8aFhBvlIOlMpJMzC5bN8Wdqpg3U4mH+9fXhaFsUw+L++xBcS2/QNnDqzECIGAA 9UkOD0PnCeEiHXbfmegMm1M7Mpf3tcMMRRdeR/dv54nDBZ5Y1eAmWdDosrcKL8+Go0 wi/kpLoGD/CjJa8uvNUA0BfWVoIGiiLmGpN5EePg= From: =?utf-8?b?TWljaGFsIFZva8OhxI0=?= To: Dmitry Torokhov , Rob Herring Cc: Shawn Guo , Fabio Estevam , linux-input@vger.kernel.org, devicetree@vger.kernel.org, =?utf-8?b?TWljaGFs?= =?utf-8?b?IFZva8OhxI0=?= Subject: [PATCH input-next 2/4] dt-bindings: input: mpr121: Add poll-interval property Date: Mon, 2 Sep 2019 13:40:15 +0200 Message-Id: <1567424417-3914-3-git-send-email-michal.vokac@ysoft.com> X-Mailer: git-send-email 2.1.4 In-Reply-To: <1567424417-3914-1-git-send-email-michal.vokac@ysoft.com> References: <1567424417-3914-1-git-send-email-michal.vokac@ysoft.com> MIME-Version: 1.0 Sender: linux-input-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-input@vger.kernel.org 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áč --- I am not sure how to propperly handle this. Either interrupt or linux,poll-interval is required, but not both. .../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 + 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: , , , , , , ; }; + + - | + // 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 = , , , , + , , , + , , , ; + );