Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp900619yba; Fri, 26 Apr 2019 10:36:20 -0700 (PDT) X-Google-Smtp-Source: APXvYqx8+rw5P5QjevJbaAhHksBgemiL/IMR5lRAvO7OBZ6f9GvHANhmvmY+7fDumEj5qK95/Dl2 X-Received: by 2002:a63:5511:: with SMTP id j17mr45204903pgb.449.1556300180265; Fri, 26 Apr 2019 10:36:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1556300180; cv=none; d=google.com; s=arc-20160816; b=pbBCMK5WnwH5FNaoJ54TXqmTHjY5X7syuvE4siVWZELaxlZfsZurWi4WgHhtvsCcRb z8tU9I02nfHYxtyzn6Dl17hHgeLIFaiEcXrOwuJ/2p2isEKOkeVdaSWM3Xjk0rEau3nj dQ7XXXPsHPWcTftC2mqGJOwC7WIx3bK9JMyWj7XCl4pOzgz4kxnz79Pj3CId8mf2uvlh CuqJgGrrUch+4W31n/6czELssoTkRP1ZhJSH+6yUuSEp1OI2WaoSEelPa4s5EEzOVBhQ PE4EVLFld3bN6osu4imdgzJczzfEijWpTeglJx3SqsyIFXALzY21fUmE6TSbVT0Ii6Ky k5wA== 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=Sm+6PV4qO4p3LMjzPSC4UvyriaxOjRBgjPP0hAT2ZFY=; b=WEEazkwvuTsHoKDhPWoamY5Mbgfnvjg6Jihi4YVEXuDFN0ovrEMY36laY/9+M/18or CbEvdu9aBjeBImnWKC6YUJgVLCNvE7/wRvjyZbe9VZw2wvSrPNnFid4kbZNZee3Cf2WW ULsSZHpjNhq3777JUfzEDrwcfCYrS3IV3HoVC5VlkhcmdEkIOpqdHPcteU577Zo4ueZ7 OMWnkpgY30416sygRozsbxdUiQ7BBHvMid0uj4gUu5vzovmKHga+zMIOd91FfL25+DCR nmNMgwwXd07YQ1FvBfgqGMODc5eVkwoEOUUgaQHuYRecz6iuweIU6rzNg5s1a+gZjDzf bP6Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=ftY3v4mb; 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 cl9si1278766plb.368.2019.04.26.10.36.05; Fri, 26 Apr 2019 10:36:20 -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=ftY3v4mb; 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 S1726363AbfDZRdl (ORCPT + 99 others); Fri, 26 Apr 2019 13:33:41 -0400 Received: from mail-pg1-f195.google.com ([209.85.215.195]:42519 "EHLO mail-pg1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726266AbfDZRdk (ORCPT ); Fri, 26 Apr 2019 13:33:40 -0400 Received: by mail-pg1-f195.google.com with SMTP id p6so1933503pgh.9 for ; Fri, 26 Apr 2019 10:33:40 -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=Sm+6PV4qO4p3LMjzPSC4UvyriaxOjRBgjPP0hAT2ZFY=; b=ftY3v4mbU2gilH9hxC/R1Ti+xcNKo+fPZWt9wNLIc5HMQfJBzl5s4Qjesgm/vjiJ6f JAdHADTAB+BqIJFjD908ybVDA1O8fvoz2hYen4s2gAiEdX4mBEmukzhs1VqOOkN7/irD YiDmUPUofIdHhKF3UCKu1vJ2hbUC8oSkn/qUfCHh+pSqCVFvprfsHTINFh2nSRyzw2Pt MHkWb/qosVNJ57CTKSyzJWQnS2VMQPZLtpRUDu1zhtSjn6V5YWGFHbKqfyHCsHO+pU55 4UbnPJmlHX5lv4dNMN+S+20kztWt3ylOubCS56TCyM2WXl7b0fGHWk5fBDet6N1AQK7z g+qg== 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=Sm+6PV4qO4p3LMjzPSC4UvyriaxOjRBgjPP0hAT2ZFY=; b=k83hVVNb/mYJU7P9Pp5lBWe4JqrbUTf8cUAWelPOLA90FA+LglzrPZ8LvYETFN6ahE ycr3yS+QWrxCXJ33shkzaeWAafr3QZcmdEp4YqjWbmLiUl2oFrpyHJzghBQ08QdGkBsH ACsVfw/7FFfU2hwCYMzV05YWFZv8m9G3jQ1CI3SoO5ElKWTr3L9O5eLAwB/utK90Zxc4 P0E7wn19KrgDk1V/Edd953fQlK8oEnvzvvQ8RhiHYRfML3oAdIw2nJKW0wQ1KQlYbhgX XnQMEEeMhnhNZnZ9dgzA3JZMzAt6Z+M9Ptem1iUJGzDNk+F4wqf9Y8zdqOK++dqeFjTP XgnA== X-Gm-Message-State: APjAAAXoVSUWrcii6Y5CGzjOZ98g8A7kpxUzRK4LS6OkzClRFPgpDdzW 1jaBauYzOtsqcYx/RfqsFGoh X-Received: by 2002:a65:6688:: with SMTP id b8mr22690428pgw.81.1556300019817; Fri, 26 Apr 2019 10:33:39 -0700 (PDT) Received: from Mani-XPS-13-9360 ([2405:204:72c4:4b94:e0ad:83b0:3987:aa05]) by smtp.gmail.com with ESMTPSA id b2sm7006416pff.63.2019.04.26.10.33.32 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Fri, 26 Apr 2019 10:33:38 -0700 (PDT) Date: Fri, 26 Apr 2019 23:03:29 +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: <20190426173329.GA31161@Mani-XPS-13-9360> References: <292e6eff-82cc-6e4d-925b-77a60399e2e0@siemens.com> <20190424100130.GB2654@lahna.fi.intel.com> <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> 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: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: > > > > > >> At the same time, there are no real alternatives - to my> knowledge - for the value it brings (various bindings) to simply > > > switch> the engine. > > > Which value exactly does that collection of crude wrappers and broken > > > attempts to buypass the kernel (driving gpios via /dev/mem *facepalm*) > > > provide ? > > > > Leaving that blunt hack aside: > > > > import mraa > > > > pin = mraa.Gpio(13) > > pin.dir(mraa.DIR_OUT) > > pin.write(1) > > > > And the same goes for nodejs, java and c++. > > > > Moreover, this allows you to abstract away where "Pin 13" actually came from on > > that board if the kernel changes (BSP -> upstream...) or the extension board or > > ... > > 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. 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. Thanks, Mani [1] https://github.com/intel-iot-devkit/mraa/blob/master/src/arm/96boards.c#L75 > -- > With Best Regards, > Andy Shevchenko