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: <20250927175343.156e00da@jic23-huawei>
Date: Sat, 27 Sep 2025 17:54:59 +0100
From: Jonathan Cameron <jic23@...nel.org>
To: Antoni Pokusinski <apokusinski01@...il.com>
Cc: dlechner@...libre.com, nuno.sa@...log.com, andy@...nel.org,
 robh@...nel.org, krzk+dt@...nel.org, conor+dt@...nel.org,
 linux-kernel@...r.kernel.org, devicetree@...r.kernel.org,
 linux-iio@...r.kernel.org, linux@...ck-us.net, rodrigo.gobbi.7@...il.com,
 naresh.solanki@...ements.com, michal.simek@....com,
 grantpeltier93@...il.com, farouk.bouabid@...rry.de,
 marcelo.schmitt1@...il.com
Subject: Re: [PATCH v3 4/4] iio: mpl3115: add support for sampling frequency

On Sat, 27 Sep 2025 00:01:50 +0200
Antoni Pokusinski <apokusinski01@...il.com> wrote:

> When the device is in ACTIVE mode the temperature and pressure measurements
> are collected with a frequency determined by the ST[3:0] bits of CTRL_REG2
> register.
> 
> Reviewed-by: Nuno Sá <nuno.sa@...log.com>
> Signed-off-by: Antoni Pokusinski <apokusinski01@...il.com>
One minor formatting thing inline.

And whilst I'm here, slow down a little.  No need to send a v3 for a missing
include.  Just do as you did and reply to say that it needs adding then wait
for reviews on v2.

In general, leaving a series on list for a week or more is a good plan to gather reviews
before doing a new version.

Jonathan


> ---
>  drivers/iio/pressure/mpl3115.c | 82 ++++++++++++++++++++++++++++++++++
>  1 file changed, 82 insertions(+)
> 
> diff --git a/drivers/iio/pressure/mpl3115.c b/drivers/iio/pressure/mpl3115.c
> index 13c8b338a15e..04c126ff4d46 100644
> --- a/drivers/iio/pressure/mpl3115.c
> +++ b/drivers/iio/pressure/mpl3115.c
> @@ -10,6 +10,7 @@
>   * user offset correction, raw mode
>   */
>  
> +#include <linux/bitfield.h>
>  #include <linux/cleanup.h>
>  #include <linux/delay.h>
>  #include <linux/i2c.h>
> @@ -30,6 +31,7 @@
>  #define MPL3115_INT_SOURCE 0x12
>  #define MPL3115_PT_DATA_CFG 0x13
>  #define MPL3115_CTRL_REG1 0x26
> +#define MPL3115_CTRL_REG2 0x27
>  #define MPL3115_CTRL_REG3 0x28
>  #define MPL3115_CTRL_REG4 0x29
>  #define MPL3115_CTRL_REG5 0x2a
> @@ -48,6 +50,8 @@
>  #define MPL3115_CTRL1_ACTIVE BIT(0) /* continuous measurement */
>  #define MPL3115_CTRL1_OS_258MS GENMASK(5, 4) /* 64x oversampling */
>  
> +#define MPL3115_CTRL2_ST GENMASK(3, 0)
> +
>  #define MPL3115_CTRL3_IPOL1 BIT(5)
>  #define MPL3115_CTRL3_IPOL2 BIT(1)
>  
> @@ -57,6 +61,25 @@
>  
>  #define MPL3115_INT2 BIT(2) /* flag that indicates INT2 in use */
>  
> +static const unsigned int mpl3115_samp_freq_table[][2] = {
> +	{ 1,      0},

space before } in each of these.


> +	{ 0, 500000},
> +	{ 0, 250000},
> +	{ 0, 125000},
> +	{ 0,  62500},
> +	{ 0,  31250},
> +	{ 0,  15625},
> +	{ 0,   7812},
> +	{ 0,   3906},
> +	{ 0,   1953},
> +	{ 0,    976},
> +	{ 0,    488},
> +	{ 0,    244},
> +	{ 0,    122},
> +	{ 0,     61},
> +	{ 0,     30},
> +};



Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ