From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753524AbdHULxF (ORCPT ); Mon, 21 Aug 2017 07:53:05 -0400 Received: from usa-sjc-mx-foss1.foss.arm.com ([217.140.101.70]:55704 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752234AbdHULxE (ORCPT ); Mon, 21 Aug 2017 07:53:04 -0400 Subject: Re: [PATCH v2] irqchip: uniphier-aidet: add UniPhier AIDET irqchip driver To: Masahiro Yamada Cc: Thomas Gleixner , Jason Cooper , Masami Hiramatsu , Jassi Brar , Mauro Carvalho Chehab , Hans Verkuil , Randy Dunlap , devicetree@vger.kernel.org, Linux Kernel Mailing List , "David S. Miller" , Rob Herring , Greg Kroah-Hartman , Mark Rutland , linux-arm-kernel References: <1503309663-2742-1-git-send-email-yamada.masahiro@socionext.com> From: Marc Zyngier Organization: ARM Ltd Message-ID: <44a166ec-019e-8f84-5469-b095eb4d26fe@arm.com> Date: Mon, 21 Aug 2017 12:53:00 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.2.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-GB Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 21/08/17 11:54, Masahiro Yamada wrote: >>> + /* parent is GIC */ >>> + parent_fwspec.fwnode = domain->parent->fwnode; >>> + parent_fwspec.param_count = 3; >>> + parent_fwspec.param[0] = 0; /* SPI */ >>> + parent_fwspec.param[1] = hwirq; >>> + parent_fwspec.param[2] = IRQ_TYPE_LEVEL_HIGH; /* properly set later */ >> >> Why defer it to later? You already have the right information in "type", >> so you might as well provide it immediately. > > > Because .irq_set_type() will set it up > before the IRQ is really in use. > > > If we look gic_irq_domain_alloc() implementation, > it does not care "type". > > gic_set_type() will manipulate hardware registers. But that's out of the scope of this driver. Whatever the GIC driver does (or doesn't), you should pass it the right information. > Having said that, it shouldn't hurt to set type here. Exactly. Thanks, M. -- Jazz is not dead. It just smells funny...