Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp1464725pxk; Fri, 4 Sep 2020 09:59:24 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwCcWLdAhQ29HQjMx2YU4Msgw3BVk4UY0CLavhaB4784UXceDmfSUSuaRFeMmB6zP5dUcay X-Received: by 2002:a17:906:8690:: with SMTP id g16mr8187522ejx.187.1599238764000; Fri, 04 Sep 2020 09:59:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1599238763; cv=none; d=google.com; s=arc-20160816; b=t2Cszf4vhnOPnmfNugYhobi6a1sgqrY3hiLQY/uvx6ttbjaaFO2cd2Zit4rzFkHab7 FIgnkEZ2try5xji5VzPrkIr5V36bP7+3p7klnI3a1Ff8l7AniX38lWi07UZCv9gfEmlu whsW05cGJobevbi0dmHG/pmqixdKl4LMEQh4/BaQytNF7EoU/xuRNtMqLaHEF4bMZCa+ 4f5X9VXE/ihxyXWBRVmcolhbY/Jl5ypYNOcnvGuWVNPeS9LkISxwvMw2FErn6me5ixOE HLrG03lhkT1Ek+Ky5HS4BdCG+OIxNU42L8GX5mETbMUHphyOTV6ks4Tkb+WX60daZ1sY mCnA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:organization:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:ironport-sdr:ironport-sdr; bh=s9w3877EhGfEzo1nml2iJAr0XOupci9E38RFGapj2rw=; b=HAK4mfnjXG9Ji0/xb86TWCurBwhVbZxux+99YVvsK7u/SzG8q9pI5BjRgw0nQZ1IuO +ARqNhGfjm3+wjZ0XD/rq65JVOFqBOYlZv5GZ99RINNP/TGTs6QE+/bjrzSO9+mpYGve AjkHD6WHx8SX03lDJPmFqZGSKOgFIy+UxW7g7ZUJatA3gEkpTTgf9pXOsWXi2DU+NqdR 5SJ07tXWuCqQp8zDryGIwDz88e/c2XYpIbgjif//fB1glkuObVAm7un/h6/0pJ6JpSQa v3IgpPsMLrX3WHDc6aD/coQusixE7RJ83FeembU3lPHcBPOEUEY0Ax4NnRTj7s7xqTw8 fTcg== ARC-Authentication-Results: i=1; mx.google.com; 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id a7si4476798ejd.422.2020.09.04.09.59.00; Fri, 04 Sep 2020 09:59: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; 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726900AbgIDQ6Y (ORCPT + 99 others); Fri, 4 Sep 2020 12:58:24 -0400 Received: from mga12.intel.com ([192.55.52.136]:24022 "EHLO mga12.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725966AbgIDQ6X (ORCPT ); Fri, 4 Sep 2020 12:58:23 -0400 IronPort-SDR: tatuHcS13egl3yMQnSDNoVHfGTO89+Qc1/ov3jcoVv/pj2pfErKyLj+PpZOR+7FeZweptN4IS6 87jzFKEszLAg== X-IronPort-AV: E=McAfee;i="6000,8403,9734"; a="137306594" X-IronPort-AV: E=Sophos;i="5.76,390,1592895600"; d="scan'208";a="137306594" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga008.jf.intel.com ([10.7.209.65]) by fmsmga106.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 04 Sep 2020 09:58:22 -0700 IronPort-SDR: fvIQqyvpT+8yq4ky+Ofmsp7u5g5tPOzdE5X3ikAlRFUuNGZ4MVaa4Sjn5kvRR59sGSJ9/RIvfD tYSes7oXVgVA== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.76,390,1592895600"; d="scan'208";a="332221166" Received: from smile.fi.intel.com (HELO smile) ([10.237.68.40]) by orsmga008.jf.intel.com with ESMTP; 04 Sep 2020 09:58:19 -0700 Received: from andy by smile with local (Exim 4.94) (envelope-from ) id 1kEF2W-00EKWv-Rn; Fri, 04 Sep 2020 19:58:16 +0300 Date: Fri, 4 Sep 2020 19:58:16 +0300 From: Andy Shevchenko To: Bartosz Golaszewski Cc: Linus Walleij , Jonathan Corbet , Mika Westerberg , Kent Gibson , linux-gpio@vger.kernel.org, linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, linux-acpi@vger.kernel.org, Bartosz Golaszewski Subject: Re: [PATCH 23/23] Documentation: gpio: add documentation for gpio-mockup Message-ID: <20200904165816.GF1891694@smile.fi.intel.com> References: <20200904154547.3836-1-brgl@bgdev.pl> <20200904154547.3836-24-brgl@bgdev.pl> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200904154547.3836-24-brgl@bgdev.pl> Organization: Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Sep 04, 2020 at 05:45:47PM +0200, Bartosz Golaszewski wrote: > From: Bartosz Golaszewski > > There's some documentation for gpio-mockup's debugfs interface in the > driver's source but it's not much. Add proper documentation for this > testing module. I always for the documentation! > Signed-off-by: Bartosz Golaszewski > --- > .../admin-guide/gpio/gpio-mockup.rst | 87 +++++++++++++++++++ > 1 file changed, 87 insertions(+) > create mode 100644 Documentation/admin-guide/gpio/gpio-mockup.rst > > diff --git a/Documentation/admin-guide/gpio/gpio-mockup.rst b/Documentation/admin-guide/gpio/gpio-mockup.rst > new file mode 100644 > index 000000000000..1d452ee55f8d > --- /dev/null > +++ b/Documentation/admin-guide/gpio/gpio-mockup.rst > @@ -0,0 +1,87 @@ > +.. SPDX-License-Identifier: GPL-2.0-only > + > +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. > + > +Creating simulated chips using debugfs > +-------------------------------------- > + > +When the gpio-mockup module is loaded (or builtin) it creates its own directory > +in debugfs. Assuming debugfs is mounted at /sys/kernel/debug/, the directory > +will be located at /sys/kernel/debug/gpio-mockup/. Inside this directory there > +are two attributes: new_device and delete_device. > + > +New chips can be created by writing a single line containing a number of > +options to "new_device". For example: > + > +.. code-block:: sh > + > + $ echo "label=my-mockup num_lines=4 named_lines" > /sys/kernel/debug/gpio-mockup/new_device > + > +Supported options: > + > + num_lines= - number of GPIO lines to expose > + > + label=