From patchwork Sat Jun 25 00:18:37 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrew Duggan X-Patchwork-Id: 9198277 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 9F44D60871 for ; Sat, 25 Jun 2016 00:18:51 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 8E00C284DD for ; Sat, 25 Jun 2016 00:18:51 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 7FC12284E9; Sat, 25 Jun 2016 00:18:51 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=2.0 tests=BAYES_00,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 2D247284DD for ; Sat, 25 Jun 2016 00:18:51 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751809AbcFYASt (ORCPT ); Fri, 24 Jun 2016 20:18:49 -0400 Received: from us-mx1.synaptics.com ([192.147.44.131]:10148 "EHLO us-mx1.synaptics.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751524AbcFYASt (ORCPT ); Fri, 24 Jun 2016 20:18:49 -0400 Received: from unknown (HELO USW-OWA1.synaptics-inc.local) ([10.20.24.16]) by us-mx1.synaptics.com with ESMTP; 24 Jun 2016 17:18:51 -0700 Received: from noble.synaptics-inc.local (10.4.10.103) by USW-OWA1.synaptics-inc.local (10.20.24.16) with Microsoft SMTP Server (TLS) id 14.3.248.2; Fri, 24 Jun 2016 17:18:45 -0700 From: Andrew Duggan To: , CC: Andrew Duggan , Dmitry Torokhov , Linus Walleij , Jiri Kosina , Benjamin Tissoires , Vincent Huang , Nick Dyer , , Mark Rutland Subject: [PATCH v2 3/8] Input: synaptics-rmi4: Add dribble and palm gesture parameters to device tree Date: Fri, 24 Jun 2016 17:18:37 -0700 Message-ID: <1466813917-15841-1-git-send-email-aduggan@synaptics.com> X-Mailer: git-send-email 2.5.0 MIME-Version: 1.0 X-Originating-IP: [10.4.10.103] Sender: linux-input-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-input@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Signed-off-by: Andrew Duggan --- .../devicetree/bindings/input/rmi4/rmi_2d_sensor.txt | 4 ++++ drivers/input/rmi4/rmi_2d_sensor.c | 11 +++++++++++ 2 files changed, 15 insertions(+) diff --git a/Documentation/devicetree/bindings/input/rmi4/rmi_2d_sensor.txt b/Documentation/devicetree/bindings/input/rmi4/rmi_2d_sensor.txt index f2c30c8..86cb8e3 100644 --- a/Documentation/devicetree/bindings/input/rmi4/rmi_2d_sensor.txt +++ b/Documentation/devicetree/bindings/input/rmi4/rmi_2d_sensor.txt @@ -37,6 +37,10 @@ Optional Properties: disable reporing absolute position data. - syna,rezero-wait-ms: Time in miliseconds to wait after issuing a rezero command. +- syna,dribble-enable: Enable reporting of dribble packets in the firmware. +- syna,dribble-disable: Disable reporting of dribble packets in the firmware. +- syna,palm-detect-enable: Enable reporting the palm detect gesture in the firmware. +- syna,palm-detect-disable: Disable reporting the palm detect gesture in the firmware. Example of a RMI4 I2C device with F11: diff --git a/drivers/input/rmi4/rmi_2d_sensor.c b/drivers/input/rmi4/rmi_2d_sensor.c index e97bd7f..ee26e35 100644 --- a/drivers/input/rmi4/rmi_2d_sensor.c +++ b/drivers/input/rmi4/rmi_2d_sensor.c @@ -317,6 +317,17 @@ int rmi_2d_sensor_of_probe(struct device *dev, pdata->rezero_wait = val; + if (of_property_read_bool(dev->of_node, "syna,dribble-enable")) + pdata->dribble = RMI_REG_STATE_ON; + else if (of_property_read_bool(dev->of_node, "syna,dribble-disable")) + pdata->dribble = RMI_REG_STATE_OFF; + + if (of_property_read_bool(dev->of_node, "syna,palm-detect-enable")) + pdata->palm_detect = RMI_REG_STATE_ON; + else if (of_property_read_bool(dev->of_node, + "syna,palm-detect-disable")) + pdata->palm_detect = RMI_REG_STATE_OFF; + return 0; } #else