From patchwork Wed Jan 29 20:59:55 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Matt Porter X-Patchwork-Id: 3554571 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id ABE0EC02DC for ; Wed, 29 Jan 2014 21:01:28 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id E7B9C201BB for ; Wed, 29 Jan 2014 21:01:27 +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 EA589201B9 for ; Wed, 29 Jan 2014 21:01:26 +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 1W8cFq-0006wS-7X; Wed, 29 Jan 2014 21:01:02 +0000 Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1W8cFh-0001Dp-MM; Wed, 29 Jan 2014 21:00:53 +0000 Received: from mail-ie0-f177.google.com ([209.85.223.177]) by merlin.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1W8cFN-00019R-Vf for linux-arm-kernel@lists.infradead.org; Wed, 29 Jan 2014 21:00:36 +0000 Received: by mail-ie0-f177.google.com with SMTP id at1so2628490iec.22 for ; Wed, 29 Jan 2014 13:00:13 -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=KUD9jdE8SsNJlcbV5TIiu2zlk5u0Znz/GxfnLC0D6EBcBlKSaotSLYmr3l0CwXMR5l 283tZM3kqMVryqhEgGr35dcKuB614blpe5iJvZAbPGjwDzBaX4Tz43i/OWOm44sUB28R 44/CPije+zxaeTFOqwjm3xCMQUYOYe+Qa87sKDXlc/qH+DN5/q5PFCzzQ1NvTmd0vrWC Zv0QF4Qrll3+L53Wh+DTafipPKkwGufnyp5ZEL8VirK+hMMfz1kQY+R3brQAegxBWXT7 7FUuYBg+F+XOlywrFDHAIKZ8TvNz5cUiwqUTQHBSmZ6BeUnZOy7oK+LayqQrrfu9FEow 0qKA== X-Gm-Message-State: ALoCoQkLR6drhni5uURj1iRqN9JOjT5SOcSvkIW1+2DKh/rRynr8S/Q1B4N2z5chNr02muSuFrfu X-Received: by 10.50.61.234 with SMTP id t10mr10754581igr.32.1391029211913; Wed, 29 Jan 2014 13:00:11 -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 ni8sm71723595igb.7.2014.01.29.13.00.10 for (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 29 Jan 2014 13:00:11 -0800 (PST) From: Matt Porter To: Jonathan Cameron , Grant Likely , Rob Herring , Benoit Cousson , Tony Lindgren , Pawel Moll , Mark Rutland , Ian Campbell , Kumar Gala , Thierry Reding Subject: [PATCH 1/5] iio: add support for pulse width capture devices Date: Wed, 29 Jan 2014 15:59:55 -0500 Message-Id: <1391029199-3670-2-git-send-email-mporter@linaro.org> X-Mailer: git-send-email 1.8.4 In-Reply-To: <1391029199-3670-1-git-send-email-mporter@linaro.org> References: <1391029199-3670-1-git-send-email-mporter@linaro.org> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20140129_160034_094918_25418A0E X-CRM114-Status: GOOD ( 12.02 ) X-Spam-Score: -2.6 (--) Cc: Devicetree List , linux-pwm@vger.kernel.org, linux-iio@vger.kernel.org, Linaro Patches , 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 {