From patchwork Wed Apr 9 11:48:59 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Linus Walleij X-Patchwork-Id: 28082 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-pd0-f199.google.com (mail-pd0-f199.google.com [209.85.192.199]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id B94B5202DD for ; Wed, 9 Apr 2014 11:49:09 +0000 (UTC) Received: by mail-pd0-f199.google.com with SMTP id x10sf6663750pdj.6 for ; Wed, 09 Apr 2014 04:49:08 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:delivered-to:from:to:cc:subject :date:message-id:sender:precedence:list-id:x-original-sender :x-original-authentication-results:mailing-list:list-post:list-help :list-archive:list-unsubscribe; bh=YsJPZ+zHyZUvK1pHPMd5rP5M0YuKLXzZyg9XIaFB3pc=; b=l0r4xvcLUMSQAFXjlvP8vevl4z3N69oqrHGfJWx1uwsNvquwvbBjkr89wAqzEDvvqg s5Qqqxk9zFjcaA2hihaiGNY4zwlEp01wTx+RGA7OTv0WKSvldsmffrdhNFZMruPJ1zty 0UQbKy1EtR552ojHgE5bIyuFXiJEy9lRc/bwlDYMkvt9BFrcXsVEmcVEcaqoHuiHZ0A9 AAIccCC/EaQCRgXOkjISBsicbjYSx/1mkm4h1BIxuScKd3fXgzclfcUrJwT0onlKYccc G40OWk2Akfn8XZMAGSV9hCphmtgSIrupRPxLO0lWe/YyN8rHZ8wQkNgViPsf2Fw05cvB 8Bjg== X-Gm-Message-State: ALoCoQku7f3c4e1Qdx6fcIfQ1RS+iNn0e72ffJCPSrmP0oSkcx1Znnlv0Qs9FyKWgO5sX9f5SRWm X-Received: by 10.66.140.8 with SMTP id rc8mr4271668pab.41.1397044148904; Wed, 09 Apr 2014 04:49:08 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.22.167 with SMTP id 36ls587639qgn.55.gmail; Wed, 09 Apr 2014 04:49:08 -0700 (PDT) X-Received: by 10.221.30.14 with SMTP id sa14mr90360vcb.44.1397044148642; Wed, 09 Apr 2014 04:49:08 -0700 (PDT) Received: from mail-vc0-f176.google.com (mail-vc0-f176.google.com [209.85.220.176]) by mx.google.com with ESMTPS id rw10si98757vec.26.2014.04.09.04.49.08 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 09 Apr 2014 04:49:08 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.220.176 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) client-ip=209.85.220.176; Received: by mail-vc0-f176.google.com with SMTP id lc6so1901106vcb.21 for ; Wed, 09 Apr 2014 04:49:08 -0700 (PDT) X-Received: by 10.52.51.226 with SMTP id n2mr67925vdo.57.1397044148543; Wed, 09 Apr 2014 04:49:08 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.220.12.8 with SMTP id v8csp322885vcv; Wed, 9 Apr 2014 04:49:08 -0700 (PDT) X-Received: by 10.68.200.133 with SMTP id js5mr11586568pbc.138.1397044147737; Wed, 09 Apr 2014 04:49:07 -0700 (PDT) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id bs8si380087pad.53.2014.04.09.04.49.07; Wed, 09 Apr 2014 04:49:07 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-gpio-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932592AbaDILtG (ORCPT + 1 other); Wed, 9 Apr 2014 07:49:06 -0400 Received: from mail-we0-f170.google.com ([74.125.82.170]:43981 "EHLO mail-we0-f170.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932482AbaDILtF (ORCPT ); Wed, 9 Apr 2014 07:49:05 -0400 Received: by mail-we0-f170.google.com with SMTP id w61so2364004wes.15 for ; Wed, 09 Apr 2014 04:49:03 -0700 (PDT) X-Received: by 10.194.133.1 with SMTP id oy1mr484632wjb.87.1397044143780; Wed, 09 Apr 2014 04:49:03 -0700 (PDT) Received: from localhost.localdomain ([85.235.11.236]) by mx.google.com with ESMTPSA id l12sm1305012wjr.35.2014.04.09.04.49.02 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 09 Apr 2014 04:49:02 -0700 (PDT) From: Linus Walleij To: linux-gpio@vger.kernel.org Cc: Alexandre Courbot , Linus Walleij , Samuel Ortiz , Lee Jones Subject: [PATCH 3/4] gpio: tc3589x: get rid of static IRQ base Date: Wed, 9 Apr 2014 13:48:59 +0200 Message-Id: <1397044139-19306-1-git-send-email-linus.walleij@linaro.org> X-Mailer: git-send-email 1.9.0 Sender: linux-gpio-owner@vger.kernel.org Precedence: list List-ID: X-Mailing-List: linux-gpio@vger.kernel.org X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: linus.walleij@linaro.org X-Original-Authentication-Results: mx.google.com; spf=neutral (google.com: 209.85.220.176 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , The static IRQ base is not used on any platforms with this chip (only Ux500). Get rid of it forever, and rely on dynamic IRQ descriptor allocation. Cc: Samuel Ortiz Cc: Lee Jones Signed-off-by: Linus Walleij --- drivers/gpio/gpio-tc3589x.c | 10 +--------- include/linux/mfd/tc3589x.h | 1 - 2 files changed, 1 insertion(+), 10 deletions(-) diff --git a/drivers/gpio/gpio-tc3589x.c b/drivers/gpio/gpio-tc3589x.c index 113e50cb1f59..4b0d8ccbe561 100644 --- a/drivers/gpio/gpio-tc3589x.c +++ b/drivers/gpio/gpio-tc3589x.c @@ -32,9 +32,6 @@ struct tc3589x_gpio { struct device *dev; struct mutex irq_lock; struct irq_domain *domain; - - int irq_base; - /* Caches of interrupt control registers for bus_lock */ u8 regs[CACHE_NR_REGS][CACHE_NR_BANKS]; u8 oldregs[CACHE_NR_REGS][CACHE_NR_BANKS]; @@ -290,8 +287,6 @@ static struct irq_domain_ops tc3589x_irq_ops = { static int tc3589x_gpio_irq_init(struct tc3589x_gpio *tc3589x_gpio, struct device_node *np) { - int base = tc3589x_gpio->irq_base; - /* * If this results in a linear domain, irq_create_mapping() will * take care of allocating IRQ descriptors at runtime. When a base @@ -299,7 +294,7 @@ static int tc3589x_gpio_irq_init(struct tc3589x_gpio *tc3589x_gpio, * domain is instantiated. */ tc3589x_gpio->domain = irq_domain_add_simple(np, - tc3589x_gpio->chip.ngpio, base, &tc3589x_irq_ops, + tc3589x_gpio->chip.ngpio, 0, &tc3589x_irq_ops, tc3589x_gpio); if (!tc3589x_gpio->domain) { dev_err(tc3589x_gpio->dev, "Failed to create irqdomain\n"); @@ -348,9 +343,6 @@ static int tc3589x_gpio_probe(struct platform_device *pdev) tc3589x_gpio->chip.of_node = np; #endif - tc3589x_gpio->irq_base = tc3589x->irq_base ? - tc3589x->irq_base + TC3589x_INT_GPIO(0) : 0; - /* Bring the GPIO module out of reset */ ret = tc3589x_set_bits(tc3589x, TC3589x_RSTCTRL, TC3589x_RSTCTRL_GPIRST, 0); diff --git a/include/linux/mfd/tc3589x.h b/include/linux/mfd/tc3589x.h index 6b8e1ff4672b..e6088c2e2092 100644 --- a/include/linux/mfd/tc3589x.h +++ b/include/linux/mfd/tc3589x.h @@ -111,7 +111,6 @@ enum tx3589x_block { #define TC3589x_INT_PORIRQ 7 #define TC3589x_NR_INTERNAL_IRQS 8 -#define TC3589x_INT_GPIO(x) (TC3589x_NR_INTERNAL_IRQS + (x)) struct tc3589x { struct mutex lock;