From patchwork Mon Feb 3 13:40:27 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Matt Porter X-Patchwork-Id: 316156 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 9E7EF2C0089 for ; Tue, 4 Feb 2014 00:46:52 +1100 (EST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752152AbaBCNqw (ORCPT ); Mon, 3 Feb 2014 08:46:52 -0500 Received: from mail-ig0-f181.google.com ([209.85.213.181]:37918 "EHLO mail-ig0-f181.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750967AbaBCNqw (ORCPT ); Mon, 3 Feb 2014 08:46:52 -0500 Received: by mail-ig0-f181.google.com with SMTP id j1so4147622iga.2 for ; Mon, 03 Feb 2014 05:46:51 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=6b7jSdUFB7Wtvqi5Iv5PPIycUm/Cjbblx3Mk3N680c8=; b=Pho82hjjzMgeN8rHL/wslsVeM7BcVBOmqCsDyOurfrWdJjinSDK6aoACadXn6v7gSj EzIWNhfRNRxoPrJ1QrtHQDynmylhI98/3F2fhx2ocuj7AVNosY6gT1bv5W4AmwJibSNF R9igRGEMwlpn9VGVK6tuQjidbMCtdtU6l+oJ5bNsvIl7cuVsTZ/riwUbzlys47kQEmY+ gPtMD1La8lcca9U39RFzpkVRVCzYTLeuTC8VRlfvrfIBUSa4qH6cBqv8+K+Y+nihJErS 4AN2hQRHo9UTSK6dJIpXb7PhPG6FkqhvFjh7wo2W5voZlpCBsYEz/0j26USiJzOd1Gf6 93RQ== X-Gm-Message-State: ALoCoQnoOrC7QO4x83n9/9S1gRgY5GYf+BYeT+JCbTHS4A0PR8zcPQpiKeIdNtqtMlg/OZXnpIoR X-Received: by 10.42.144.201 with SMTP id c9mr26033963icv.16.1391434840345; Mon, 03 Feb 2014 05:40:40 -0800 (PST) Received: from beef.ohporter.com (cpe-98-27-254-98.neo.res.rr.com. [98.27.254.98]) by mx.google.com with ESMTPSA id x13sm30698560igp.2.2014.02.03.05.40.39 for (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 03 Feb 2014 05:40:39 -0800 (PST) From: Matt Porter To: Jonathan Cameron , Grant Likely , Rob Herring , =?UTF-8?q?Beno=C3=AEt=20Cousson?= , Tony Lindgren , Pawel Moll , Mark Rutland , Ian Campbell , Kumar Gala , Thierry Reding Cc: Linux IIO List , Linux Kernel Mailing List , Devicetree List , Linux PWM List , Linux OMAP List , Linux ARM Kernel List Subject: [PATCH v2 1/6] iio: add support for pulse width capture devices Date: Mon, 3 Feb 2014 08:40:27 -0500 Message-Id: <1391434832-23807-2-git-send-email-mporter@linaro.org> X-Mailer: git-send-email 1.8.4 In-Reply-To: <1391434832-23807-1-git-send-email-mporter@linaro.org> References: <1391434832-23807-1-git-send-email-mporter@linaro.org> Sender: linux-pwm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pwm@vger.kernel.org Add a channel type to support pulse width capture devices. These devices capture the timing of a PWM signal based on a configurable trigger Signed-off-by: Matt Porter --- drivers/iio/industrialio-core.c | 1 + include/linux/iio/types.h | 1 + 2 files changed, 2 insertions(+) diff --git a/drivers/iio/industrialio-core.c b/drivers/iio/industrialio-core.c index acc911a..6ea0cf8 100644 --- a/drivers/iio/industrialio-core.c +++ b/drivers/iio/industrialio-core.c @@ -70,6 +70,7 @@ static const char * const iio_chan_type_name_spec[] = { [IIO_CCT] = "cct", [IIO_PRESSURE] = "pressure", [IIO_HUMIDITYRELATIVE] = "humidityrelative", + [IIO_PULSE] = "pulse", }; static const char * const iio_modifier_names[] = { diff --git a/include/linux/iio/types.h b/include/linux/iio/types.h index 084d882..4fa8840 100644 --- a/include/linux/iio/types.h +++ b/include/linux/iio/types.h @@ -30,6 +30,7 @@ enum iio_chan_type { IIO_CCT, IIO_PRESSURE, IIO_HUMIDITYRELATIVE, + IIO_PULSE, }; enum iio_modifier {