From patchwork Mon Apr 3 16:05:28 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thierry Reding X-Patchwork-Id: 746551 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 3vxcQn1jwtz9s7s for ; Tue, 4 Apr 2017 02:05:53 +1000 (AEST) Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="ddCus/v6"; dkim-atps=neutral Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753970AbdDCQFu (ORCPT ); Mon, 3 Apr 2017 12:05:50 -0400 Received: from mail-wr0-f193.google.com ([209.85.128.193]:35304 "EHLO mail-wr0-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753382AbdDCQFr (ORCPT ); Mon, 3 Apr 2017 12:05:47 -0400 Received: by mail-wr0-f193.google.com with SMTP id p52so34884385wrc.2; Mon, 03 Apr 2017 09:05:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=GLxKWte9JRisI/itFi3Pj+5gzVjUOZe55IRxLqCkNmE=; b=ddCus/v6Piig1iJNzY5lxCJhjw52ZFPNujL6ci67Clb2NctHey7Yxufxy9J/TlfGf0 finO1LzbNAcRgVVqj7itdF7STnjVcvXMweYFG8LKnPHL7yjoQ624ycHjaoB1ndyxVFsp mvyXih1uyBUrP3ur0e8IY+0P6+wEPPTjDehNuAyInZsVwl+LM/Kbje3YaUieoW6lGqGD YNP+CEYxQseWtNLs88tmJbof8MEfk/ptRaUdaujW4Y7Pyr2vAnuFEajZLRvLHaSlHm/Q YRQQPYJ7b1f0D02ceECCzexLRx1aRIMGjQqAwpr6tXVklF+0hkDhKKuLRSDE9rX/FKH2 V21w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=GLxKWte9JRisI/itFi3Pj+5gzVjUOZe55IRxLqCkNmE=; b=q/M2FRG9XBUONpppCSRZoRs/rir4ANmQVbzRwti26hAhd+mg3xIf94PKkAEkDb7uTd hcL08CnDJqHoi9Y1awYcDItDyHnNnATAE9IQDKVDXFg+b6DqdJZ1Xgm0nOOsTfObXKjZ 7C3zI62jxHwCuks5vHkgI7AMwChsWr6qbncF9HlTZz180HsnrzIdRfMPz2t2Zgm5CpYM iHfl3oht5dj0EZhFwrG19ToWMFqUBz020WCfBSkNAW9TNRyb1Dum1A6UDGxBXBp9uDQy g45BElu5+EmEJvYRj9dxrowTYehlcqawMO4Yhm8G0MWIB4beAdf+e0vzj6f3txLKmN5Y YLtQ== X-Gm-Message-State: AFeK/H0xUQddSVIbHtp++CrLErMAPkoJh/kmgy06NaZGZe5R8c+sSDNT ssQSxALRDVrXWA== X-Received: by 10.28.29.138 with SMTP id d132mr10015696wmd.40.1491235545288; Mon, 03 Apr 2017 09:05:45 -0700 (PDT) Received: from localhost (port-24830.pppoe.wtnet.de. [46.59.158.181]) by smtp.gmail.com with ESMTPSA id l141sm14909809wma.32.2017.04.03.09.05.44 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 03 Apr 2017 09:05:44 -0700 (PDT) From: Thierry Reding To: Linus Walleij Cc: Alexandre Courbot , linux-gpio@vger.kernel.org, linux-tegra@vger.kernel.org Subject: [PATCH 08/12] gpio: Move irq_chained_parent to struct gpio_irq_chip Date: Mon, 3 Apr 2017 18:05:28 +0200 Message-Id: <20170403160532.20282-9-thierry.reding@gmail.com> X-Mailer: git-send-email 2.12.0 In-Reply-To: <20170403160532.20282-1-thierry.reding@gmail.com> References: <20170403160532.20282-1-thierry.reding@gmail.com> Sender: linux-tegra-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-tegra@vger.kernel.org From: Thierry Reding In order to consolidate the multiple ways to associate an IRQ chip with a GPIO chip, move more fields into the new struct gpio_irq_chip. Signed-off-by: Thierry Reding --- drivers/gpio/gpiolib.c | 8 ++------ include/linux/gpio/driver.h | 4 ---- 2 files changed, 2 insertions(+), 10 deletions(-) diff --git a/drivers/gpio/gpiolib.c b/drivers/gpio/gpiolib.c index f951eeb3c243..ff327512703a 100644 --- a/drivers/gpio/gpiolib.c +++ b/drivers/gpio/gpiolib.c @@ -1545,7 +1545,8 @@ static void gpiochip_set_cascaded_irqchip(struct gpio_chip *gpiochip, irq_set_chained_handler_and_data(parent_irq, parent_handler, gpiochip); - gpiochip->irq_chained_parent = parent_irq; + gpiochip->irq.parents = &parent_irq; + gpiochip->irq.num_parents = 1; } /* Set the parent IRQ for all affected IRQs */ @@ -1815,11 +1816,6 @@ static void gpiochip_irqchip_remove(struct gpio_chip *gpiochip) acpi_gpiochip_free_interrupts(gpiochip); - if (gpiochip->irq_chained_parent) { - irq_set_chained_handler(gpiochip->irq_chained_parent, NULL); - irq_set_handler_data(gpiochip->irq_chained_parent, NULL); - } - if (gpiochip->irq.chip) { struct gpio_irq_chip *irq = &gpiochip->irq; unsigned int i; diff --git a/include/linux/gpio/driver.h b/include/linux/gpio/driver.h index e0b08e208b23..631c66d6df58 100644 --- a/include/linux/gpio/driver.h +++ b/include/linux/gpio/driver.h @@ -129,9 +129,6 @@ struct gpio_irq_chip { * for GPIO IRQs, provided by GPIO driver * @irq_default_type: default IRQ triggering type applied during GPIO driver * initialization, provided by GPIO driver - * @irq_chained_parent: GPIO IRQ chip parent/bank linux irq number, - * provided by GPIO driver for chained interrupt (not for nested - * interrupts). * * A gpio_chip can help platforms abstract various sources of GPIOs so * they can all be accessed through a common programing interface. @@ -201,7 +198,6 @@ struct gpio_chip { unsigned int irq_base; irq_flow_handler_t irq_handler; unsigned int irq_default_type; - unsigned int irq_chained_parent; struct gpio_irq_chip irq; #endif