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: 3569411 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 2A3529F382 for ; Mon, 3 Feb 2014 13:41:36 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 70FA020176 for ; Mon, 3 Feb 2014 13:41:35 +0000 (UTC) Received: from casper.infradead.org (casper.infradead.org [85.118.1.10]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 8B5D420172 for ; Mon, 3 Feb 2014 13:41:34 +0000 (UTC) Received: from merlin.infradead.org ([2001:4978:20e::2]) by casper.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1WAJls-0008Ab-5e; Mon, 03 Feb 2014 13:41:08 +0000 Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1WAJlp-0000is-B0; Mon, 03 Feb 2014 13:41:05 +0000 Received: from mail-ig0-f173.google.com ([209.85.213.173]) by merlin.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1WAJlm-0000hh-82 for linux-arm-kernel@lists.infradead.org; Mon, 03 Feb 2014 13:41:02 +0000 Received: by mail-ig0-f173.google.com with SMTP id c10so4127149igq.0 for ; Mon, 03 Feb 2014 05:40:40 -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=GCeS2CR1rpffKlVulSQ/i2G8haO4A9nnB0RBfPHzDP+WcO19TQADqjN60PgvkwdTS/ anzqr0SCKC6+9VLJdRsvLBuAFnR12ihl6QYwXoVzUZuYH8CTyLqN8DCNRHI0hq4o9oQd 2Em/zXF95dnbq3co5Id2t7YXr8cb6ZQ7f62bAoYb72F7rsRUAsbaBgWKxxq8K4h4Qt4l I3/KBcKPqKf8BFbpf8zYtB0SW71IrvpFnWwbQyY0xFVoemE4NLuBB68dC7AewumXMj4m Ndrw0WmjQezEekeNh0EWwh006G4J2NiIoN+m70PQD1koI++qclQNWsMlh2JOLjaOuZ3q dPIA== X-Gm-Message-State: ALoCoQnTVLZPEailxNiDWuvMmXXDNRh33JDlSAYlMV8I13LOaDCv12kkMG28hp3lBDKEDQBg9ioe 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 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> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20140203_084102_320858_09ED5AEE X-CRM114-Status: GOOD ( 12.11 ) X-Spam-Score: -2.6 (--) Cc: Devicetree List , Linux PWM List , Linux IIO List , Linux Kernel Mailing List , Linux OMAP List , Linux ARM Kernel List X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Spam-Status: No, score=-4.7 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, RP_MATCHES_RCVD, 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 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 {