Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp5686138imu; Tue, 13 Nov 2018 10:08:29 -0800 (PST) X-Google-Smtp-Source: AJdET5dsfritXFqY7J5DlfREc9ptpAFLgBZfO/37auWv6adPX78qKZeqtAqNv9ABaUtx/DbqQ9EM X-Received: by 2002:a62:8145:: with SMTP id t66-v6mr6170164pfd.246.1542132509605; Tue, 13 Nov 2018 10:08:29 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1542132509; cv=none; d=google.com; s=arc-20160816; b=i0ANOz1kwzq3FTmM8TrREK2uQ+QIbH3NXeFM0M99F/qSDSZf1sfc5iDtCRqyWXj4Mj lB8aULKWal0057KPWMB4bFtSP4ANBq1tpM3yJdTREhBL11poEPcH03DpQa4FIfmsZ1kF zJMyjJENRtVkWt+xGX1UKGuG/jIZUrw3d2mcWis+9EGilnWILUWKPFKMEfRRgwOeb3ev Tg9HbPEBArT3RmY3RmyZg9phP61oFsBKBBdupTxuafl1zR8nlJgabCA0ox/3eDaGurvy ++lBUS9O6FVmRujDahovT0R94Zd2YXZBsb0l8PrLBwW/qACbN1fGmeVAiS4hSRXa4CCr matg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=FNFoyTe8AP9Q25Cv5BBKEEGkDwwO5se8dIwEW4jR/h8=; b=cEBRC3XBJ08e/Aog/kctv6w1vgega53WGzB9qc/37Ym1IHX6mAstWdPj/oXlRur9ik Tbqp4Kxl+e4QE6Ez7c2sbb9So7P0QPs80XNBC4yZWapoDZjzRZQNdn0aS1PqhUKjO37W E3AboRucvrCv+3ekokAq0i8zKRWv7LkoFjmfkF+kcy+OnVKk81gJchbstvuD4nz/ybNM bioSQpN2ItG1s1lMoPRQm3e3Z6on4CCtn+OdnFuphxsrS6HxmiSI12Mn6oFEJ0O6xItc hL6Hbl730XfsglkP/F5DyMKHYE9K7Faj23TscXPKY8Fcivpp2H3PUw7eHLvYN9duGIye rNQg== ARC-Authentication-Results: i=1; mx.google.com; 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 88-v6si22305973plb.57.2018.11.13.10.08.05; Tue, 13 Nov 2018 10:08:29 -0800 (PST) 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; 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 S1732763AbeKNEGM (ORCPT + 99 others); Tue, 13 Nov 2018 23:06:12 -0500 Received: from muru.com ([72.249.23.125]:53994 "EHLO muru.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1732227AbeKNEGM (ORCPT ); Tue, 13 Nov 2018 23:06:12 -0500 Received: from atomide.com (localhost [127.0.0.1]) by muru.com (Postfix) with ESMTPS id 6D513809B; Tue, 13 Nov 2018 18:06:59 +0000 (UTC) Date: Tue, 13 Nov 2018 10:06:56 -0800 From: Tony Lindgren To: Belisko Marek Cc: LKML , linux-omap@vger.kernel.org, "Dr. H. Nikolaus Schaller" , Peter Ujfalusi Subject: Re: omap5 fixing palmas IRQ_TYPE_NONE warning leads to gpadc timeouts Message-ID: <20181113180656.GE53235@atomide.com> References: <20180703084516.GT112168@atomide.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi * Belisko Marek [180703 18:34]: > Hi Tony, > > On Tue, Jul 3, 2018 at 10:45 AM Tony Lindgren wrote: > > > > * Belisko Marek [180620 09:40]: > > > Hello, > > > > > > I'm trying to fix warning (for omap5 board) produced by recent change > > > to avoid using IRQ_TYPE_NONE like: > > > [ 1.818666] WARNING: CPU: 1 PID: 778 at > > > drivers/irqchip/irq-gic.c:1016 gic_irq_domain_translate+0x78/0x100 > > > [ 1.828839] Modules linked in: > > > > > > I did look to other commit which did update and without deep knowledge > > > I just simply do this small change: > > > diff --git a/arch/arm/boot/dts/omap5-board-common.dtsi > > > b/arch/arm/boot/dts/omap5-board-common.dtsi > > > index 218892b..ab2df8c 100644 > > > --- a/arch/arm/boot/dts/omap5-board-common.dtsi > > > +++ b/arch/arm/boot/dts/omap5-board-common.dtsi > > > @@ -393,7 +393,7 @@ > > > > > > palmas: palmas@48 { > > > compatible = "ti,palmas"; > > > - interrupts = ; /* IRQ_SYS_1N */ > > > + interrupts = ; /* IRQ_SYS_1N */ > > > reg = <0x48>; > > > interrupt-controller; > > > #interrupt-cells = <2>; > > > > > > and it looks board boots fine. Only issue is that gpadc driver is not > > > working (at least not getting interrupts at all ADC fails with > > > timeout). I did look to gpadc driver and driver is not using > > > interrupts defined in dts but request interrupt directly from palmas > > > mfd module. Any ideas what needs to be changed to have gpadc again > > > working with mentioned patch? > > > > Can you try with IRQF_TRIGGER_HIGH added also to the flags to > > regmap_add_irq_chip() in drivers/mfd/palmas.c? > Nope issue is till present also after this change like: > diff --git a/arch/arm/boot/dts/omap5-board-common.dtsi > b/arch/arm/boot/dts/omap5-board-common.dtsi > index 218892b..6912769 100644 > --- a/arch/arm/boot/dts/omap5-board-common.dtsi > +++ b/arch/arm/boot/dts/omap5-board-common.dtsi > @@ -393,7 +393,7 @@ > > palmas: palmas@48 { > compatible = "ti,palmas"; > - interrupts = ; /* IRQ_SYS_1N */ > + interrupts = ; /* IRQ_SYS_1N */ > reg = <0x48>; > interrupt-controller; > #interrupt-cells = <2>; > @@ -432,9 +432,9 @@ > > gpadc: gpadc { > compatible = "ti,palmas-gpadc"; > - interrupts = <18 0 > - 16 0 > - 17 0>; > + interrupts = <18 IRQ_TYPE_LEVEL_HIGH > + 16 IRQ_TYPE_LEVEL_HIGH > + 17 IRQ_TYPE_LEVEL_HIGH>; > #io-channel-cells = <1>; > ti,channel0-current-microamp = <5>; > ti,channel3-current-microamp = <10>; > diff --git a/drivers/mfd/palmas.c b/drivers/mfd/palmas.c > index 663a239..15d23db 100644 > --- a/drivers/mfd/palmas.c > +++ b/drivers/mfd/palmas.c > @@ -601,7 +601,7 @@ static int palmas_i2c_probe(struct i2c_client *i2c, > regmap_write(palmas->regmap[slave], addr, reg); > > ret = regmap_add_irq_chip(palmas->regmap[slave], palmas->irq, > - IRQF_ONESHOT | pdata->irq_flags, 0, > + IRQF_ONESHOT | IRQF_TRIGGER_HIGH | > pdata->irq_flags, 0, > driver_data->irq_chip, &palmas->irq_data); > if (ret < 0) > goto err_i2c; Looks like the IRQ_TYPE_NONE issue still is there for omap5 and should be fixed with IRQ_TYPE_HIGH. No idea about why palmas interrupts would stop working though, Peter, do you have any ideas on this one? Regards, Tony