Received: by 2002:a25:23cc:0:0:0:0:0 with SMTP id j195csp124281ybj; Fri, 8 May 2020 07:58:34 -0700 (PDT) X-Google-Smtp-Source: APiQypJW4Wuz3llXthJWLGlSRxI6rDx0qMRHrxoVzFcKakh8cq1SqpbfMw2Q9JP0cTTMOpzMKIw3 X-Received: by 2002:a50:f058:: with SMTP id u24mr2271407edl.171.1588949914143; Fri, 08 May 2020 07:58:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1588949914; cv=none; d=google.com; s=arc-20160816; b=ph47c+nomlFElQ4teKvluO0Vnn0A7KwNGLw0IK/39ZmKa8l4CVdHpExZf4DYMx7DjD 0o6dsI8YgohWp3qERUU6JoVkmfMGK266Vu9II6BvW6zD1SlkUJDu/KtbDV0oPG2HXyJ9 RjwQSBt1WQnAE0U/yU24szJ/rUzgbviaVdzeELEtk4ZSqPMbJZL5famElV3wb/ABtAr5 e0NWdZj+QP+P679dkwkfN6tOfdXHidY0ugQwSOP5sni8FNWNlbTms9RVpL8p3usDDAPm W5+wFV6kpu9XNSW6qUbofx93eEyXO2iJjLcqay6XYnNOlDViPh68s9r+ItcilI0dAZPn wfhA== 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:mime-version :organization:references:in-reply-to:message-id:subject:cc:to:from :date; bh=e9nUr17kyXNECaAvb80tAa5Rp9ROwWk2yyiYr6btw9c=; b=qq15MO4UNnHOWmKxb8plwXc/RvqM2VaKl0LImAntljFcPBruQx7or3oM8c5oAJ9HTy aVrCgLesvipMZK99ItHQp2MAVfxxXCSKvN+K4dvh6T0752CURsLvScR/xbWGzrbrcMiV +C3iyb9S0u7hR25OUVh9KT+QpSpmq9sKPpIN3kYnZSUQC6q6KZMZQncNdKLmkK5UwLoL NGf4mK+bVro7X/E6EWAAeeR0ohHQYOPoi9FdSp4BqEr13EdyamgGGBEgrsLBgMI4iT+A X5geyOea0dsr7tlnG8p+M5NvFC18SZC8BbLHieCGi5Fq6OqN171StTLpcjfj/cM2hwpn yI+g== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id c2si1013680edm.499.2020.05.08.07.58.09; Fri, 08 May 2020 07:58:34 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727029AbgEHO4i (ORCPT + 99 others); Fri, 8 May 2020 10:56:38 -0400 Received: from lhrrgout.huawei.com ([185.176.76.210]:2176 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726690AbgEHO4i (ORCPT ); Fri, 8 May 2020 10:56:38 -0400 Received: from lhreml710-chm.china.huawei.com (unknown [172.18.7.108]) by Forcepoint Email with ESMTP id 5C856535883A350AC80C; Fri, 8 May 2020 15:56:36 +0100 (IST) Received: from localhost (10.47.95.97) by lhreml710-chm.china.huawei.com (10.201.108.61) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.1913.5; Fri, 8 May 2020 15:56:35 +0100 Date: Fri, 8 May 2020 15:56:13 +0100 From: Jonathan Cameron To: Gwendal Grignou CC: , , , , , Subject: Re: [PATCH v3 0/3] iio: cros_ec: Add support for RGB light sensor Message-ID: <20200508155613.00005c95@Huawei.com> In-Reply-To: <20200506230324.139241-1-gwendal@chromium.org> References: <20200506230324.139241-1-gwendal@chromium.org> Organization: Huawei Technologies Research and Development (UK) Ltd. X-Mailer: Claws Mail 3.17.4 (GTK+ 2.24.32; i686-w64-mingw32) MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit X-Originating-IP: [10.47.95.97] X-ClientProxiedBy: lhreml743-chm.china.huawei.com (10.201.108.193) To lhreml710-chm.china.huawei.com (10.201.108.61) X-CFilter-Loop: Reflected Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, 6 May 2020 16:03:21 -0700 Gwendal Grignou wrote: > Add support for color light sensor presented by the Chromebook Embedded > Controller (EC). > Instead of just presenting lux measurement (clear channel), a color light > sensor is able to report color temperature measurement. > > The EC, using factory settings, can transform the raw measurement into > the CIE 1931 XYZ color space (XYZ) and take adavantage of color sensor > autocalibration to provide the most accurate measurements. v3 of series with v2 patches? Also my earlier comment about colour channels cannot be illuminance still stands. It is a term that "only" applies to light measurements with a particular frequency / sensitivity curve. The colour channels should all be in_intensity_xxx_raw. If you want to do the computation in driver to derive the illuminance that would be great, otherwise we shouldn't have any illuminance channels. Jonathan > > Gwendal Grignou (3): > iio: Add in_illumincance vectors in different color spaces > iio: cros_ec: Allow enabling/disabling calibration mode > iio: cros_ec_light: Add support for RGB sensor > > Documentation/ABI/testing/sysfs-bus-iio | 27 + > .../cros_ec_sensors/cros_ec_sensors_core.c | 3 +- > drivers/iio/light/cros_ec_light_prox.c | 469 +++++++++++++++--- > drivers/platform/chrome/cros_ec_sensorhub.c | 3 + > .../linux/iio/common/cros_ec_sensors_core.h | 1 - > .../linux/platform_data/cros_ec_commands.h | 14 +- > 6 files changed, 441 insertions(+), 76 deletions(-) >