From patchwork Wed Feb 5 19:01:36 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Matt Porter X-Patchwork-Id: 317241 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 48E3A2C0096 for ; Thu, 6 Feb 2014 06:03:55 +1100 (EST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751481AbaBETDj (ORCPT ); Wed, 5 Feb 2014 14:03:39 -0500 Received: from mail-ob0-f178.google.com ([209.85.214.178]:33077 "EHLO mail-ob0-f178.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751256AbaBETBw (ORCPT ); Wed, 5 Feb 2014 14:01:52 -0500 Received: by mail-ob0-f178.google.com with SMTP id wn1so951221obc.37 for ; Wed, 05 Feb 2014 11:01:52 -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=Emr28ZCg0uFUaj8nKOEkZ1bECp3+5MXP1Y5xNHdtyChynoPJAMGmq0coB4LFxSqje+ 1u/7epfAdCTtXeecTb13FRx+c6bWLWzqkTgB9R6S2Js/FLBga+unqIGqRHnKSmudTqW0 WQ7byLfr7elDzMSA3ro9ROX5sT5q/TYQf5zwlhvG1lVsl1rayiADB9l0tBg/RJVQH0i1 SIwz+tmpuZYPg63gpMqovg59hz2qT+C7hblDHHHbCs7qLngCebH2O2pqJm6ES6H8wBHM 0BIsgEWI7gyhE63rj1faCWUcMgZ3vv1tyMwmAcrnJ+6rFYVpLSNKyZj8W/XJDY12R86M YTAQ== X-Gm-Message-State: ALoCoQnFG/V0poO/6l2NczjAe0UD81lMdCVbhE1cylOi6iURQDvpZl3h7P16YtmMKk11/1bJCUvr X-Received: by 10.182.126.167 with SMTP id mz7mr2509813obb.69.1391626911425; Wed, 05 Feb 2014 11:01:51 -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 hl3sm50723767obb.0.2014.02.05.11.01.48 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 05 Feb 2014 11:01:51 -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 v3 1/6] iio: add support for pulse width capture devices Date: Wed, 5 Feb 2014 14:01:36 -0500 Message-Id: <1391626901-31684-2-git-send-email-mporter@linaro.org> X-Mailer: git-send-email 1.8.4 In-Reply-To: <1391626901-31684-1-git-send-email-mporter@linaro.org> References: <1391626901-31684-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 {