Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp298773imm; Fri, 3 Aug 2018 03:45:55 -0700 (PDT) X-Google-Smtp-Source: AAOMgpcPWfAepsf4+cxWp9D+lrULOiMRz2mfzDtca/d3947r/HOJH2FVt642fHfz0aPyKQ7jzKof X-Received: by 2002:a62:e00a:: with SMTP id f10-v6mr3905110pfh.208.1533293154972; Fri, 03 Aug 2018 03:45:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1533293154; cv=none; d=google.com; s=arc-20160816; b=cdeLrCvXIbg+PotrNM2XenxiNMSDb+Ksxxzguo5NAM/XDzlWiRurESLoqNt7PeARMr IWCek6k5xOYqLMlrT4uQ88LDYmefWxAtZForXjj/zML6KNlp5havAvz/r8jweiCbra/x CDba7sOzLTR5StcpMTV2usoqCF8aHfT2QOONk+1RhDKn0gtR18w4ER2N2ZcYsW2sXYJ1 xPqn4FZX8kBNHjOGX2FEaaCVUwWvk4dwqz9RL9z+7edNyFQbv6TPb6umkLVM2bM9sRLL oxkVSowKQcenJ8PlpWaeQG8mzr6Y1RZgnhTZguyN1uVGvMWRFzhbUHXwVpHdF4/nxzZ+ rbLQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:to:subject:cc:arc-authentication-results; bh=tBneOAUDvnwpqFSwGN0w8G1HyYJBr02ggzq2/WM1NP4=; b=a8/0EGw3r/6zH9cf5dpZgQ4igjKpuYUEVmf5fLNezLLsoqefQYkqWMsDXilBj52q91 4ljxdy4fdqAypTaGk6oPAiB8b6FplHWPPPWMiMe+QgkJf26BuwY0GCt1X91IX4jZZCsc xRt4DBl5u+HPmu71/paxdXRRPAL4cnGjV1lMymGUc1U9YzYKjkeDEU26KqeupuCcpyJ4 795Na9y71AVPco84Dbo2Zk50oXtLWdSFBPJwh4lV/Gvm+8uK6D3GdAVxl2oavdG9ThHu ncsagcRKPRdy5rKdGa1zD8m8/NlnUB1mSEE0ejtFNJ2RXqoVGpAtxccubDWOMIp5ppCE nYCQ== 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 e6-v6si4012688pgh.50.2018.08.03.03.45.39; Fri, 03 Aug 2018 03:45:54 -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 S1732527AbeHCMkg (ORCPT + 99 others); Fri, 3 Aug 2018 08:40:36 -0400 Received: from mail-out.m-online.net ([212.18.0.9]:49785 "EHLO mail-out.m-online.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1732302AbeHCMkg (ORCPT ); Fri, 3 Aug 2018 08:40:36 -0400 Received: from frontend01.mail.m-online.net (unknown [192.168.8.182]) by mail-out.m-online.net (Postfix) with ESMTP id 41hkFW6n0nz1qxQL; Fri, 3 Aug 2018 12:44:47 +0200 (CEST) Received: from localhost (dynscan1.mnet-online.de [192.168.6.70]) by mail.m-online.net (Postfix) with ESMTP id 41hkFW580Zz20xSm; Fri, 3 Aug 2018 12:44:47 +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 yKECdL2MZzLa; Fri, 3 Aug 2018 12:44:44 +0200 (CEST) X-Auth-Info: XVlWAizQk/pyLJCu22yIrEVJDYIDFKkI1hNqs7LqNDI= Received: from antares.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; Fri, 3 Aug 2018 12:44:44 +0200 (CEST) Cc: pn@denx.de, jic23@kernel.org, knaack.h@gmx.de, lars@metafoo.de, robh+dt@kernel.org, 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 Subject: Re: [PATCH v4 1/3] iio: Add modifier for white light To: Peter Meerwald-Stadler References: <20180802182729.2061830-1-pn@denx.de> From: Parthiban Nallathambi Message-ID: Date: Fri, 3 Aug 2018 12:44:44 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.9.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hello Peter, On 08/02/2018 09:30 PM, Peter Meerwald-Stadler wrote: > Hello, > > it is not clear to me why 'white' is needed; > isn't that the default, i.e. unfiltered light? Yes, it is. But devices like vcnl4035 veml7700, White LED data one register and all other sources of light (like fluorescent, incandescent ,sunlight) in separate register. So in such cases this WHITE modifier is needed. Should it needs to come under IIO_MOD_LIGHT_CLEAR? > > thanks, regards, p. > >> 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: >> > -- Thanks, Parthiban Nallathambi DENX Software Engineering GmbH, Managing Director: Wolfgang Denk HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd@denx.de