From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S941502AbcIHLPC (ORCPT ); Thu, 8 Sep 2016 07:15:02 -0400 Received: from mga11.intel.com ([192.55.52.93]:15613 "EHLO mga11.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S941454AbcIHLPB (ORCPT ); Thu, 8 Sep 2016 07:15:01 -0400 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.30,300,1470726000"; d="scan'208";a="165791466" Date: Thu, 8 Sep 2016 14:14:57 +0300 From: Mika Westerberg To: Linus Walleij Cc: Marc Zyngier , "Rafael J. Wysocki" , "linux-arm-kernel@lists.infradead.org" , "linux-kernel@vger.kernel.org" Subject: Re: [RFC PATCH] gpio/gpiolib: Forbid irqchip default trigger if probed over DT Message-ID: <20160908111457.GD15313@lahna.fi.intel.com> References: <1473170343-16853-1-git-send-email-marc.zyngier@arm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Organization: Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo User-Agent: Mutt/1.7.0 (2016-08-17) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Sep 08, 2016 at 12:13:27AM +0200, Linus Walleij wrote: > On Tue, Sep 6, 2016 at 3:59 PM, Marc Zyngier wrote: > > > Using a default trigger is a bad idea if using DT to configure > > interrupts, as the device's interrupt specifier will always contain > > the trigger configuration. > > > > Let's warn about that particular situation, and revert to not > > having a default. Hopefully, the couple of drivers still using > > this feature will quickly be fixed. > > > > Signed-off-by: Marc Zyngier > > Patch applied. This is a good way to get rid of this madness. > > > + /* > > + * Specifying a default trigger is a terrible idea if DT is > > + * used to configure the interrupts, as you may end-up with > > + * conflicting triggers. Tell the user, and reset to NONE. > > + */ > > + if (WARN_ON(of_node && type != IRQ_TYPE_NONE, > > + "%s: Ignoring %d default trigger\n", of_node->full_name)) > > + type = IRQ_TYPE_NONE; > > I *strongly* suspect this is bad also when using ACPI. I agree. > Would the GPIO ACPI people devise a patch on top of this > to emit the same warning for the ACPI usecase? Yup, I'll make a patch for ACPI next week. From mboxrd@z Thu Jan 1 00:00:00 1970 From: mika.westerberg@linux.intel.com (Mika Westerberg) Date: Thu, 8 Sep 2016 14:14:57 +0300 Subject: [RFC PATCH] gpio/gpiolib: Forbid irqchip default trigger if probed over DT In-Reply-To: References: <1473170343-16853-1-git-send-email-marc.zyngier@arm.com> Message-ID: <20160908111457.GD15313@lahna.fi.intel.com> To: linux-arm-kernel@lists.infradead.org List-Id: linux-arm-kernel.lists.infradead.org On Thu, Sep 08, 2016 at 12:13:27AM +0200, Linus Walleij wrote: > On Tue, Sep 6, 2016 at 3:59 PM, Marc Zyngier wrote: > > > Using a default trigger is a bad idea if using DT to configure > > interrupts, as the device's interrupt specifier will always contain > > the trigger configuration. > > > > Let's warn about that particular situation, and revert to not > > having a default. Hopefully, the couple of drivers still using > > this feature will quickly be fixed. > > > > Signed-off-by: Marc Zyngier > > Patch applied. This is a good way to get rid of this madness. > > > + /* > > + * Specifying a default trigger is a terrible idea if DT is > > + * used to configure the interrupts, as you may end-up with > > + * conflicting triggers. Tell the user, and reset to NONE. > > + */ > > + if (WARN_ON(of_node && type != IRQ_TYPE_NONE, > > + "%s: Ignoring %d default trigger\n", of_node->full_name)) > > + type = IRQ_TYPE_NONE; > > I *strongly* suspect this is bad also when using ACPI. I agree. > Would the GPIO ACPI people devise a patch on top of this > to emit the same warning for the ACPI usecase? Yup, I'll make a patch for ACPI next week.