From patchwork Sun Sep 21 03:01:08 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Matt Ranostay X-Patchwork-Id: 4943031 Return-Path: X-Original-To: patchwork-linux-input@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 6F7BA9F32F for ; Sun, 21 Sep 2014 03:01:37 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id A9DC2201BB for ; Sun, 21 Sep 2014 03:01:36 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id E5A472018E for ; Sun, 21 Sep 2014 03:01:35 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752285AbaIUDAz (ORCPT ); Sat, 20 Sep 2014 23:00:55 -0400 Received: from mail-pd0-f177.google.com ([209.85.192.177]:37074 "EHLO mail-pd0-f177.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751969AbaIUDAh (ORCPT ); Sat, 20 Sep 2014 23:00:37 -0400 Received: by mail-pd0-f177.google.com with SMTP id v10so495770pde.22 for ; Sat, 20 Sep 2014 20:00:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=owNU1P1bao7QIStrojZW0j1yZLT2OXnqVGzz0KwFF3c=; b=z2M03Eby0pkxF8y5TUVvMjvfFpK4M7Hp5oGLL1CEWbXDhxSMdG4D5qRa5lvquLUZPJ jo0+GIVT3Hnl+VJIKEf3pe00phGh7lI3OFYrWDgYC2lwZ7sqIx49gZ5gTGbkUr1RUiq2 AWmSVy+tuT/X6mNa2XP3iIcuMO6As8Cgq3HDUEFxYqF1ksJigzmVeRYz0soG0Mdyw640 HEKn53QXPc8C/m7iCZDbbrLBoeitL+CsVVzFRcJXH4AreGp1xusXqD8Mibb0zO9MDy1p yRBU7HgjhvDMc13SDhpN3NPJRVnWxfUewuAqaz3AUDeLemn8hCoILPk456oHxNqhsHDd 6gxQ== X-Received: by 10.70.43.39 with SMTP id t7mr15208269pdl.101.1411268437018; Sat, 20 Sep 2014 20:00:37 -0700 (PDT) Received: from niteshade.hsd1.or.comcast.net (c-50-186-57-65.hsd1.or.comcast.net. [50.186.57.65]) by mx.google.com with ESMTPSA id b4sm5681141pdh.21.2014.09.20.20.00.36 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Sat, 20 Sep 2014 20:00:36 -0700 (PDT) From: Matt Ranostay To: galak@codeaurora.org, linux-input@vger.kernel.org, linux-kernel@vger.kernel.org, dmitry.torokhov@gmail.com, zonque@gmail.com, robh+dt@kernel.org Cc: devicetree@vger.kernel.org, Matt Ranostay Subject: [PATCH 2/3] cap1106: support for active-high interrupt option Date: Sat, 20 Sep 2014 20:01:08 -0700 Message-Id: <1411268469-21283-3-git-send-email-mranostay@gmail.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1411268469-21283-1-git-send-email-mranostay@gmail.com> References: <1411268469-21283-1-git-send-email-mranostay@gmail.com> Sender: linux-input-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-input@vger.kernel.org X-Spam-Status: No, score=-7.4 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, T_DKIM_INVALID, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Some applications need to use the active-high push-pull interrupt option. This allows it be enabled in the device tree child node. Signed-off-by: Matt Ranostay --- drivers/input/keyboard/cap1106.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/drivers/input/keyboard/cap1106.c b/drivers/input/keyboard/cap1106.c index b9c43b5..33e2590 100644 --- a/drivers/input/keyboard/cap1106.c +++ b/drivers/input/keyboard/cap1106.c @@ -234,6 +234,12 @@ static int cap1106_i2c_probe(struct i2c_client *i2c_client, dev_err(dev, "Invalid sensor-gain value %d\n", gain32); } + if (of_property_read_bool(node, "microchip,active-high")) { + error = regmap_write(priv->regmap, CAP1106_REG_CONFIG2, 0); + if (error) + return error; + } + /* Provide some useful defaults */ for (i = 0; i < priv->num_channels; i++) priv->keycodes[i] = KEY_A + i;