Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752794Ab2FNHGR (ORCPT ); Thu, 14 Jun 2012 03:06:17 -0400 Received: from mail-pb0-f46.google.com ([209.85.160.46]:38274 "EHLO mail-pb0-f46.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751678Ab2FNHGQ (ORCPT ); Thu, 14 Jun 2012 03:06:16 -0400 Date: Thu, 14 Jun 2012 00:06:14 -0700 (PDT) Message-ID: <878vfqqsnw.wl%kuninori.morimoto.gx@renesas.com> From: Kuninori Morimoto To: Paul Mundt Cc: Linus Walleij , Grant Likely , Kuninori Morimoto , linux-kernel@vger.kernel.org Subject: Re: [PATCH 2/2][resend] gpio: pcf857x: enable gpio_to_irq() support In-Reply-To: <20120614061519.GB22007@linux-sh.org> References: <877gw2uis5.wl%kuninori.morimoto.gx@renesas.com> <87d352qymy.wl%kuninori.morimoto.gx@renesas.com> <87aa06qykw.wl%kuninori.morimoto.gx@renesas.com> <20120614061519.GB22007@linux-sh.org> User-Agent: Wanderlust/2.14.0 Emacs/23.3 Mule/6.0 MIME-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Content-Type: text/plain; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1369 Lines: 49 Hi Paul Thank you for checking patch > > +static struct irq_chip pcf857x_irq_chip = { > > + .name = "pcf857x cascade", > > + .irq_mask = pcf857x_nothing, > > + .irq_unmask = pcf857x_nothing, > > +}; > > + > Just use dummy_irq_chip. Thanks. I didn't know that. OK. I fix it in v2 > > +static int pcf857x_irq_domain_init(struct pcf857x *gpio, > > + struct pcf857x_platform_data *pdata, > > + struct device *dev) > > +{ > > + int status; > > + > > + /* create demuxed irq */ > > + gpio->irq_demux_base = irq_alloc_descs(-1, 0, gpio->chip.ngpio, 0); > > + if (gpio->irq_demux_base < 0) > > + return -ENODEV; > > + > > + gpio->irq_domain = irq_domain_add_legacy(dev->of_node, > > + gpio->chip.ngpio, > > + gpio->irq_demux_base, > > + 0, > > + &pcf857x_irq_domain_ops, > > + NULL); > > Given that you don't actually care where the IRQs are mapped there's no > need to bother with a legacy domain here, you can just use a linear one > outright. At which point you can drop your separate irq_desc > allocation/management. OK. I use linear in v2 Best regards --- Kuninori Morimoto -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/