Received: by 2002:a25:c593:0:0:0:0:0 with SMTP id v141csp2199887ybe; Sat, 7 Sep 2019 10:44:30 -0700 (PDT) X-Google-Smtp-Source: APXvYqwi90tPmfwvAf49wQEvlhLlvCP8AeG428KD0F0qmVWWTsOnObhrQi6i7NbRxvvQV5U2DJKJ X-Received: by 2002:aa7:9190:: with SMTP id x16mr18293881pfa.132.1567878270325; Sat, 07 Sep 2019 10:44:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1567878270; cv=none; d=google.com; s=arc-20160816; b=0BBo1Do7zL7IVKJeE2uDD/Vg5pMTWpJDOzFAvubqp5ytay8fmjye4+Mb+0a0JiUnmx QFzYPWJCcM8G4PB3AGg5wjNFtwQKQBJoOutrVn9Nz5ol0VJlUqzMjLFD5zuE3waknLg4 PXIrxlOvbr6wKklyRlTKBWu/GUCkg99fQbj0RawXN/Werzktuczz8UkguY0Vn84OcXTt DgXHYIijc1hJaN86QU57en+esICXjBx/0hlMQGHDznPERS4YCM/eYxn1+2SqoQqa/JSO 1KjsWec2QYVsofPjt+dvOl0ePjg9FlgiFxUcfi/HIGAJdcHj9Wq0CgK1xu6hLGI8cFfa gA6g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=GlriHQcPoNAAyA0m3FTNkIoAvIrt6CyS5DffxYEz37k=; b=mQcUMeVj130iFHRPpg7ahS8TFwA33DKrGvy/94DBmMHWTWDzWO8AupiMNj8weyfvJc 7cc+PrqzvBEMMv+q8pkC1r55/YNP+5M4YbQSbEaSN8bb3UHO+SXqvn5usSBiBsPgoobj mVClnEpB43jSwjmpMuh5GF5cn6zPk9WwrXew1lniqXAaq9EYAflAuNn+V/Ujm29B5Rb5 5ygj1T87kpkLFp05RaC2QcPlDifYyJHpDKiTAcm1HFQsATINivxvzAjwpr38PN9YDEPy DRpjmFmx8fXybjaNF+o3b/qbqHDRwnk4ui1E126GB1SEzPTE4atqo6z2NfJCm0YE7iYx 5uuA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@jms.id.au header.s=google header.b=JV3Gxop+; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id p13si8544969pll.12.2019.09.07.10.44.14; Sat, 07 Sep 2019 10:44:30 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@jms.id.au header.s=google header.b=JV3Gxop+; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2393464AbfIFTrI (ORCPT + 99 others); Fri, 6 Sep 2019 15:47:08 -0400 Received: from mail-qk1-f196.google.com ([209.85.222.196]:34550 "EHLO mail-qk1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2393209AbfIFTrH (ORCPT ); Fri, 6 Sep 2019 15:47:07 -0400 Received: by mail-qk1-f196.google.com with SMTP id q203so6865896qke.1; Fri, 06 Sep 2019 12:47:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=jms.id.au; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=GlriHQcPoNAAyA0m3FTNkIoAvIrt6CyS5DffxYEz37k=; b=JV3Gxop+nVe6QmZ91Cy718WYBKBAy8NjiGK4vtv+HjEfMdhIIBjEhWnBJdsRgYlyWr 6Q0JSuJelzRFEQ/cvRNurMHnh4RnezG6ayGXFbCJDsZWwhDYiN8Rj8VgPLvDUmKAjXst DOD3sL8OIY+m5zWDXSDXsKLu+c86L3M9Esd0o= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=GlriHQcPoNAAyA0m3FTNkIoAvIrt6CyS5DffxYEz37k=; b=dUIApfnisSnuFWBF2+J5yVWA9BfH3ahumqfkCGfw3z5rDb7QYKR6EUoWI0TTpBc7bN 3I2lIEziv8gVVIkWtTKj58dGPDolrSuRyKm7o8B3gH9pZ/eiNp6qYFryzs/yOZH4MF/n 5kzL4741fanTaxAuV2UPSdwpJJqDR4/gXRNDJWJB52gQgUu1Gih8RJeJdK6lLX5YGQfq XxPIb4XHqnRrmUrECF0/HjDib7YQDWlSBq+vC2So4fVcumchSi7UHXzNwysquSEzLEde a4+VC07zKu9wsRDxSstBjcqrfLETnOhbvGIu2KVqzkn94FC7Ma6ZJn9pMbX3RcA/y1nW g2Tw== X-Gm-Message-State: APjAAAV3iARzK0xjbdKNePJLqIEhlqY8gFg4vkqgtzUFcukPilKiz/Qk NQeDzEuSfj5Qj7vgbUGvrCRSoeSr7gZEpkyVVgM= X-Received: by 2002:a37:bd5:: with SMTP id 204mr10857479qkl.330.1567799226454; Fri, 06 Sep 2019 12:47:06 -0700 (PDT) MIME-Version: 1.0 References: <20190906062644.13445-1-rashmica.g@gmail.com> In-Reply-To: <20190906062644.13445-1-rashmica.g@gmail.com> From: Joel Stanley Date: Fri, 6 Sep 2019 19:46:55 +0000 Message-ID: Subject: Re: [PATCH v3 3/5] gpio/aspeed: Setup irqchip dynamically To: Rashmica Gupta Cc: Linus Walleij , Bartosz Golaszewski , Andrew Jeffery , "open list:GPIO SUBSYSTEM" , "moderated list:ARM/ASPEED MACHINE SUPPORT" , "moderated list:ARM/ASPEED MACHINE SUPPORT" , open list Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, 6 Sep 2019 at 06:26, Rashmica Gupta wrote: > > 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 Reviewed-by: Joel Stanley > --- > 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 >