From patchwork Fri May 22 14:35:53 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Grygorii.Strashko@linaro.org" X-Patchwork-Id: 48892 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-lb0-f197.google.com (mail-lb0-f197.google.com [209.85.217.197]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 0AC5C21411 for ; Fri, 22 May 2015 14:37:01 +0000 (UTC) Received: by lbbuh7 with SMTP id uh7sf5591105lbb.3 for ; Fri, 22 May 2015 07:36:59 -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:in-reply-to:references:sender:precedence:list-id :x-original-sender:x-original-authentication-results:mailing-list :list-post:list-help:list-archive:list-unsubscribe; bh=LMfHJ2GUzvinFmFeoHta4JJ95Tg5lnT1y3/E0yIvei4=; b=hAZcwyDfIUriEIFJw+nWBIvoVBHJsthKLptbps8Om/uPjCDU3XE+5XsAyrWnEmuNiD Y5ZPStdICx2osdALkV8N5luUzLhMg3yulnC1YAyUeIZjPE4/fBCym25UpUwY9KGIpyEQ jR5ANR174Wo8wXtp7C5hrDwOHe+5uXaPLJGi62p/Vo45W4t+47c++SRMvfRvTM8QjnAW n7FOKG2232gdA5tr5wUq8lvBja1eSuSgN6TOs2eCzeLQ96qlHJ7WbjfLo8w+2gjiomHk 1Fcuj4QSt3j4sC1ZHdWC9B6236WxBHC6ybS2UVpqNus2LL/32/AFu0CVCIU1k2tTwpTW y6ew== X-Gm-Message-State: ALoCoQlYwP1EB0HNXfPIa24sQHi5F1HyBhB4RIQzWXoSJi1f8BRZdNb3kVaxBTyKrHPeLq6i7bWv X-Received: by 10.152.37.101 with SMTP id x5mr8075576laj.5.1432305419966; Fri, 22 May 2015 07:36:59 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.22.99 with SMTP id c3ls482208laf.96.gmail; Fri, 22 May 2015 07:36:59 -0700 (PDT) X-Received: by 10.112.150.100 with SMTP id uh4mr2463043lbb.112.1432305419820; Fri, 22 May 2015 07:36:59 -0700 (PDT) Received: from mail-lb0-f178.google.com (mail-lb0-f178.google.com. [209.85.217.178]) by mx.google.com with ESMTPS id p10si1523680lap.75.2015.05.22.07.36.59 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 22 May 2015 07:36:59 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.217.178 as permitted sender) client-ip=209.85.217.178; Received: by lbcmx3 with SMTP id mx3so14339412lbc.1 for ; Fri, 22 May 2015 07:36:59 -0700 (PDT) X-Received: by 10.112.199.133 with SMTP id jk5mr6872705lbc.32.1432305419692; Fri, 22 May 2015 07:36:59 -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.112.108.230 with SMTP id hn6csp1454053lbb; Fri, 22 May 2015 07:36:58 -0700 (PDT) X-Received: by 10.66.242.79 with SMTP id wo15mr16475862pac.6.1432305407508; Fri, 22 May 2015 07:36:47 -0700 (PDT) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id ci13si3665255pac.227.2015.05.22.07.36.46; Fri, 22 May 2015 07:36:47 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-omap-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 S1757258AbbEVOgS (ORCPT + 5 others); Fri, 22 May 2015 10:36:18 -0400 Received: from mail-lb0-f175.google.com ([209.85.217.175]:35567 "EHLO mail-lb0-f175.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1757257AbbEVOgO (ORCPT ); Fri, 22 May 2015 10:36:14 -0400 Received: by lbbuc2 with SMTP id uc2so14320532lbb.2 for ; Fri, 22 May 2015 07:36:12 -0700 (PDT) X-Received: by 10.152.197.2 with SMTP id iq2mr6726030lac.103.1432305372466; Fri, 22 May 2015 07:36:12 -0700 (PDT) Received: from localhost ([195.238.92.128]) by mx.google.com with ESMTPSA id k15sm528995laa.28.2015.05.22.07.36.11 (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Fri, 22 May 2015 07:36:11 -0700 (PDT) From: Grygorii Strashko To: Linus Walleij , Alexandre Courbot , tony@atomide.com Cc: Javier Martinez Canillas , ssantosh@kernel.org, Kevin Hilman , linux-omap@vger.kernel.org, linux-gpio@vger.kernel.org, Grygorii Strashko Subject: [RFC/RFT PATCH 6/7] gpio: omap: clean up omap_gpio_irq_type Date: Fri, 22 May 2015 17:35:53 +0300 Message-Id: <1432305354-5968-7-git-send-email-grygorii.strashko@linaro.org> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1432305354-5968-1-git-send-email-grygorii.strashko@linaro.org> References: <1432305354-5968-1-git-send-email-grygorii.strashko@linaro.org> Sender: linux-omap-owner@vger.kernel.org Precedence: list List-ID: X-Mailing-List: linux-omap@vger.kernel.org X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: grygorii.strashko@linaro.org X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.217.178 as permitted sender) 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 omap_gpio_irq_type() can do only configuration of GPIO IRQ triggering type, because now OMAP GPIO driver has implemented .irq_startup()/.irq_shutdown() which are responsible for GPIO bank enabling and pin direction configuration. Hence, remove redundant code and omap_gpio_init_irq() which is not used any more. Signed-off-by: Grygorii Strashko --- drivers/gpio/gpio-omap.c | 15 --------------- 1 file changed, 15 deletions(-) diff --git a/drivers/gpio/gpio-omap.c b/drivers/gpio/gpio-omap.c index 1c226f1..f02b3fa 100644 --- a/drivers/gpio/gpio-omap.c +++ b/drivers/gpio/gpio-omap.c @@ -472,15 +472,6 @@ static int omap_gpio_is_input(struct gpio_bank *bank, unsigned offset) return readl_relaxed(reg) & BIT(offset); } -static void omap_gpio_init_irq(struct gpio_bank *bank, unsigned offset) -{ - if (!LINE_USED(bank->mod_usage, offset)) { - omap_enable_gpio_module(bank, offset); - omap_set_gpio_direction(bank, offset, 1); - } - bank->irq_usage |= BIT(offset); -} - static int omap_gpio_irq_type(struct irq_data *d, unsigned type) { struct gpio_bank *bank = omap_irq_data_get_bank(d); @@ -502,12 +493,6 @@ static int omap_gpio_irq_type(struct irq_data *d, unsigned type) retval = omap_set_gpio_triggering(bank, offset, type); if (retval) goto error; - omap_gpio_init_irq(bank, offset); - if (!omap_gpio_is_input(bank, offset)) { - spin_unlock_irqrestore(&bank->lock, flags); - retval = -EINVAL; - goto error; - } spin_unlock_irqrestore(&bank->lock, flags); if (type & (IRQ_TYPE_LEVEL_LOW | IRQ_TYPE_LEVEL_HIGH))