Received: by 2002:ac0:a581:0:0:0:0:0 with SMTP id m1-v6csp1461464imm; Tue, 3 Jul 2018 11:33:38 -0700 (PDT) X-Google-Smtp-Source: ADUXVKKYlEG1s/tkPKmDPrmVk1wXGjHQI8Y0NqhdjNrQjekvWc9C3If1YCV7oKIaDDureY8MQpaD X-Received: by 2002:a17:902:9a01:: with SMTP id v1-v6mr31756519plp.20.1530642818029; Tue, 03 Jul 2018 11:33:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1530642818; cv=none; d=google.com; s=arc-20160816; b=gpjniBuNbMSOydpeRKnRobHkC90CqXBvvZ6FsCnEPvoOGZwk3SarL5Vzli0PBfg/pV rvn9kUlXIODsFbp2voOTf+R6FWBycZiQFqAZIVB2bKlqKWWTKA0vTp327eafgxPupyGK VDQpf80czSVKjpFj9zFjdpDR5u7XLIFXQzsrYtydFw2RK/cHbBF0/tvMHSJlJowcuY48 dw/Drqz5MUrd4MNua/grZ0OOYc+MTmVNt3X0duxooMv2DhtHP6MAsg9/8UVJkreBsUQb 8P2bgz3urOHs5GYMdGIVwzNsFH2uXw5Lv/PJ9mIYeL/UDARcpJpTwyp/QN7QhTNBUE1s 6U4A== 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 :arc-authentication-results; bh=zZSqYGyngzuHzfznIWOmDAxK4i2T3KP8/Osn+lRHHeA=; b=meFzbU1wGmCKzgL9lVzeUecxB0llHWj9T3ye8BS1rUwpM8SIH1a14VZEJcXHYI/zKg 0Fzk0C9M8IFLiEcIG9A7vki2fuJRRoP7EnCqtHwYEYi/Gj+mJxAP216HfYBznHy93apj kR4F2WoLZx6VDOttAyQnFlb9Zq4uE8VZMBVhVDjToPDh4vy/vsCZu/4bzn6TkTwSB1hJ yduIfmlrjD6yrMr0GJiZOHiU7QfS6zMXYLYsVvLo4eYszsn2e8UG5DyeasxOa6Csx53C 47tEAmlAU1dh/U0bgCFIMARh4Cs4ChKMhSqeEeQ9/EC0ZwtGyU4GWmjwOY+AIrXW18HR yiig== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=QbNtKB14; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id j193-v6si1483384pge.689.2018.07.03.11.33.23; Tue, 03 Jul 2018 11:33:37 -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=@gmail.com header.s=20161025 header.b=QbNtKB14; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S934542AbeGCSbr (ORCPT + 99 others); Tue, 3 Jul 2018 14:31:47 -0400 Received: from mail-wr0-f193.google.com ([209.85.128.193]:46227 "EHLO mail-wr0-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S934436AbeGCSbp (ORCPT ); Tue, 3 Jul 2018 14:31:45 -0400 Received: by mail-wr0-f193.google.com with SMTP id s11-v6so2922178wra.13; Tue, 03 Jul 2018 11:31:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=zZSqYGyngzuHzfznIWOmDAxK4i2T3KP8/Osn+lRHHeA=; b=QbNtKB14cEtSSihr+U1Y4kshLp4prIJPkvOeaEXIBhdpJCMavQ+/29qyy7FPU6ZKjU q9OV4fX4RyqiUY5uPUhzj/3qLy/pyBEoyQt2VXNB2BPX2mKUNhhnI5cVkjn3iZiaSrgW 4UvkrABdhqP7RzSbUStt6of9TE9+v5VhH99fV8wVERBz0ckGqJb3R/Xpqf/jYM8D8+4e vtgkWKMHoOy4elI+xeab2dBftJs3c1hRwC2Ei+lsQHtuMyyeOC+NXxAfcRPhWXdfEbY0 u7EQ6o57SYREe64OhV665TNbnEDJYmTjK+XhbQYewIO8U+wCZtn3s+UmMHBfivuF2yBF +ZrA== 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=zZSqYGyngzuHzfznIWOmDAxK4i2T3KP8/Osn+lRHHeA=; b=f3OdrsVEfJ51t4zEe6CoYx9Wy1XKPq79L7YbK+BKG6Pv78dSuo4a4MFw4XWCl2V/8W zl9Hrh0+fG9g4povQ/tWWEsb51LsJMkkqwpZ4chDRQriHfGuGcYeH+YkqSsY6oPGXucZ afiupXR69VSVQJ+xkAmQuxCsQUeugYkyv2EbnTHdJIa67u0xBG+Sgm/PV9JGBkZZfARg fA/Vnqh+oagd6zhv1el67CxykOpsk67jGKQWdMJJQ+9q3eoELNSErjL2aYGRtVpgAaMy dXN9l7sDqJ7j0mqCFLPE7rrGAun+0La+4NpfoQJPenXxz0U1eoXK7XV9x0SARBGPijpr xE6Q== X-Gm-Message-State: APt69E3rai/Vja+2A2v20QitAAAScD+s6YQe/6TJO48Gyd5SiIF2fNh9 MJUdDJTxJWy8k/lrmvemCUu4grVCGzoB8PwZFgk+qA== X-Received: by 2002:adf:9527:: with SMTP id 36-v6mr3228103wrs.99.1530642703980; Tue, 03 Jul 2018 11:31:43 -0700 (PDT) MIME-Version: 1.0 References: <20180703084516.GT112168@atomide.com> In-Reply-To: <20180703084516.GT112168@atomide.com> From: Belisko Marek Date: Tue, 3 Jul 2018 20:31:32 +0200 Message-ID: Subject: Re: omap5 fixing palmas IRQ_TYPE_NONE warning leads to gpadc timeouts To: Tony Lindgren Cc: LKML , linux-omap@vger.kernel.org, "Dr. H. Nikolaus Schaller" 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 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; > > Regards, > > Tony BR, marek