Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp2938649imu; Mon, 19 Nov 2018 08:20:24 -0800 (PST) X-Google-Smtp-Source: AJdET5c92tPbdu3dh/0qJ9fL7q1hXVqG49+/M9Qo0zELzVhTmaTNoOpXvsd6IovwggNJRR2GbO50 X-Received: by 2002:a63:d104:: with SMTP id k4mr20276133pgg.227.1542644423993; Mon, 19 Nov 2018 08:20:23 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1542644423; cv=none; d=google.com; s=arc-20160816; b=f9KWsXgt+7NMDO487B5puKZ6EGbiPS/cl2ldxyNgE3J7OK/JC0up/6KThaTrgFnCGI C9kTPAUO7rfa5B6BOJmA1ZS/v1+DgZw+1UBfkISUOJRJ63W1xgBNz5vyPOSFOytqreSq cQQARUFfuouvhT89SqUHF+ylnwp24G6H3nhWc917IlQbKttCH54kjFXgEmX0TusqGt0Y FWmPM/miwuAarf7OevTDhw8evfD4ZKC+aWgd50pI+k3mzni/C9p3ttdIS29aJbD4iBar oQYwCE0s7Zp/cwOLaEBdfmUL4xfwANSYzZbRvXrPC6xZqC5ccCcEyymTEgK7OMwCvxF4 ZlVg== 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=spK82pBGkds5/CI2x34DTSXZ6XpH2M744elAe4MTBCk=; b=qtjXcl5jdqSz7dIEpr3y9OGJE+w1IKjN6jzkkkvPCcpN31Td/lbxYTFsG2TH3jBI9H o+l4B1OyFlS5Fn9S9H2GaXfko1km7X6kSVg5WPyJTaQGGFt0LYhXCiKqnuMfzhDjXfJo XMLm9IGMuO74UH/870VJM4DsPtPFJGvM2iSO6ly32qfvVk9aeNggopyIjl6JyIR3Fj2y DbOgJ/bLhF/Iy5i9S2aKRRxTgH3g+cgmKvtSXI73ibMsyLluonXDxDzwNTMeOLK3NYVO aygqgEZFntJ9XGFt773P14yGQIAXdTGrM+nbSk8ZQbinY1CS0Y0yAANm1SOy0rgWrlb8 PRlw== 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 k13si33559734pgb.343.2018.11.19.08.20.09; Mon, 19 Nov 2018 08:20:23 -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 S1730017AbeKTCnM (ORCPT + 99 others); Mon, 19 Nov 2018 21:43:12 -0500 Received: from muru.com ([72.249.23.125]:54448 "EHLO muru.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729825AbeKTCnM (ORCPT ); Mon, 19 Nov 2018 21:43:12 -0500 Received: from atomide.com (localhost [127.0.0.1]) by muru.com (Postfix) with ESMTPS id 1C01980B6; Mon, 19 Nov 2018 16:19:10 +0000 (UTC) Date: Mon, 19 Nov 2018 08:19:06 -0800 From: Tony Lindgren To: Peter Ujfalusi Cc: Belisko Marek , LKML , linux-omap@vger.kernel.org, "Dr. H. Nikolaus Schaller" , Laxman Dewangan Subject: Re: omap5 fixing palmas IRQ_TYPE_NONE warning leads to gpadc timeouts Message-ID: <20181119161906.GP53235@atomide.com> References: <20180703084516.GT112168@atomide.com> <20181113180656.GE53235@atomide.com> <46d271b2-35d3-6353-c530-3292cdac53ab@ti.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <46d271b2-35d3-6353-c530-3292cdac53ab@ti.com> 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 * Peter Ujfalusi [181119 10:16]: > On 2018-11-13 20:06, Tony Lindgren wrote: > > 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? > > No, I don't. > The INT polarity can be changed in Palmas. > based on the pdata->irq_flags (queried via irqd_get_trigger_type()) > the code configures it: > > if (pdata->irq_flags & IRQ_TYPE_LEVEL_HIGH) > reg = PALMAS_POLARITY_CTRL_INT_POLARITY; > else > reg = 0; > > and we pass the same irq_flags to the regmap_add_irq_chip() > IRQ_TYPE_LEVEL_HIGH == IRQF_TRIGGER_HIGH == 0x00000004 > > A change in DT should be enough, no need to patch palmas.c, imho. But it's not. I'm now wondering if wakeupgen is inverting the polarity for this interrupt? GIC docs say this about SPI interrupts: "SPI is triggered on a rising edge or is active-HIGH level-sensitive." So when setting IRQ_TYPE_LEVEL_HIGH in dts, we still must not invert the polarity in palmas while tegra needs to. So either tegra114 hardware is inverting the polarity, or omap5 wakeupgen is. Does the palmas trm say which way PALMAS_POLARITY_CTRL triggers if PALMAS_POLARITY_CTRL_INT_POLARITY is set? Also note that dra7 is using a gpio for palmas interrupt. Regards, Tony