Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp886964yba; Fri, 26 Apr 2019 10:22:11 -0700 (PDT) X-Google-Smtp-Source: APXvYqz9yixBZEx8f+NOB21GYGQfEwm7zaS2c5ZPrmhwUcJ0LRMHNxzZ2ZKCCPNgJT0XGxsrb+UG X-Received: by 2002:a63:4714:: with SMTP id u20mr36018141pga.316.1556299331768; Fri, 26 Apr 2019 10:22:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1556299331; cv=none; d=google.com; s=arc-20160816; b=q5pgKKVDg/gRAFvyq7GCsEEF8D3IzFomDZjzH9AGinlXTbIwSL5C92ARK0HTKKKvri kYtrsb/lwN71wh7/H76EpD4qxAlr39bZlHFoiYu8/KJURbcBGX9RQhdJALTX3/X2V+rb kHnAZW6qhsEc7CwSFn/IDW6zhxnYlU5lyDOKuboIrPXZUNVdePDCCiYWlphHKrlHbN4K Vj0yfM/XQE7kT6Hs1NahAL78UB1oTysfqMeNmzKok1sDu0lvXCcXpaAVXGShXyrdedhS 5YG8VQH0h6iQLDiCbu/7Z+puPqPEev8dxYylQ0HLxss0ysVu4cz4M4qDXU4sgqZNyn4g hT7w== 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=h2E3HbEpFJ9TF3Qp8QLs00zx9lZn0VxKpo3ZihlPSxA=; b=0NDqSzB2t7MdDcNGWuP1tjdKxxFN0mSovkGBPDMosc7fnB4chPjNYws3IqQxM/gA9D Se/5eIrHg7AJbmgYFebfFlnZ3vLj7lSeOm8IFMoOaOOYg+DluTh7VtptIJwnoFS392Wq fYCoQCAV4jvTT8e5gBd3qGviPU+wvo2FZgfm7T5gmN923IriUXLc0+gYhpuLe91b1kCf YMeCFVngNSIT1wDb4pC8VWj/WaUVY0Izjx7m/ypuvn5KMGsLH3ADAE3RCbHyF/zAePwO WWBjoZhkB7Yq75IkHeB3jRMBfOLWO5H028z6OWsGvQ0pRUKpKGlGrMaS5NqWY3nzjSbm VIgA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=kAFc1wCq; 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 1si25984329ply.311.2019.04.26.10.21.55; Fri, 26 Apr 2019 10:22:11 -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=kAFc1wCq; 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 S1726354AbfDZRUc (ORCPT + 99 others); Fri, 26 Apr 2019 13:20:32 -0400 Received: from mail-pg1-f193.google.com ([209.85.215.193]:43397 "EHLO mail-pg1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725944AbfDZRUb (ORCPT ); Fri, 26 Apr 2019 13:20:31 -0400 Received: by mail-pg1-f193.google.com with SMTP id z9so1917844pgu.10; Fri, 26 Apr 2019 10:20:31 -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=h2E3HbEpFJ9TF3Qp8QLs00zx9lZn0VxKpo3ZihlPSxA=; b=kAFc1wCqt4MRRp4fcdgHNsFNoKT9ZKXy98BJTJ9vfaYedQs/8C3mf3aHZdBDY60xEj WSG30L1xtuGnWYHglOTMpQkpPMjll7Hol6HOHN37YpJEIeAWNlznzHRF/Mp0WHaYb1IB mJOeSAmI3lUgxlbgYweG2Cq5TYlDhKTfV0Ps/IS2yFXGRA3PZMa81n8RNz0toHofZ6VQ mMJLdQ7KK3BBAAOL396kvbpiMWf011s2+/f+XrV9VLcKgH1cADT7WFcMm7eCI5jKlLO1 J8Azks95DJUrvW9eqj2sYELacqYgkGNr0OmFwQfvjvWbNT3UwGlq5aABuGYRnyuUgG1f FeSQ== 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=h2E3HbEpFJ9TF3Qp8QLs00zx9lZn0VxKpo3ZihlPSxA=; b=aB6ZQyarK89keV7bqz4RC15QAOWo3Ku9or1mgsWwrkV2h3nE52uSWDeng2zkILDoko X0t6f0qbdH3w1+fLJa7vZyOqqn2p1FUPPywzlmStXfq0qStsidSUsV+YSHOhP43ZMILJ MF6rIcplR3aKIfrBhBhNVwKpU6sgCKnd0GozQy0V+z3KUBcQtru2HdHqQk78pj6P8R3+ c2k0oQtlJR7xKx41kJ1fc4EktVUtIr0L+I6nkO4nDfOSgqHTamfWdfigr02N3aDeoC8M wqiI/NMiMkJL/BtahLICM0HmPnsISk30DoGoZp9UpNd3fysXeB9v4FkXFpgjU53dH7gk shyg== X-Gm-Message-State: APjAAAWNKuUz7aDEaOVc0m0TRc24eNMQmP7RSlhPk6VdMESFEglcHKFh qdxvq+mfWwYMQONMTMRlGL5Acr1ew2uevj9Zv1tzAcTex2Tc6g== X-Received: by 2002:a63:8e4b:: with SMTP id k72mr1479457pge.428.1556299230822; Fri, 26 Apr 2019 10:20:30 -0700 (PDT) MIME-Version: 1.0 References: <20190424081802.GV2654@lahna.fi.intel.com> <5a28f22c-22f7-760a-d076-68ff19800d44@siemens.com> <20190424084259.GW2654@lahna.fi.intel.com> <7e328b7e-f4f0-851a-4152-a9ffd058201c@siemens.com> <20190424094506.GA2654@lahna.fi.intel.com> <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> In-Reply-To: <2f3da791-4a10-c2c4-dc5a-22ad16ed7be6@siemens.com> From: Andy Shevchenko Date: Fri, 26 Apr 2019 20:20:19 +0300 Message-ID: Subject: Re: [PATCH 2/2] gpio: sch: Add interrupt support To: Jan Kiszka Cc: "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 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 -- With Best Regards, Andy Shevchenko