public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Krzysztof Kozlowski <krzk@kernel.org>
To: Per-Daniel Olsson <perdaniel.olsson@axis.com>,
	Jonathan Cameron <jic23@kernel.org>,
	Lars-Peter Clausen <lars@metafoo.de>,
	Rob Herring <robh@kernel.org>,
	Krzysztof Kozlowski <krzk+dt@kernel.org>,
	Conor Dooley <conor+dt@kernel.org>,
	Javier Carrasco <javier.carrasco.cruz@gmail.com>
Cc: linux-iio@vger.kernel.org, linux-kernel@vger.kernel.org,
	devicetree@vger.kernel.org, rickard.andersson@axis.com,
	kernel@axis.com
Subject: Re: [PATCH v7 2/2] iio: light: Add support for TI OPT4060 color sensor
Date: Tue, 26 Nov 2024 15:16:08 +0100	[thread overview]
Message-ID: <efa8fd22-ca67-4cb1-a8b0-41c86ba58153@kernel.org> (raw)
In-Reply-To: <20241126140002.1564564-3-perdaniel.olsson@axis.com>

On 26/11/2024 15:00, Per-Daniel Olsson wrote:
> +
> +The driver supports scaled values for red, green and blue. The raw values are
> +scaled so that for a particular test light source, typically white, the
> +measurement intensity is the same across the different color channels. This is
> +calculated in the following way:
> +
> +R = RED_RAW x 2.4
> +G = GREEN_RAW x 1.0
> +B = BLUE_RAW x 1.3
> +
> +The values are accessed from:
> +/sys/bus/iio/devices/iio:deviceX/in_intensity_red_scale
> +/sys/bus/iio/devices/iio:deviceX/in_intensity_green_scale
> +/sys/bus/iio/devices/iio:deviceX/in_intensity_blue_scale
> +
> +The data sheet suggests using the scaled values to normalize the scaled R, G
> +and B values. This is useful to get a value for the ratio between colors
> +independent of light intensity. A userspace appliction can do this in the
> +following way:
> +
> +R_NORMALIZED = R / (R + G + B)
> +G_NORMALIZED = G / (R + G + B)
> +B_NORMALIZED = B / (R + G + B)
> +
> +See section 8.4.5.2 in the data sheet for additional details.
> \ No newline at end of file


You still have patch warnings.

Best regards,
Krzysztof

  reply	other threads:[~2024-11-26 14:16 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-11-26 14:00 [PATCH v7 0/2] Support for Texas Instruments OPT4060 RGBW Color sensor Per-Daniel Olsson
2024-11-26 14:00 ` [PATCH v7 1/2] dt-bindings: iio: light: Document TI OPT4060 RGBW sensor Per-Daniel Olsson
2024-11-26 14:00 ` [PATCH v7 2/2] iio: light: Add support for TI OPT4060 color sensor Per-Daniel Olsson
2024-11-26 14:16   ` Krzysztof Kozlowski [this message]
2024-11-26 14:15 ` [PATCH v7 0/2] Support for Texas Instruments OPT4060 RGBW Color sensor Krzysztof Kozlowski
2024-11-26 15:50   ` Per-Daniel Olsson

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=efa8fd22-ca67-4cb1-a8b0-41c86ba58153@kernel.org \
    --to=krzk@kernel.org \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=javier.carrasco.cruz@gmail.com \
    --cc=jic23@kernel.org \
    --cc=kernel@axis.com \
    --cc=krzk+dt@kernel.org \
    --cc=lars@metafoo.de \
    --cc=linux-iio@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=perdaniel.olsson@axis.com \
    --cc=rickard.andersson@axis.com \
    --cc=robh@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox