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] [thread-next>] [day] [month] [year] [list]
Message-ID: <20231206175245.73b91fe0@jic23-huawei>
Date:   Wed, 6 Dec 2023 17:52:45 +0000
From:   Jonathan Cameron <jic23@...nel.org>
To:     Li peiyu <579lpy@...il.com>
Cc:     javier.carrasco.cruz@...il.com, lars@...afoo.de,
        robh+dt@...nel.org, krzysztof.kozlowski+dt@...aro.org,
        conor+dt@...nel.org, linux-iio@...r.kernel.org,
        devicetree@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH v4 1/4] iio: core: introduce trough modifier for minimum
  values

On Wed,  6 Dec 2023 21:48:19 +0800
Li peiyu <579lpy@...il.com> wrote:

> From: Javier Carrasco <javier.carrasco.cruz@...il.com>
> 
> The IIO_CHAN_INFO_PEAK modifier is used for maximum values and currently
> there is no equivalent for minimum values. Instead of overloading the
> existing peak modifier, a new modifier can be added.
> 
> In principle there is no need to add a _TROUGH_SCALE modifier as the
> scale will be the same as the one required for the INFO_PEAK modifier,
> which in turn is sometimes omitted if a single scale for peaks and raw
> values is required.
> 

Terminology is a bit mixed up in here. Modifiers in IIO are things
like the axis or a color for light sensors.  This is an 
info element that applies to a channel (modified or not).

Other than that looks good to me.

> Add an IIO_CHAN_INFO_TROUGH modifier for minimum values.
> 
> Signed-off-by: Javier Carrasco <javier.carrasco.cruz@...il.com>
> ---
>  drivers/iio/industrialio-core.c | 1 +
>  include/linux/iio/types.h       | 1 +
>  2 files changed, 2 insertions(+)
> 
> diff --git a/drivers/iio/industrialio-core.c b/drivers/iio/industrialio-core.c
> index c77745b594bd..351c64c2f4da 100644
> --- a/drivers/iio/industrialio-core.c
> +++ b/drivers/iio/industrialio-core.c
> @@ -182,6 +182,7 @@ static const char * const iio_chan_info_postfix[] = {
>  	[IIO_CHAN_INFO_THERMOCOUPLE_TYPE] = "thermocouple_type",
>  	[IIO_CHAN_INFO_CALIBAMBIENT] = "calibambient",
>  	[IIO_CHAN_INFO_ZEROPOINT] = "zeropoint",
> +	[IIO_CHAN_INFO_TROUGH] = "trough_raw",
>  };
>  /**
>   * iio_device_id() - query the unique ID for the device
> diff --git a/include/linux/iio/types.h b/include/linux/iio/types.h
> index 117bde7d6ad7..d89982c98368 100644
> --- a/include/linux/iio/types.h
> +++ b/include/linux/iio/types.h
> @@ -68,6 +68,7 @@ enum iio_chan_info_enum {
>  	IIO_CHAN_INFO_THERMOCOUPLE_TYPE,
>  	IIO_CHAN_INFO_CALIBAMBIENT,
>  	IIO_CHAN_INFO_ZEROPOINT,
> +	IIO_CHAN_INFO_TROUGH,
>  };
>  
>  #endif /* _IIO_TYPES_H_ */

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ