From patchwork Mon Aug 10 22:42:42 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniel Baluta X-Patchwork-Id: 6986871 Return-Path: X-Original-To: patchwork-linux-fsdevel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id A6CF49F4F5 for ; Mon, 10 Aug 2015 22:31:08 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id B75FB206B1 for ; Mon, 10 Aug 2015 22:31:07 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id B8E76205D6 for ; Mon, 10 Aug 2015 22:31:06 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933620AbbHJWas (ORCPT ); Mon, 10 Aug 2015 18:30:48 -0400 Received: from mail-wi0-f171.google.com ([209.85.212.171]:37541 "EHLO mail-wi0-f171.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932929AbbHJWam (ORCPT ); Mon, 10 Aug 2015 18:30:42 -0400 Received: by wibhh20 with SMTP id hh20so170080448wib.0; Mon, 10 Aug 2015 15:30:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references; bh=JScY0ABVY20Oxs8NTIfY3KcZEcubITbtBUEgWbmjINw=; b=D2aPqk1m9DbxORqNg6mVHA7yFSPMAndUPSXsvnshbJpB2mW+qCSIDHR+2GihCJznhy IWEZ/aeuA3Ym1wrrZbHwfJ99CTmam1jL5LMXX9HC5S1vvIvvUrEvz2vpq/Bd34Gm/Dgl DLVx0NwwDq+PYrpcKT128vri9z1OqQDaxKP5gGs75s+tw7/3fsV4ryrfb2deoyV3KuYA viUsSrGWJ4jNgay48x9AyqnXCuBc7ngWY2lUsOtQyo/xyOx6RPSuaLcnJuhpEBuu+mmy /KGCXqRIo63eBsNvymLcrb8FMwODDBtlvtYKLMBDr630Vaic9MdTz48BIWVoz7kFw9Rb QEEQ== X-Received: by 10.194.79.225 with SMTP id m1mr49017236wjx.8.1439245841094; Mon, 10 Aug 2015 15:30:41 -0700 (PDT) Received: from ixhome.ixhome ([109.96.190.235]) by smtp.gmail.com with ESMTPSA id bq7sm31485449wjc.31.2015.08.10.15.30.38 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 10 Aug 2015 15:30:39 -0700 (PDT) From: Daniel Baluta To: jic23@kernel.org, jlbec@evilplan.org, linux-iio@vger.kernel.org, linux-fsdevel@vger.kernel.org Cc: lars@metafoo.de, knaack.h@gmx.de, linux-kernel@vger.kernel.org, octavian.purdila@intel.com, pebolle@tiscali.nl, patrick.porlan@intel.com, adriana.reus@intel.com, constantin.musca@intel.com, marten@intuitiveaerial.com, daniel.baluta@intel.com, cristina.opriceana@gmail.com, pmeerw@pmeerw.net, hch@lst.de, viro@zeniv.linux.org.uk, akpm@linux-foundation.org Subject: [PATCH v7 5/5] iio: Documentation: Add IIO configfs documentation Date: Tue, 11 Aug 2015 01:42:42 +0300 Message-Id: <1439246562-17515-6-git-send-email-daniel.baluta@intel.com> X-Mailer: git-send-email 2.1.4 In-Reply-To: <1439246562-17515-1-git-send-email-daniel.baluta@intel.com> References: <1439246562-17515-1-git-send-email-daniel.baluta@intel.com> Sender: linux-fsdevel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-fsdevel@vger.kernel.org X-Spam-Status: No, score=-6.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI,RP_MATCHES_RCVD,T_DKIM_INVALID,UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Signed-off-by: Daniel Baluta --- Documentation/ABI/testing/configfs-iio | 20 ++++++++++++ Documentation/iio/iio_configfs.txt | 57 ++++++++++++++++++++++++++++++++++ 2 files changed, 77 insertions(+) create mode 100644 Documentation/ABI/testing/configfs-iio create mode 100644 Documentation/iio/iio_configfs.txt diff --git a/Documentation/ABI/testing/configfs-iio b/Documentation/ABI/testing/configfs-iio new file mode 100644 index 0000000..1fd7cf4 --- /dev/null +++ b/Documentation/ABI/testing/configfs-iio @@ -0,0 +1,20 @@ +What: /config/iio +Date: May 2015 +KernelVersion: 4.2 +Contact: linux-iio@vger.kernel.org +Description: + This represents Industrial IO configuration entry point + directory. It contains sub-groups corresponding to IIO + objects. + +What: /config/iio/triggers +Date: August 2015 +KernelVersion: 4.2 +Description: + Industrial IO software triggers directory. + +What: /config/iio/triggers/hrtimer +Date: August 2015 +KernelVersion: 4.2 +Description: + Industrial IO hrtimer based software triggers directory. diff --git a/Documentation/iio/iio_configfs.txt b/Documentation/iio/iio_configfs.txt new file mode 100644 index 0000000..7c56997 --- /dev/null +++ b/Documentation/iio/iio_configfs.txt @@ -0,0 +1,57 @@ +Industrial IIO configfs support + +1. Overview + +Configfs is a filesystem-based manager of kernel objects. IIO uses some +objects that could be easily configured using configfs (e.g.: devices, +triggers). + +See Documentation/filesystems/configfs/configfs.txt for more information +about how configfs works. + +2. Usage + +In order to use configfs support in IIO we need to select it at compile +time via CONFIG_IIO_CONFIGFS config option. + +Then, mount the configfs filesystem (usually under /config directory): + +$ mkdir /config +$ mount -t configfs none /config + +At this point, all default IIO groups will be created and can be accessed +under /config/iio. Next chapters will describe available IIO configuration +objects. + +3. Software triggers + +One of the IIO default configfs groups is the "triggers" groups. It is +automagically accessible when the configfs is mounted and can be found +under /config/iio/triggers. + +Software triggers are created under /config/iio/triggers directory. There +must exist an associated kernel module that implements a software trigger type. + +We support now the following software trigger types: + * hrtimer, uses high resolution timers as interrupt source implemened + by the iio-trig-hrtimer.c module. + +3.1 Software triggers creation and destruction + +As simply as: + +$ insmod iio-trig-hrtimer.ko +$ ls /config/triggers +hrtimer +$ mkdir /config/triggers/hrtimer/trig1 + +$ rmdir /config/triggers/hrtimer/trig1 +$ rmmod iio-trig-hrtimer + +Each trigger can have one or more attributes specific to the trigger type. + +3.2 "hrtimer" trigger types attributes + +"hrtimer" trigger type doesn't have any configurable attribute from /config dir, +but hrtimer triggers have the sampling_frequency attribute under /sys/bus/iio/devices/triggerX +directory.