lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20240821212827.1d5e85ad@jic23-huawei>
Date: Wed, 21 Aug 2024 21:28:46 +0100
From: Jonathan Cameron <jic23@...nel.org>
To: Andreas Klinger <ak@...klinger.de>
Cc: David Lechner <dlechner@...libre.com>, Stephen Rothwell
 <sfr@...b.auug.org.au>, Lars-Peter Clausen <lars@...afoo.de>,
 linux-iio@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] iio: sgp40: retain documentation in driver

On Wed, 21 Aug 2024 09:53:56 +0200
Andreas Klinger <ak@...klinger.de> wrote:

> Retain documentation on how the voc index is actually calculated in
> driver code as it'll be removed in Documentation.
> 
> This is a follow up on patch "[PATCH] iio: ABI: remove duplicate
> in_resistance_calibbias" from David.
Applied both patches.  Thanks to you both for sorting this.

Jonathan

> 
> Signed-off-by: Andreas Klinger <ak@...klinger.de>
> ---
>  drivers/iio/chemical/sgp40.c | 11 ++++++++---
>  1 file changed, 8 insertions(+), 3 deletions(-)
> 
> diff --git a/drivers/iio/chemical/sgp40.c b/drivers/iio/chemical/sgp40.c
> index 7f0de14a1956..07d8ab830211 100644
> --- a/drivers/iio/chemical/sgp40.c
> +++ b/drivers/iio/chemical/sgp40.c
> @@ -14,11 +14,16 @@
>   * 1) read raw logarithmic resistance value from sensor
>   *    --> useful to pass it to the algorithm of the sensor vendor for
>   *    measuring deteriorations and improvements of air quality.
> + *    It can be read from the attribute in_resistance_raw.
>   *
> - * 2) calculate an estimated absolute voc index (0 - 500 index points) for
> - *    measuring the air quality.
> + * 2) calculate an estimated absolute voc index (in_concentration_input)
> + *    with 0 - 500 index points) for measuring the air quality.
>   *    For this purpose the value of the resistance for which the voc index
> - *    will be 250 can be set up using calibbias.
> + *    will be 250 can be set up using in_resistance_calibbias (default 30000).
> + *
> + *    The voc index is calculated as:
> + *      x = (in_resistance_raw - in_resistance_calibbias) * 0.65
> + *      in_concentration_input = 500 / (1 + e^x)
>   *
>   * Compensation values of relative humidity and temperature can be set up
>   * by writing to the out values of temp and humidityrelative.


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ