From patchwork Tue Nov 9 02:15:10 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: jooaun X-Patchwork-Id: 310002 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter1.kernel.org (8.14.4/8.14.3) with ESMTP id oA92G8VH031966 for ; Tue, 9 Nov 2010 02:16:10 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752420Ab0KICQE (ORCPT ); Mon, 8 Nov 2010 21:16:04 -0500 Received: from mail-gy0-f174.google.com ([209.85.160.174]:49374 "EHLO mail-gy0-f174.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752055Ab0KICQE (ORCPT ); Mon, 8 Nov 2010 21:16:04 -0500 Received: by mail-gy0-f174.google.com with SMTP id 4so3965040gyh.19 for ; Mon, 08 Nov 2010 18:16:03 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:from:to:cc:subject:date :message-id:x-mailer:in-reply-to:references; bh=2+r+AnNtoE1OUkpX/oK8o8JAd748ifkIua17IU5KDFY=; b=aTQ5E7YbFhBcei4Ld0E+tTEuoLoGRxwdAywRVgkQgjajh/vYv6mZju+jm8rzzRyraD YGlhBqFUrZsbM1qT3l/i9Eo1enSdI45/C7/1VnnjNK2KJPxxt5OhVcYigGkDoMJmhQsy b2j0nkcHnpxf4Ef/gHaLTN7nXyYmElh2tELoU= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=from:to:cc:subject:date:message-id:x-mailer:in-reply-to:references; b=EG4vXFbuiftl1iW/agep8nlNBWOOWxe0GwpC1COuiPMCd6ojYD5srczoI4rY/sM0ym CcItkGtihgBAgkHk3QZqiSHYUOpKa4AVu1tmvgM+jTavsbfpZdYTHrfSm1xtXpQjMjR5 S72ej+6W1Z/HDU5knd1IM06qleyIDOXhwIpbw= Received: by 10.150.52.7 with SMTP id z7mr9719856ybz.352.1289268963321; Mon, 08 Nov 2010 18:16:03 -0800 (PST) Received: from localhost.localdomain (203-206-227-95.perm.iinet.net.au [203.206.227.95]) by mx.google.com with ESMTPS id j27sm449455yha.30.2010.11.08.18.16.00 (version=TLSv1/SSLv3 cipher=RC4-MD5); Mon, 08 Nov 2010 18:16:02 -0800 (PST) From: jooaun To: dmitry.torokhov@gmail.com Cc: linux-input@vger.kernel.org, raphaelpereira@gmail.com, jooaun Subject: [PATCH 7/8] qt2160: optional interrupt flag Date: Tue, 9 Nov 2010 13:15:10 +1100 Message-Id: <1289268911-32322-7-git-send-email-jasaw81@gmail.com> X-Mailer: git-send-email 1.7.0.4 In-Reply-To: <1289268911-32322-1-git-send-email-jasaw81@gmail.com> References: <1289268911-32322-1-git-send-email-jasaw81@gmail.com> Sender: linux-input-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-input@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.3 (demeter1.kernel.org [140.211.167.41]); Tue, 09 Nov 2010 02:16:10 +0000 (UTC) diff --git a/drivers/input/keyboard/qt2160.c b/drivers/input/keyboard/qt2160.c index 8316fde..d2ce573 100755 --- a/drivers/input/keyboard/qt2160.c +++ b/drivers/input/keyboard/qt2160.c @@ -487,8 +487,15 @@ static int __devinit qt2160_probe(struct i2c_client *client, } if (client->irq) { - error = request_irq(client->irq, qt2160_irq, - IRQF_TRIGGER_FALLING, "qt2160", qt2160); + if (hw_info->irq_flags) { + error = request_irq(client->irq, qt2160_irq, + hw_info->irq_flags, "qt2160", + qt2160); + } else { + error = request_irq(client->irq, qt2160_irq, + IRQF_TRIGGER_FALLING, "qt2160", + qt2160); + } if (error) { dev_err(&client->dev, "failed to allocate irq %d\n", client->irq); diff --git a/include/linux/input/qt2160.h b/include/linux/input/qt2160.h index 4eb7e18..dad11bb 100755 --- a/include/linux/input/qt2160.h +++ b/include/linux/input/qt2160.h @@ -21,6 +21,7 @@ * @key_burst_length: key sensitivity; 0 use default * @low_power_mode: value 0 use default; each +1 increment causes the chip to * sleep 16ms longer before detecting a touch (slower response); max 255 + * @irq_flags: value 0 use default IRQF_TRIGGER_FALLING */ struct qt2160_info { void *data; @@ -31,6 +32,7 @@ struct qt2160_info { unsigned char key_aks[QT2160_MAXKEYS]; unsigned char key_burst_length[QT2160_MAXKEYS]; unsigned char low_power_mode; + unsigned long irq_flags; }; #endif /* __QT2160_H__ */