Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp3190849pxk; Mon, 7 Sep 2020 06:01:23 -0700 (PDT) X-Google-Smtp-Source: ABdhPJymLFAuwoTyN3YQL8Tw3H8MsWsBN1HskOqtv3ySptuX7sqmq2EO2TZAP0zQh2UUsX7tUlQw X-Received: by 2002:a17:906:fb8f:: with SMTP id lr15mr19643474ejb.25.1599483683034; Mon, 07 Sep 2020 06:01:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1599483683; cv=none; d=google.com; s=arc-20160816; b=sA82r020uvYObs8/oH1SctmhU1MLQ7phb5NFx0jBkLOfvzy38GeVg8ANHgTx7uyK9x 6fBPSUR7w2fsaUbc0l5p09gfzHYtWskFbwaowfxTv/SL0VvWonP356YweZN2PHgkSd5J 31aODpfh3jRsme+8twPKIOT9oJ+pOcoqZNsaCRbjnLA5cgu4n06/8svI6DXUD8xQLhs4 fJVBMNMmi7OeHWhkgnU56mRPooDwBdfQq3tqe2c0WzXwbPfDMVPjTIVSmWrEnu0/BjBN 53e/hrmkHg4mbLibBl1wzKjYRVs3jqxCI47G/jruo9nWNiVPHFt+92T0sVzhEqPBPYMx Yo6Q== 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=YucY+gKGhRi1ywbzRpYu6vJHZlJfD5eC4RFNZlM+vEU=; b=ByJwwOytz3hOhno79xlq6z/Mq2dK7V06JgOiuQAiNVNULya0XYQCQfQVYkIXjWR5pB mkNwueI9FdtitfCWs6qtQAR7snDvR70XQfMfiZAGKTuPGSGOCxzMRqMlnRGDO95tqE3M /EMFS1KLYPACDMSulNGR860H2DfZeHY7r5WjZfKaDMZifgHouAjPPFDfF99piyh6mBvq mzBNdpUjxMZ0LJbrxHB/AFRq2vaPrwtZe+xyOEzhkAgUvKOPDOKaHcTYhW6a/44LqT4k bWWHy7qvSBjsz+EXqd15JhmXSgbDUEvduG753c93KFDom73Qbp9fMLwYfY0y5XnEbXcT ryBg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@baylibre-com.20150623.gappssmtp.com header.s=20150623 header.b=1DzPBq8Q; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id gh1si3323553ejb.604.2020.09.07.06.01.00; Mon, 07 Sep 2020 06:01:23 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@baylibre-com.20150623.gappssmtp.com header.s=20150623 header.b=1DzPBq8Q; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729273AbgIGM7J (ORCPT + 99 others); Mon, 7 Sep 2020 08:59:09 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57198 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729368AbgIGM5m (ORCPT ); Mon, 7 Sep 2020 08:57:42 -0400 Received: from mail-ej1-x643.google.com (mail-ej1-x643.google.com [IPv6:2a00:1450:4864:20::643]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0F926C061755 for ; Mon, 7 Sep 2020 05:57:42 -0700 (PDT) Received: by mail-ej1-x643.google.com with SMTP id a26so18147829ejc.2 for ; Mon, 07 Sep 2020 05:57:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=YucY+gKGhRi1ywbzRpYu6vJHZlJfD5eC4RFNZlM+vEU=; b=1DzPBq8QjNiAQmlUVLnJE9yHuQ5x3n8G/vy0ZHLOXkG6W/kp2qThs+PrIcQgSO+DLl Mtr+mRX9iTNI1t3koKVQTf3UTcrsvsBk9AQUu3frC/lANh5EF5ujvpUOLRLLLbN02Fv/ Ejg2Mv8zLuigka+OAZV8Em2LcGiq60oOD0K3R9TgkVbTkWwRtngnyPew7C504FOK/kxt a0SLzOflYvfHL/WwdZELsw3cyyzQudmNHsXJhRnvJ4MUojJze58ec0y4c3+/cLTceGGq AU2p5RCEC7tkzqvI4yVyeEh229yaW3rpoEmpZeqzfMcDpv7V3rMCkYHNJJJvwbEMmkwA foZg== 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=YucY+gKGhRi1ywbzRpYu6vJHZlJfD5eC4RFNZlM+vEU=; b=Ok5IryuW+Iq8dO+NPAuwveTgrjSVV/Lk0A2U1R5kIB0zueyOsl4sLOH3KxeC+cihfN 6ZkcUtWFY/YRh++mCFYzhLmaH/EDG8pCK+jWVpu7g2VLFORqkTbW39TC59JjpGFkohPx rpgsULWQxWSX2CbA94+VqIdA5LzoE+5AxROf1vJTwrhMK0IegG1GGvpYrL3ysxA4FAl8 83+uA22Uky9+Npm0JWmtiSab38hcfSVRKzFdt0cu+Nph7TOO6wQI7k2xW8Tp55lAnKhv qWnpMZoVhAuEHV5ArOJVR7uYN19Sy7RGu5oUeOaBDtWNgdevbFEVT/4DqCA0PNAQIAcA Xmgw== X-Gm-Message-State: AOAM533MfecMmjtG7UXdKylLLngt/BWZBY+dvLxQsweahf2OfVW2WZT7 qFa/l+S/tMRtnDs1FvQMUvkagLO+oJoOYCU4/7Rfew== X-Received: by 2002:a17:906:19db:: with SMTP id h27mr19207447ejd.154.1599483460603; Mon, 07 Sep 2020 05:57:40 -0700 (PDT) MIME-Version: 1.0 References: <20200904154547.3836-1-brgl@bgdev.pl> <20200904154547.3836-24-brgl@bgdev.pl> <26ea1683-da8f-30e7-f004-3616e96d56b3@infradead.org> <20200907095932.GU1891694@smile.fi.intel.com> <20200907115310.GA1891694@smile.fi.intel.com> <20200907123837.GG1891694@smile.fi.intel.com> In-Reply-To: <20200907123837.GG1891694@smile.fi.intel.com> From: Bartosz Golaszewski Date: Mon, 7 Sep 2020 14:57:29 +0200 Message-ID: Subject: Re: [PATCH 23/23] Documentation: gpio: add documentation for gpio-mockup To: Andy Shevchenko Cc: Randy Dunlap , Bartosz Golaszewski , Linus Walleij , Jonathan Corbet , Mika Westerberg , Kent Gibson , linux-gpio , linux-doc , LKML , ACPI Devel Maling List , Greg Kroah-Hartman 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 Mon, Sep 7, 2020 at 2:38 PM Andy Shevchenko wrote: > > On Mon, Sep 07, 2020 at 02:06:15PM +0200, Bartosz Golaszewski wrote: > > On Mon, Sep 7, 2020 at 1:53 PM Andy Shevchenko > > wrote: > > > On Mon, Sep 07, 2020 at 12:26:34PM +0200, Bartosz Golaszewski wrote: > > > > On Mon, Sep 7, 2020 at 11:59 AM Andy Shevchenko > > > > wrote: > > > > > On Fri, Sep 04, 2020 at 08:15:59PM -0700, Randy Dunlap wrote: > > > > > > On 9/4/20 8:45 AM, Bartosz Golaszewski wrote: > > ... > > > > > > > > +GPIO Testing Driver > > > > > > > +=================== > > > > > > > + > > > > > > > +The GPIO Testing Driver (gpio-mockup) provides a way to create simulated GPIO > > > > > > > +chips for testing purposes. There are two ways of configuring the chips exposed > > > > > > > +by the module. The lines can be accessed using the standard GPIO character > > > > > > > +device interface as well as manipulated using the dedicated debugfs directory > > > > > > > +structure. > > > > > > > > > > > > Could configfs be used for this instead of debugfs? > > > > > > debugfs is ad hoc. > > > > > > > > > > Actually sounds like a good idea. > > > > > > > > > > > > > Well, then we can go on and write an entirely new mockup driver > > > > (ditching module params and dropping any backwards compatibility) > > > > because we're already using debugfs for line values. > > > > > > > > How would we pass the device properties to configfs created GPIO chips > > > > anyway? Devices seem to only be created using mkdir. Am I missing > > > > something? > > > > > > Same way how USB composite works, no? > > > > > > > OK, so create a new chip directory in configfs, configure it using > > some defined configfs attributes and then finally instantiate it from > > sysfs? > > > > Makes sense and is probably the right way to go. Now the question is: > > is it fine to just entirely remove the previous gpio-mockup? > > Since, for example, I never saw device property bindings for that driver I > assume that it was never considered as an ABI, so feel free to hack it in > either direction. > > > Should we > > keep some backwards compatibility? > > I wouldn't probably spend time on this. > > > Should we introduce an entirely new > > module and have a transition period before removing previous > > gpio-mockup? > > Neither transition period. > I wouldn't rush this actually. gpio-mockup is used a lot by libgpiod and probably by Kent's Go library. My main goal with this series is to extend it to allow for more advanced testing like simulating spurious irqs to test the software debouncer or custom line name formats to test name lookups. I need to think about it some more. An entirely new configfs interface would take time too. Bart