From patchwork Tue Nov 9 02:46:48 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: jooaun X-Patchwork-Id: 310062 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 oA92l8Wg003496 for ; Tue, 9 Nov 2010 02:47:09 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754907Ab0KICrI (ORCPT ); Mon, 8 Nov 2010 21:47:08 -0500 Received: from mail-gx0-f174.google.com ([209.85.161.174]:46943 "EHLO mail-gx0-f174.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754895Ab0KICrH (ORCPT ); Mon, 8 Nov 2010 21:47:07 -0500 Received: by gxk23 with SMTP id 23so3945759gxk.19 for ; Mon, 08 Nov 2010 18:47:07 -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=Mu2KoFPAGuddrnp13tgcp6LAxAZuDdlegJYvrwF50fc=; b=a67bB1nZsbo9SNBUyJszFd30zs/NCV8j84qOnsyhLFwl0zqC2VfuZB6zoDXSMayLn9 i8QMb+ECp0ggi6Rf9znIRV3pb7C8vsIi8MQB5QMxSy5lHAJnN2Zz/pX2GbYEE3/RmsJy X0015gMHwxfez43ns0OHmrMe8tRMMzJml+WNU= 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=bYnLewNIurNo3+8st2vgVzI4e/9NY8LhRgJJ6DgPHzJ1DPCgQ4r+ekyYGsqjUAEMDo ChEweB0RoiA2BDM+ZZ/Bi7wKmcUIidaW/M5OspI3UkKtxQh23tR43lHbwMNLM9Y7L4+m 5Z5y/tdn4NRULs9zPDAw3kx/pDjjnkKguSITk= Received: by 10.150.200.3 with SMTP id x3mr5089974ybf.287.1289270826912; Mon, 08 Nov 2010 18:47:06 -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 m12sm473756ybn.0.2010.11.08.18.47.04 (version=TLSv1/SSLv3 cipher=RC4-MD5); Mon, 08 Nov 2010 18:47:06 -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:46:48 +1100 Message-Id: <1289270808-4334-1-git-send-email-jasaw81@gmail.com> X-Mailer: git-send-email 1.7.0.4 In-Reply-To: <1289268911-32322-7-git-send-email-jasaw81@gmail.com> References: <1289268911-32322-7-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:47:09 +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__ */