mbox series

[v3,0/3] iio: cros_ec: Add support for RGB light sensor

Message ID 20200506230324.139241-1-gwendal@chromium.org (mailing list archive)
Headers show
Series iio: cros_ec: Add support for RGB light sensor | expand

Message

Gwendal Grignou May 6, 2020, 11:03 p.m. UTC
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.

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(-)

Comments

Jonathan Cameron May 8, 2020, 2:56 p.m. UTC | #1
On Wed, 6 May 2020 16:03:21 -0700
Gwendal Grignou <gwendal@chromium.org> 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(-)
>