Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp352100imm; Fri, 3 Aug 2018 04:40:46 -0700 (PDT) X-Google-Smtp-Source: AAOMgpfAdII4Fk/fMfQ6+zG3pGm6HBdWPJe5y/XUyetlWlmTTIslJTriTrn6lse0KNy5btSg7fJr X-Received: by 2002:a63:9619:: with SMTP id c25-v6mr3360778pge.75.1533296446491; Fri, 03 Aug 2018 04:40:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1533296446; cv=none; d=google.com; s=arc-20160816; b=ulNYGo6UzVimBVRdzh5Q8fNkNZmgBBtw/8VZ4WjyKamn7o7KoqMOlKwvfswzs5TSiA gWrgMAWIgewUcs3tbzYCM+IywpKCpFUaXhL6LtT+h06wswDOYEO+fz+GtaWey83InVp+ VhtSj8ZNm6WdZORDibzvaJ5QV6fht40R/+AS0Kd7V+nGSdmigZIczJqcUaj3VEbGdGoB PqzY8VzSf2qhpNxyqJtUjar9OlQpzHZ7lAuzA+cp5b338MGHws0nB0wNQThXRD+XdOfX gctXBy43BnhF4/j48ZkPiE+sRwxQjS+QkPSL4T6wB38CfIWH97bMzSXtZFW+MjIPgPg/ dZbw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:references :message-id:in-reply-to:subject:cc:to:from:date:dkim-signature :arc-authentication-results; bh=hSJhOp6EVHYITiBU6F+yLImPYpp1fZhjB+4XkBROkqw=; b=CZuErSnvqI0Qs8saWK+RQpUX/o5IJ/uP00+Nb5Oj2Opwvruoo0Jvi5Htx8Y1VMpF7I aK0UBvQe1nnINrDcQV9KmstuqHJmwSGm3zuSVTkdTMlER7VTeXkMt7v8CRMNJ0YrO/K6 iQ4POrGS56pWTZULkEgmoWneQaNEQpwf+zEsjvTBvV95mchJBrFOP5w1myJ2w5tZLVlL v3Zz+taqj3m9+Uv62KSDWVqvqB+OCMgGcQRqDMSe6izvq0l7L2G11LPwyNvkVHV6neqZ HTUOT25BaOA4Bs0d4NcDeNt36Hqpo/JEVG2jukSCJDp2cQyPNAdfRaNJiU+WofeOJxcS IJzw== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@pmeerw.net header.s=mail header.b=KNzWCT6u; 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=pmeerw.net Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 79-v6si4923264pfs.40.2018.08.03.04.40.32; Fri, 03 Aug 2018 04:40:46 -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; dkim=fail header.i=@pmeerw.net header.s=mail header.b=KNzWCT6u; 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=pmeerw.net Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728300AbeHCNeP (ORCPT + 99 others); Fri, 3 Aug 2018 09:34:15 -0400 Received: from ns.pmeerw.net ([84.19.176.117]:48016 "EHLO ns.pmeerw.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728061AbeHCNeP (ORCPT ); Fri, 3 Aug 2018 09:34:15 -0400 Received: by ns.pmeerw.net (Postfix, from userid 1000) id D8460E01C1; Fri, 3 Aug 2018 13:38:17 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=pmeerw.net; s=mail; t=1533296297; bh=aESNigdGVHEie0/4DNilJp7oKiYSmoe3b6a04oh9rrM=; h=Date:From:To:cc:Subject:In-Reply-To:References:From; b=KNzWCT6uFY+auv7m+IpGTBpSBTX/mhpd8xI6Ts9Sd6cPC8SXPt8w+F/L2d6/Q1v21 zTrlkF+fvoDoWMI9wOySSz0aOn0C0hBloO0X3mNuTkTP7Qgefdl94dcavrEcRm8+86 dRKP0F+jKAjyZYKEf7UDVz/ZKlOG9xKRMBJUNgvs= Received: from localhost (localhost [127.0.0.1]) by ns.pmeerw.net (Postfix) with ESMTP id C371BE0148; Fri, 3 Aug 2018 13:38:17 +0200 (CEST) Date: Fri, 3 Aug 2018 13:38:17 +0200 (CEST) From: Peter Meerwald-Stadler To: Parthiban Nallathambi cc: 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 In-Reply-To: Message-ID: References: <20180802182729.2061830-1-pn@denx.de> User-Agent: Alpine 2.21 (DEB 202 2017-01-01) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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? it is a mess already :), there is _intensity _intensity_ir _intensity_both _intensity_uv _intensity_red _intensity_green _intensity_blue _intensity_clear I think that ir, uv, red, green, blue are filters for particular ranges of the spectrum _intensity_clear might be unfiltered and _intensity might relate to the human eye photopic curve, I think the proposed white might be the same as clear? 'both' means ir + _intensity (not clearly specified) regards, p. > > > +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: > > > > > > > -- Peter Meerwald-Stadler Mobile: +43 664 24 44 418