From patchwork Thu Jun 18 17:10:49 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vitaly Andrianov X-Patchwork-Id: 486445 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 1664214027F for ; Fri, 19 Jun 2015 03:06:51 +1000 (AEST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753126AbbFRRGm (ORCPT ); Thu, 18 Jun 2015 13:06:42 -0400 Received: from comal.ext.ti.com ([198.47.26.152]:46148 "EHLO comal.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755974AbbFRRGj (ORCPT ); Thu, 18 Jun 2015 13:06:39 -0400 Received: from dlelxv90.itg.ti.com ([172.17.2.17]) by comal.ext.ti.com (8.13.7/8.13.7) with ESMTP id t5IH6bjF000709; Thu, 18 Jun 2015 12:06:37 -0500 Received: from DLEE70.ent.ti.com (dlee70.ent.ti.com [157.170.170.113]) by dlelxv90.itg.ti.com (8.14.3/8.13.8) with ESMTP id t5IH6bm7010586; Thu, 18 Jun 2015 12:06:37 -0500 Received: from dlep33.itg.ti.com (157.170.170.75) by DLEE70.ent.ti.com (157.170.170.113) with Microsoft SMTP Server id 14.3.224.2; Thu, 18 Jun 2015 12:06:37 -0500 Received: from uda0794637.am.dhcp.ti.com (ileax41-snat.itg.ti.com [10.172.224.153]) by dlep33.itg.ti.com (8.14.3/8.13.8) with ESMTP id t5IH6aTW021979; Thu, 18 Jun 2015 12:06:37 -0500 From: Vitaly Andrianov To: , , , CC: Vitaly Andrianov , Reece Pollack Subject: [PATCH] gpio/davinci: add interrupt support for GPIOs 16-31 Date: Thu, 18 Jun 2015 13:10:49 -0400 Message-ID: <1434647449-5393-1-git-send-email-vitalya@ti.com> X-Mailer: git-send-email 1.9.1 MIME-Version: 1.0 Sender: linux-gpio-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-gpio@vger.kernel.org Interrupts for GPIOs 16 through 31 are enabled by bit 1 in the "binten" register (offset 8). Previous versions of GPIO only used bit 0, which enables GPIO 0-15 interrupts. Signed-off-by: Reece Pollack Signed-off-by: Vitaly Andrianov --- drivers/gpio/gpio-davinci.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/gpio/gpio-davinci.c b/drivers/gpio/gpio-davinci.c index c5e05c8..c90629f 100644 --- a/drivers/gpio/gpio-davinci.c +++ b/drivers/gpio/gpio-davinci.c @@ -546,6 +546,8 @@ static int davinci_gpio_irq_setup(struct platform_device *pdev) chips[0].gpio_irq = bank_irq; chips[0].gpio_unbanked = pdata->gpio_unbanked; binten = BIT(0); + if (pdata->gpio_unbanked > 16) + binten |= BIT(1); /* AINTC handles mask/unmask; GPIO handles triggering */ irq = bank_irq;