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: 3588361 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 D759BC02DC for ; Wed, 5 Feb 2014 19:02:38 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 1CAB420163 for ; Wed, 5 Feb 2014 19:02:38 +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 D97E420158 for ; Wed, 5 Feb 2014 19:02:36 +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 1WB7jn-0003IP-Sw; Wed, 05 Feb 2014 19:02:20 +0000 Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1WB7jl-00061C-Cn; Wed, 05 Feb 2014 19:02:17 +0000 Received: from mail-ob0-f171.google.com ([209.85.214.171]) by merlin.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1WB7jh-0005zl-VO for linux-arm-kernel@lists.infradead.org; Wed, 05 Feb 2014 19:02:14 +0000 Received: by mail-ob0-f171.google.com with SMTP id wp4so965136obc.2 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=UslqJNSnKtH2GypsWAkBs0zCfN1zuty+YEK2QcaTaPc0LYufOUXtJkVdEC5PYO0fC5 yALSMeXSdxLnSW5/78mPEF4JPJG5iuaxesvfrImrCJGNLSIyK4/Nn5imybTugzFF1Qo/ eZq2DmOVxt399+/uyZtkwsvibjxgj0YWiamJWGdexZZwjo3AJN0dG3Q0DvfL17g/iPvs cY/M9vVCOA316WamuldXysUhaRv88jTH/pCB5VWJnU0O6IBfMlkogAZ7aD//bT1hA8C9 GuniB4Ezy3OfRBuj3kO6sBcyWi3RGl/2OdFlslU7bS2KgOKc0mSzGFDep954JavkeK8D hliQ== X-Gm-Message-State: ALoCoQlXeehoKhd6gVQYmWbdUmWX365k3ZbFpQ3s8fb7rt+KN1F4YhSOfETY+dt/4nMPqvW+mFaq 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 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> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20140205_140214_065151_BBAAABD5 X-CRM114-Status: GOOD ( 12.09 ) 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 {