Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp917431yba; Fri, 26 Apr 2019 10:54:07 -0700 (PDT) X-Google-Smtp-Source: APXvYqxHwag2B2g15d4n3oz9qW2t6j9o1tKIobEzeSc+Pd2RW5QNSRddN0wbhkBf1fTQ12FCkK4+ X-Received: by 2002:a17:902:b481:: with SMTP id y1mr47791241plr.161.1556301247756; Fri, 26 Apr 2019 10:54:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1556301247; cv=none; d=google.com; s=arc-20160816; b=sc3Wa5NeiU2oSca4VdczVG14vu9f4SXza2t4s14gC81tsg3GEFH2d3MGADpSoqBBND Mlw2t3TFYfM/Es8Mp1eb+60kajurk+pR+uXoCOy6Y4EWurPlTFrIoOwQ6oNhYTCvL86t Q5ZzvTqkXerRU255EbRNI6L76LO/byyQUUhg4FknEDZCR7dWPKEqxAQ2qx25Bg4ebR1v SE07jhUdgKvhPpcTtwdDrl+NyvX5PgzFwkFtlXqGzcOIZFtr496xDifY4mnIfcIn+HW9 RuSnTXL4Azb1kXnBQ7Bi5jKm5QjTR6HdoiZL3oR7qs9vjWfDESBIpq4pHCB0I/8GdVAW 5BBw== 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:dkim-signature; bh=hEUQp+1ZymVlnVBjfzba+RHICVcVhzbLb/urM/0DUgk=; b=0tgDSj1XYPIJWPL5b3SQ1ll6Ypj8WiCCrypood6nSL9FB4rIvaKSx6Q0sD9OM8obwX t/MIWfGHWMNxoenefuNzGvo0Qqr9g2b+L936JvyalVyUacYq5spZzhvFPd7k+N+UzhKc el0mQxWbEf/ofep9+cv02Tgw3aqzgmTZFoi799CXBWG23JUeBvvkTt9dtp/AlnduLdEo PUdZbgdAXIJ0XkBIa5v6sqW9rM1AMZisQ2zuF4ewTAJpp/T9Y/z029xPY5sICPk8fG/C a0MPs1zlkVwDBKKCI2dULjJIz6HpCulQSaUbjEvJtGTAjiMayrNTnP3wUqre1jkhigxW w8Kg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=Qd5Ty0W0; 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=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id h125si24860484pgc.290.2019.04.26.10.53.51; Fri, 26 Apr 2019 10:54:07 -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=@linaro.org header.s=google header.b=Qd5Ty0W0; 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=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726252AbfDZRwt (ORCPT + 99 others); Fri, 26 Apr 2019 13:52:49 -0400 Received: from mail-pg1-f196.google.com ([209.85.215.196]:33939 "EHLO mail-pg1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726049AbfDZRwt (ORCPT ); Fri, 26 Apr 2019 13:52:49 -0400 Received: by mail-pg1-f196.google.com with SMTP id c13so985659pgt.1 for ; Fri, 26 Apr 2019 10:52:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=hEUQp+1ZymVlnVBjfzba+RHICVcVhzbLb/urM/0DUgk=; b=Qd5Ty0W0eeX+PlOxbOktqwbzBIkdqo2ELzziqu9BTbN8zag36pRGoX5wUhG7LZmhNq JKjNoQZ4EuUi2BJFAI9ZdoWbrpmifMuXAyy/DINlU0Baeua6nMTtWg5eUIL5cp0tD/ty UI7d/moVOlj6gFYTd+xzVpLvBf5FACV8DdfdZGAfkcOrALOP0XpqAEDvaJ5+/Be0JW5A OCM/NyACkto+qliG04t4J5ztI+4zFx+4n2REeOxK5+qTYMxT/LN4MTkN3omKud1xeK4Z k2rNhsHn6ORNk4mD9LOMMMM2so+NUHF+QmfG3x+h7V9ABBYg80rCpk+Q12p2KyBjk8Qo VjPw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=hEUQp+1ZymVlnVBjfzba+RHICVcVhzbLb/urM/0DUgk=; b=jwaqSF3tnJBmLrRKo8t0AhcCymjm+TZXYKdcbSpw6CAaElOuESIZUNIfGS7q2+AekI EGvgngle967ov5JJqbN0wUSnxlA+sCrA1/4ihglL/LQedMf9LVcfYvLqmyYK8+pDG/RX K1sFtSqDnqos5u9r1ly4w5PC99OhwTY9wAferA9qQ//gQ9PvKafxLsS7kAdxiZ1iUzWC 9/6UvBKJRDZJEZvm08osfROFDW9KSbxvY/whxVCwAQ4qsxycA8SC6GPjvAGquRQ7wcOH REAwH9+HsSZkrRJkVzJXtHShFa27+UAMnqbzJ6dx/9b9h2GPh9SOD3vBCdpzm/IQIK3X /oDg== X-Gm-Message-State: APjAAAUFHWCRsJ3DiZceR7TRJTqN3Z2lEfttURt6OaGI5281HMyz3hIg cQ2Zzncv0hIrocD5UOKysSiQ X-Received: by 2002:a63:1048:: with SMTP id 8mr44523944pgq.70.1556301168515; Fri, 26 Apr 2019 10:52:48 -0700 (PDT) Received: from Mani-XPS-13-9360 ([2405:204:72c4:4b94:e0ad:83b0:3987:aa05]) by smtp.gmail.com with ESMTPSA id c22sm36313593pfn.136.2019.04.26.10.52.42 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Fri, 26 Apr 2019 10:52:47 -0700 (PDT) Date: Fri, 26 Apr 2019 23:22:40 +0530 From: Manivannan Sadhasivam To: Andy Shevchenko Cc: Jan Kiszka , "Enrico Weigelt, metux IT consult" , Andy Shevchenko , Mika Westerberg , Linus Walleij , Bartosz Golaszewski , Linux Kernel Mailing List , "open list:GPIO SUBSYSTEM" , ACPI Devel Maling List , "Rafael J. Wysocki" Subject: Re: [PATCH 2/2] gpio: sch: Add interrupt support Message-ID: <20190426175237.GA31751@Mani-XPS-13-9360> References: <1200464b-f969-ebc2-ae82-1f8ca98aaca1@siemens.com> <20190424103306.GC2654@lahna.fi.intel.com> <9377620b-d74a-04d9-a51e-8590400b1c0f@siemens.com> <20190426130615.GT9224@smile.fi.intel.com> <2f3da791-4a10-c2c4-dc5a-22ad16ed7be6@siemens.com> <20190426173329.GA31161@Mani-XPS-13-9360> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.9.4 (2018-02-28) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Apr 26, 2019 at 08:44:36PM +0300, Andy Shevchenko wrote: > On Fri, Apr 26, 2019 at 8:33 PM Manivannan Sadhasivam > wrote: > > On Fri, Apr 26, 2019 at 08:20:19PM +0300, Andy Shevchenko wrote: > > > On Fri, Apr 26, 2019 at 7:05 PM Jan Kiszka wrote: > > > > On 26.04.19 16:42, Enrico Weigelt, metux IT consult wrote: > > > > > On 26.04.19 15:36, Jan Kiszka wrote: > > > > The problem here is opaque number. This has to be chip + *relative* pin number/ > > > See this: > > > https://stackoverflow.com/questions/55532410/how-do-linux-gpio-numbers-get-their-values/55579640#55579640 > > > > > > > But for platform like 96Boards we don't need controller specific lookup, these > > are all handled by the platform code [1] so that the users can use the standard > > pinout number to access GPIOs. > > This is a complete mistake. > > There is *no* global GPIO numbers anymore in Linux. (I don't count > very old legacy platforms) > Read above, it applies to DT or whatever resource provider. > I think you misunderstood what I said. I referred the standard 96Boards pinout and in the MRAA platform code, individual boards just map their GPIO chip and line number based on that. I didn't mean the deprecated global linux numbering. https://github.com/intel-iot-devkit/mraa/blob/master/src/arm/96boards.c#L109 And of couse as Jan mentioned, the chip number will change when some other external GPIO controller got probed before but so far we haven't got to it! Regards, Mani > > For instance, pin 23 on the Low Speed expansion > > header is the GPIO for all 96Boards platform, so the user can access that pin > > using 23 itself in the application and it will run across all supported > > 96Boards. > > > > That's one of the reason why we prefer MRAA. > > > [1] https://github.com/intel-iot-devkit/mraa/blob/master/src/arm/96boards.c#L75 > > -- > With Best Regards, > Andy Shevchenko