From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933217Ab2K0D2q (ORCPT ); Mon, 26 Nov 2012 22:28:46 -0500 Received: from mail-ie0-f174.google.com ([209.85.223.174]:49498 "EHLO mail-ie0-f174.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933086Ab2K0D2o (ORCPT ); Mon, 26 Nov 2012 22:28:44 -0500 MIME-Version: 1.0 In-Reply-To: References: <57384ebc52c7d39d1bae31ba3baa6f820b4ac696.1353610436.git.viresh.kumar@linaro.org> <7a48ae364663ab3a336251fada9aee07ccd728b8.1353610437.git.viresh.kumar@linaro.org> <20121123094132.EFCB73E07BE@localhost> <20121126184015.784993E091F@localhost> Date: Tue, 27 Nov 2012 08:58:44 +0530 Message-ID: Subject: Re: [PATCH V3 3/3] mfd: stmpe: Update DT support in stmpe driver From: Viresh Kumar To: Grant Likely Cc: lee.jones@linaro.org, sameo@linux.intel.com, devicetree-discuss@lists.ozlabs.org, spear-devel@list.st.com, linux-kernel@vger.kernel.org Content-Type: text/plain; charset=ISO-8859-1 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 27 November 2012 08:10, Viresh Kumar wrote: > On 27 November 2012 00:10, Grant Likely wrote: >> It would actually be good to ask the interrupt controller driver what >> kind of interrupt signal it expects for a given interrupt line. That >> should also solve the problem and I think it would be more useful to >> other devices. Can you investigate whether or not >> irqd_get_trigger_type() returns the information you need? > > That's a pretty cool function to use. :) > > Will check it out :) I was thinking about this logic in my earlier mail, don't know what stopped me from thinking it is wrong. :( Problem is with invert polarity, which the interrupt controller is not aware of. For example, suppose interrupt controller needs Rising edge interrupt, but the board has inverted the line between stmpe and IC. So, we will get Rising high from the routine you mentioned, but we need to generate opposite of that to make it rising high. And so interrupt polarity field is still required. -- viresh