From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-9.7 required=3.0 tests=DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED,DKIM_VALID,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 41703C43331 for ; Fri, 6 Sep 2019 06:26:59 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 297A02082C for ; Fri, 6 Sep 2019 06:26:59 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="gIpIoTOC"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="aUMqxfSd" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 297A02082C Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-Id:Date:Subject:To :From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=MajYOMuAz2kY2sbWdUNS+XyBrWzBO6B2exH0XpwwjaA=; b=gIpIoTOCSGyy5k MCz/McQ8r8yDucbuV8pIWOvEbJl9FzZd8rkNJA0mSsgiG5xeZzRZzE/3UgFObzGZjseUP1i3dXtzh WgCDs2JKIGSrqq4hlpKYe9KQbBMx/lPUYu9+NmxHx7pRPZ5TflgL4/wbyt0jj026hM/hyX1Hq33so 2o2kz4uS1gj35dVE8b/EvOQukv6YpRbxkzYnf5wTwrJI0DcwONhBh6lwmwC10RawT0bWm0xD8G97M YMic6RCS+3Us5O5ERhMnm9YlZZdO8QXVakr+c6fp0j/IvvqQiQx67vyPOxqTv5EOHoQ3RHCd1ewYo hixpoWFkVuXZ5g0Dio8g==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92 #3 (Red Hat Linux)) id 1i67hx-0005xP-OO; Fri, 06 Sep 2019 06:26:57 +0000 Received: from mail-pf1-x443.google.com ([2607:f8b0:4864:20::443]) by bombadil.infradead.org with esmtps (Exim 4.92 #3 (Red Hat Linux)) id 1i67hu-0005wu-Mi for linux-arm-kernel@lists.infradead.org; Fri, 06 Sep 2019 06:26:55 +0000 Received: by mail-pf1-x443.google.com with SMTP id y72so3638273pfb.12 for ; Thu, 05 Sep 2019 23:26:54 -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:mime-version :content-transfer-encoding; bh=nBz/Nw09bo2+Nxy27B6Bnst72+LgNmbIsMhxAo7ybD0=; b=aUMqxfSdSnkuwGPqLRjheiUFzikOfV2fc0xU5mynUICbJ06VKhxLcszMC7XIGhR+9a LCox84h/CIDLKI1gSOXrLAHb3iR6w4VFUPCGACcdJ6Ma0OQwvRE2K/M2jl30aGnGEUHh qtdsJvleLml70aYLbf52MZduXl+OBtmnBO7lfJ5+23BRakN9poArHpHZ7Vp3xIAEP4Ip IKpv9txRDkokW+UwGti5JJzeptzCSA4SXd8fNu4C6HaAUyOdEMbrrwRHBDnX2D1FweAj 5DG0jbewwAw/rv0ZkvJaoVxtqR6FcgG8OKwBRl3aqO1YWYoIVxWHLYc9xe36ZLlCKuq8 nnWQ== 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:mime-version :content-transfer-encoding; bh=nBz/Nw09bo2+Nxy27B6Bnst72+LgNmbIsMhxAo7ybD0=; b=GAcNIfCKQYDDgw97GCUT/KrqWVCBMfzqLRBqB+4v1YgN9EeN2QZVcSkMlNfI/Xyxm7 AKUfGhB5T9nfrxHnaKM/GjEX+pXy5+O4JiflmGquGQPQ/AWuKvjaH2f+KfZSpONTtQRt Fux9/SXQju5U4P3F273FqGkOspG7jHwOwJ/clUMkISN9oBSRQCW5CBWBmCeavG/OKb6g QgBRvIbaoVNsQfwOjlPbPCZFHHIteBHU2p1yGq9RBd7tx651jQSX3KITnJYhVLCbmAK8 4Qv0MX4lJ4UYKtFLmBrFfikr3WbqtNIMxtCSRsq0GoENGbaOPQGz4/2M2HFPQdUjPZaU ueNw== X-Gm-Message-State: APjAAAXd2TssIyOTCDBCmnaZyE22cnda0CLSCs5u1LU2s3RNQfySWtTY +2Xpa7Z5IXTZSShP2/hXnlw= X-Google-Smtp-Source: APXvYqxBZZ2BelsDovsxHdtpDaLyiv2LFGl8lKiDGpiVUZV8DHdc7jIWEf8BdGHl1IAd2NAHni+KZA== X-Received: by 2002:a63:6904:: with SMTP id e4mr6538279pgc.321.1567751214158; Thu, 05 Sep 2019 23:26:54 -0700 (PDT) Received: from rashmica.ozlabs.ibm.com ([122.99.82.10]) by smtp.gmail.com with ESMTPSA id a20sm3109704pfo.33.2019.09.05.23.26.50 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 05 Sep 2019 23:26:53 -0700 (PDT) From: Rashmica Gupta To: linus.walleij@linaro.org Subject: [PATCH v3 3/5] gpio/aspeed: Setup irqchip dynamically Date: Fri, 6 Sep 2019 16:26:44 +1000 Message-Id: <20190906062644.13445-1-rashmica.g@gmail.com> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190905_232654_739006_82D25A46 X-CRM114-Status: GOOD ( 10.85 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: "moderated list:ARM/ASPEED MACHINE SUPPORT" , "open list:GPIO SUBSYSTEM" , Andrew Jeffery , open list , Bartosz Golaszewski , Joel Stanley , Rashmica Gupta , "moderated list:ARM/ASPEED MACHINE SUPPORT" Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org This is in preparation for adding ast2600 support. The ast2600 SoC requires two instances of the GPIO driver as it has two GPIO controllers. Each instance needs it's own irqchip. Signed-off-by: Rashmica Gupta --- drivers/gpio/gpio-aspeed.c | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/drivers/gpio/gpio-aspeed.c b/drivers/gpio/gpio-aspeed.c index b83e23aecd18..16c6eaf70857 100644 --- a/drivers/gpio/gpio-aspeed.c +++ b/drivers/gpio/gpio-aspeed.c @@ -52,6 +52,7 @@ struct aspeed_gpio_config { */ struct aspeed_gpio { struct gpio_chip chip; + struct irq_chip irqc; spinlock_t lock; void __iomem *base; int irq; @@ -681,14 +682,6 @@ static void aspeed_gpio_irq_handler(struct irq_desc *desc) chained_irq_exit(ic, desc); } -static struct irq_chip aspeed_gpio_irqchip = { - .name = "aspeed-gpio", - .irq_ack = aspeed_gpio_irq_ack, - .irq_mask = aspeed_gpio_irq_mask, - .irq_unmask = aspeed_gpio_irq_unmask, - .irq_set_type = aspeed_gpio_set_type, -}; - static void set_irq_valid_mask(struct aspeed_gpio *gpio) { const struct aspeed_bank_props *props = gpio->config->props; @@ -1192,7 +1185,12 @@ static int __init aspeed_gpio_probe(struct platform_device *pdev) gpio->irq = rc; girq = &gpio->chip.irq; - girq->chip = &aspeed_gpio_irqchip; + girq->chip = &gpio->irqc; + girq->chip->name = dev_name(&pdev->dev); + girq->chip->irq_ack = aspeed_gpio_irq_ack; + girq->chip->irq_mask = aspeed_gpio_irq_mask; + girq->chip->irq_unmask = aspeed_gpio_irq_unmask; + girq->chip->irq_set_type = aspeed_gpio_set_type; girq->parent_handler = aspeed_gpio_irq_handler; girq->num_parents = 1; girq->parents = devm_kcalloc(&pdev->dev, 1, -- 2.20.1 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel