Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp2460174imm; Thu, 2 Aug 2018 11:59:42 -0700 (PDT) X-Google-Smtp-Source: AAOMgpfndzXcHTpkuQ6mB6uFjWbCuEjZ4oeRTEk4JX1qPbQ/p7MxgSyJA/bi0pbXtoIE9fhTlv3J X-Received: by 2002:a63:2906:: with SMTP id p6-v6mr674794pgp.204.1533236382784; Thu, 02 Aug 2018 11:59:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1533236382; cv=none; d=google.com; s=arc-20160816; b=Y6FdKBgC1dZx2WElaGjxk6arksdzEKUnk9BOzB5/1+46WJOm+ksKOZF+lMDqYGg1l0 RybCI1u4jFA2i9MTnc6rDr4Fqs8lPMpWMQYc3HPFmntP6g9zDMfoDBKo1J7HZ26ea1ZT buieLyVL/Lqid6HIGWoeVeaQ4/XwLmHf575iTKRlIWGzY3RYHqF86BOpEOhFDvoSamQC DrJKu1lIcNFtsBBNHpfqpiGxCCfKkr1ar8GBbe9KKbFaQ6j8qul/G4Syx7xG7NQJES74 TMV2LORf1IyCTDodB2IFWJHorTfPl4G9qScBN1rcJES+Cpiau6Jcl4N/8GQxgzHa4PEI pOhw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from :arc-authentication-results; bh=5TVrVha/u8jPez17rMT7kxw+hoKz+el9Ckjvfo3K3ok=; b=w6uGDVu5JCBON7HqUu1/KklZOX7hEvj1bjurRM8J8s2+L3bgSTMKtN1OFfua2gsDuq wd5wuYSxwRIlOC6U2lsNAAKoqpzwEhrR1oKho+x502W2dL9GoqFRrt5PERzR3QS8hBUW L8aZ+tyOP+QntoaRyDFqZ7kfUT0y6Ie1ocOjzs6QItQMS3vwvgO7aif7W56ixaLuPZqI oVxVE3vYiv+xwMLj6LRpUc4fFFWuwVbSR8RuJGI2sDOu+09J63TQMtABJOVbS2X8fQ/+ PEhfzylax3VhhO9paTS+u8K2KO2eSMY7q+8ETZt8xlkHH9kDFxw/TrF6jq4ix+tLr1Un 8Asg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id e185-v6si2612414pgc.318.2018.08.02.11.59.27; Thu, 02 Aug 2018 11:59:42 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2387675AbeHBUT7 (ORCPT + 99 others); Thu, 2 Aug 2018 16:19:59 -0400 Received: from mail-out.m-online.net ([212.18.0.10]:52983 "EHLO mail-out.m-online.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2387586AbeHBUT7 (ORCPT ); Thu, 2 Aug 2018 16:19:59 -0400 Received: from frontend01.mail.m-online.net (unknown [192.168.8.182]) by mail-out.m-online.net (Postfix) with ESMTP id 41hJZ35694z1qvnH; Thu, 2 Aug 2018 20:27:39 +0200 (CEST) Received: from localhost (dynscan1.mnet-online.de [192.168.6.70]) by mail.m-online.net (Postfix) with ESMTP id 41hJZ33hqjz1tLNV; Thu, 2 Aug 2018 20:27:39 +0200 (CEST) X-Virus-Scanned: amavisd-new at mnet-online.de Received: from mail.mnet-online.de ([192.168.8.182]) by localhost (dynscan1.mail.m-online.net [192.168.6.70]) (amavisd-new, port 10024) with ESMTP id 8-W4ukIs7PlI; Thu, 2 Aug 2018 20:27:38 +0200 (CEST) X-Auth-Info: Ke2YRsoD/K04f3arQcyqoGB7AVUJLwvRzRRwsOdin5U= Received: from xpert.denx.de (unknown [62.91.23.180]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.mnet-online.de (Postfix) with ESMTPSA; Thu, 2 Aug 2018 20:27:38 +0200 (CEST) From: Parthiban Nallathambi To: jic23@kernel.org, knaack.h@gmx.de, lars@metafoo.de, pmeerw@pmeerw.net, robh+dt@kernel.org Cc: linux-iio@vger.kernel.org, linux-kernel@vger.kernel.org, mark.rutland@arm.com, devicetree@vger.kernel.org, matthias.bgg@gmail.com, wd@denx.de, sbabic@denx.de, hs@denx.de, Parthiban Nallathambi Subject: [PATCH v4 1/3] iio: Add modifier for white light Date: Thu, 2 Aug 2018 20:27:27 +0200 Message-Id: <20180802182729.2061830-1-pn@denx.de> X-Mailer: git-send-email 2.14.4 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Signed-off-by: Parthiban Nallathambi --- Documentation/ABI/testing/sysfs-bus-iio | 7 +++++++ drivers/iio/industrialio-core.c | 1 + include/uapi/linux/iio/types.h | 1 + tools/iio/iio_event_monitor.c | 2 ++ 4 files changed, 11 insertions(+) diff --git a/Documentation/ABI/testing/sysfs-bus-iio b/Documentation/ABI/testing/sysfs-bus-iio index 731146c3b138..43e481aed5b2 100644 --- a/Documentation/ABI/testing/sysfs-bus-iio +++ b/Documentation/ABI/testing/sysfs-bus-iio @@ -1312,6 +1312,13 @@ Description: standardised CIE Erythemal Action Spectrum. UV index values range from 0 (low) to >=11 (extreme). +What: /sys/.../iio:deviceX/in_intensityY_white_raw +KernelVersion: 4.18 +Contact: linux-iio@vger.kernel.org +Description: + Modifier white indicates that measurements contain white LED + component. + What: /sys/.../iio:deviceX/in_intensity_red_integration_time What: /sys/.../iio:deviceX/in_intensity_green_integration_time What: /sys/.../iio:deviceX/in_intensity_blue_integration_time diff --git a/drivers/iio/industrialio-core.c b/drivers/iio/industrialio-core.c index 19bdf3d2962a..cb939b9fad16 100644 --- a/drivers/iio/industrialio-core.c +++ b/drivers/iio/industrialio-core.c @@ -108,6 +108,7 @@ static const char * const iio_modifier_names[] = { [IIO_MOD_LIGHT_GREEN] = "green", [IIO_MOD_LIGHT_BLUE] = "blue", [IIO_MOD_LIGHT_UV] = "uv", + [IIO_MOD_LIGHT_WHITE] = "white", [IIO_MOD_QUATERNION] = "quaternion", [IIO_MOD_TEMP_AMBIENT] = "ambient", [IIO_MOD_TEMP_OBJECT] = "object", diff --git a/include/uapi/linux/iio/types.h b/include/uapi/linux/iio/types.h index 4213cdf88e3c..de87a6c7e6de 100644 --- a/include/uapi/linux/iio/types.h +++ b/include/uapi/linux/iio/types.h @@ -84,6 +84,7 @@ enum iio_modifier { IIO_MOD_CO2, IIO_MOD_VOC, IIO_MOD_LIGHT_UV, + IIO_MOD_LIGHT_WHITE, }; enum iio_event_type { diff --git a/tools/iio/iio_event_monitor.c b/tools/iio/iio_event_monitor.c index b61245e1181d..a2f9c62a79dd 100644 --- a/tools/iio/iio_event_monitor.c +++ b/tools/iio/iio_event_monitor.c @@ -96,6 +96,7 @@ static const char * const iio_modifier_names[] = { [IIO_MOD_LIGHT_GREEN] = "green", [IIO_MOD_LIGHT_BLUE] = "blue", [IIO_MOD_LIGHT_UV] = "uv", + [IIO_MOD_LIGHT_WHITE] = "white", [IIO_MOD_QUATERNION] = "quaternion", [IIO_MOD_TEMP_AMBIENT] = "ambient", [IIO_MOD_TEMP_OBJECT] = "object", @@ -178,6 +179,7 @@ static bool event_is_known(struct iio_event_data *event) case IIO_MOD_LIGHT_GREEN: case IIO_MOD_LIGHT_BLUE: case IIO_MOD_LIGHT_UV: + case IIO_MOD_LIGHT_WHITE: case IIO_MOD_QUATERNION: case IIO_MOD_TEMP_AMBIENT: case IIO_MOD_TEMP_OBJECT: -- 2.14.4