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: 315218 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 8E4CA2C00D1 for ; Thu, 30 Jan 2014 08:00:16 +1100 (EST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752275AbaA2VAO (ORCPT ); Wed, 29 Jan 2014 16:00:14 -0500 Received: from mail-ig0-f176.google.com ([209.85.213.176]:54802 "EHLO mail-ig0-f176.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752138AbaA2VAM (ORCPT ); Wed, 29 Jan 2014 16:00:12 -0500 Received: by mail-ig0-f176.google.com with SMTP id j1so16010702iga.3 for ; Wed, 29 Jan 2014 13:00:12 -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=Jbak+1KkJV8W/d5RaPJJF1NUGyYa0LNo09eBX9wcFAu8fD9wGGeAa666tRo9s/pVQQ nlUT2fL/4luekuHiuRlSgwVT21C2Mc4zeVZQDig4VB3F5fS/z0lWfnuXGKj7JbwaZVno 2gJJOrhU3NULL+TW03I7MLzAA+79tlTEZyjg/txVM8+t9ZW63tmdxcqLoPC93p4B4SDh g6IbJALJ679RPUlGCsfTxFjjt12xXG7MliNi/C7jkweDdH++jVPDrbvL0wvarjtWjgBT F3RdLl0Kepqe+awbsvGStjJiqQpFJgwk9UVlXHqEJqir9/HGrzGGe+WR95XJ525HKhbj GEKw== X-Gm-Message-State: ALoCoQmBl36uJrHR8DsnNQYabYhIubnpcZWLmQq1vw3tsIB9CWF11pH+42kxbr05aFdc84F5VJ2u 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 Cc: linux-iio@vger.kernel.org, Linux Kernel Mailing List , Devicetree List , linux-pwm@vger.kernel.org, Linux OMAP List , Linux ARM Kernel List , Linaro Patches 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> 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 {