From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-0.8 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 58EDFC6778C for ; Sun, 1 Jul 2018 07:18:31 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 055E025152 for ; Sun, 1 Jul 2018 07:18:31 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 055E025152 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=metafoo.de Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752055AbeGAHS1 (ORCPT ); Sun, 1 Jul 2018 03:18:27 -0400 Received: from www381.your-server.de ([78.46.137.84]:60080 "EHLO www381.your-server.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751450AbeGAHSZ (ORCPT ); Sun, 1 Jul 2018 03:18:25 -0400 Received: from [88.198.220.132] (helo=sslproxy03.your-server.de) by www381.your-server.de with esmtpsa (TLSv1.2:DHE-RSA-AES256-GCM-SHA384:256) (Exim 4.85_2) (envelope-from ) id 1fZWcq-000598-4J; Sun, 01 Jul 2018 09:18:24 +0200 Received: from [188.174.116.212] (helo=[192.168.178.33]) by sslproxy03.your-server.de with esmtpsa (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.89) (envelope-from ) id 1fZWcp-00013z-RT; Sun, 01 Jul 2018 09:18:23 +0200 Subject: Re: [PATCH] iio: add channel type for frequency To: David Lechner , linux-iio@vger.kernel.org Cc: Jonathan Cameron , Hartmut Knaack , Peter Meerwald-Stadler , linux-kernel@vger.kernel.org References: <20180701025953.3561-1-david@lechnology.com> From: Lars-Peter Clausen Message-ID: <308015e8-d203-c4d1-ba80-3c2adf4b377a@metafoo.de> Date: Sun, 1 Jul 2018 09:18:22 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.8.0 MIME-Version: 1.0 In-Reply-To: <20180701025953.3561-1-david@lechnology.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-Authenticated-Sender: lars@metafoo.de X-Virus-Scanned: Clear (ClamAV 0.100.0/24712/Sun Jul 1 06:40:19 2018) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 07/01/2018 04:59 AM, David Lechner wrote: > This adds a new type for frequency to the IIO channel type enumeration. > > Units are in Hz. > Documentation? We already have the altvoltage channel type with the frequency attribute. Difficult to say if there are any overlaps without documentation on how this new attribute is supposed to be used. > Signed-off-by: David Lechner > --- > drivers/iio/industrialio-core.c | 1 + > include/uapi/linux/iio/types.h | 1 + > tools/iio/iio_event_monitor.c | 1 + > 3 files changed, 3 insertions(+) > > diff --git a/drivers/iio/industrialio-core.c b/drivers/iio/industrialio-core.c > index 19bdf3d2962a..f3c2c9e4b997 100644 > --- a/drivers/iio/industrialio-core.c > +++ b/drivers/iio/industrialio-core.c > @@ -85,6 +85,7 @@ static const char * const iio_chan_type_name_spec[] = { > [IIO_COUNT] = "count", > [IIO_INDEX] = "index", > [IIO_GRAVITY] = "gravity", > + [IIO_FREQUENCY] = "frequency", > }; > > static const char * const iio_modifier_names[] = { > diff --git a/include/uapi/linux/iio/types.h b/include/uapi/linux/iio/types.h > index 4213cdf88e3c..9fee86e2046f 100644 > --- a/include/uapi/linux/iio/types.h > +++ b/include/uapi/linux/iio/types.h > @@ -44,6 +44,7 @@ enum iio_chan_type { > IIO_COUNT, > IIO_INDEX, > IIO_GRAVITY, > + IIO_FREQUENCY, > }; > > enum iio_modifier { > diff --git a/tools/iio/iio_event_monitor.c b/tools/iio/iio_event_monitor.c > index b61245e1181d..c3ef20057d52 100644 > --- a/tools/iio/iio_event_monitor.c > +++ b/tools/iio/iio_event_monitor.c > @@ -58,6 +58,7 @@ static const char * const iio_chan_type_name_spec[] = { > [IIO_PH] = "ph", > [IIO_UVINDEX] = "uvindex", > [IIO_GRAVITY] = "gravity", > + [IIO_FREQUENCY] = "frequency", > }; > > static const char * const iio_ev_type_text[] = { >