Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp952110yba; Fri, 26 Apr 2019 11:28:46 -0700 (PDT) X-Google-Smtp-Source: APXvYqyLEeUY6eoBACQxa4/rHgfioTh9XILk0cFI4xTOBJtDe+tgDREfv0qMC6s57PaeSNxsMjLh X-Received: by 2002:aa7:943b:: with SMTP id y27mr47719859pfo.59.1556303326071; Fri, 26 Apr 2019 11:28:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1556303326; cv=none; d=google.com; s=arc-20160816; b=vw93f0YF0FV7u3Dwc2nO8YZtbVf4o4jtYFdL6NGHSO9IRsCq88TzSju+wi+PRwW5hV 92ZhseMaL3pRR8rzxFjlckZ5PQ9mvhfaoxRGv9X1xwN6aEC+N362/Ftx9+0OevJtwTOq 9S81tvR71ohXeETqH/GpV8zoKgZtGQMWFejKeYLxj2zSKHTpp2jCytu3qRWeadJx06Ml n/VGl3OT9c2Rn2TnCbPMjfqm0j0H9BNxI+HFGpBzBrh1xLjH+btMgBANoFGl5gVKP+qH sxbTJyClMalt+V0yjg/tXU8JC7eKgZCUt9j4IJN1LXcUBtenWvxvmaZZUjT76znOkfLk DCqg== 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; bh=JAjwuc39AddYOCTUpAuM9uE4idFBuger2xGgrN2miVE=; b=T0QTT6m3yF1075GEZUdV2TpAZr68UzhB781KmcsxXhxx7FXjJdL3l7XwxaEY+kM6au vWGFjyc4c8EsfWceiCefTICG9RJqKWF4cCBOi5YDl5moP0qhZXpQ7SsDNyrI+X/2s1KD 7dpi9KrBd14CjpvoBxnXjGmB/M4t1T+LadsItXrd4obpLZajaCUamTmd2fQ7pBXYL2vF gBstXv8EW6MrodxxtzcdoRnY4XDHdBhDaO4O47IG8lFgKPget0ezXY+G6d+4wt7aibqa rlVcOVoqAcBrSafHPm5559+MF7c5FwcayBWXr4WH5Uhodlom9tpOG3PIwtlDcTIUvhzA o4tw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b="RUh/0jFC"; 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 h11si24278967pgv.163.2019.04.26.11.28.29; Fri, 26 Apr 2019 11:28:46 -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="RUh/0jFC"; 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 S1726252AbfDZS1D (ORCPT + 99 others); Fri, 26 Apr 2019 14:27:03 -0400 Received: from mail-pg1-f196.google.com ([209.85.215.196]:39595 "EHLO mail-pg1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726005AbfDZS1C (ORCPT ); Fri, 26 Apr 2019 14:27:02 -0400 Received: by mail-pg1-f196.google.com with SMTP id l18so2001371pgj.6; Fri, 26 Apr 2019 11:27:02 -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=JAjwuc39AddYOCTUpAuM9uE4idFBuger2xGgrN2miVE=; b=RUh/0jFCU1wSaTlGkPOqd9JdA1mmukszuCuzVJkC3yKTKpX/FKI5j482VscslFYIYP EkexQ7pIWzp1E83GR5ehEjLx3pPKqba7sJiRNU7AklOg9KENkctWngHvRLuVk2SY3c5W BymIkkjqUyQufNvjUluUg/nHstHXvcY61rCE0tTqeZlbrzS5cHe3dddJXf51tyHXa2G2 q38FwTamVd/Y/CU6hyUnW8uB2dKiY/co6apEdfxu0M9iaEavdRYwtfxVyDz1LeeZ7LqI vV1TPVQGXuTtN8qCxLLTCDpLXKPkZt1SERfM5MfV6OTCSKZuVEoDZV5nBc+2k4BYDemE U4Kw== 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=JAjwuc39AddYOCTUpAuM9uE4idFBuger2xGgrN2miVE=; b=ublt4NhcG8DAoqomnehQCPDHIerJkKQ55MBvz+e106uaVe8AIyGIyZkfJrVdgaoihL qjFBKqHimEkqFJRdX7dH7TyIsuyD4tpuzc/3uNrno7ooWJWbLnfnPTr55LdrXfd4Mllm xIIb4gwkSOdkBxBckFiSifTQayY1QXgDSN1xx2piN42w1v+cpPqkfPUNvKwbe0wg4xwW muNPMKpUqIE03zGnuvvpoXgY/wNvauANe8w8ogCVJXs1EULptIgBXAHWVmtHXgQoSo42 TEDhXWGdTiYHQpU1i7yGgb61eWUwWMKLH95Dey+GE9JmJEZonWTwE4RPC0RYdoRrZ2Rr 08aA== X-Gm-Message-State: APjAAAV8sEb6db1wmssjqdM0TeX7FxxUGYkPSUURx1sb2ZPhGXhF9fOx DLahH0Vuc5LUFuhIVc+wmhXpDTetHyQlCtRk5nw= X-Received: by 2002:a62:2603:: with SMTP id m3mr9679339pfm.232.1556303221827; Fri, 26 Apr 2019 11:27:01 -0700 (PDT) MIME-Version: 1.0 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> <20190426175237.GA31751@Mani-XPS-13-9360> In-Reply-To: <20190426175237.GA31751@Mani-XPS-13-9360> From: Andy Shevchenko Date: Fri, 26 Apr 2019 21:26:50 +0300 Message-ID: Subject: Re: [PATCH 2/2] gpio: sch: Add interrupt support To: Manivannan Sadhasivam 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" 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 On Fri, Apr 26, 2019 at 8:52 PM Manivannan Sadhasivam wrote: > 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 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. It can be easily broken by shuffling DT, kernel cnfiguration and adding some GPIO expanders. Note, no C-code mangling is involved. > > 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! -- With Best Regards, Andy Shevchenko