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: <20250308130831.4ec56dcf@jic23-huawei>
Date: Sat, 8 Mar 2025 13:08:31 +0000
From: Jonathan Cameron <jic23@...nel.org>
To: Marcelo Schmitt <marcelo.schmitt1@...il.com>
Cc: Jonathan Santos <Jonathan.Santos@...log.com>, linux-iio@...r.kernel.org,
 devicetree@...r.kernel.org, linux-kernel@...r.kernel.org,
 linux-gpio@...r.kernel.org, lars@...afoo.de, Michael.Hennerich@...log.com,
 marcelo.schmitt@...log.com, robh@...nel.org, krzk+dt@...nel.org,
 conor+dt@...nel.org, linus.walleij@...aro.org, brgl@...ev.pl,
 lgirdwood@...il.com, broonie@...nel.org, dlechner@...libre.com,
 jonath4nns@...il.com
Subject: Re: [PATCH v4 11/17] iio: adc: ad7768-1: add regulator to control
 VCM output

On Fri, 7 Mar 2025 11:32:54 -0300
Marcelo Schmitt <marcelo.schmitt1@...il.com> wrote:

> Looks ok. One minor commnet inline.
> 
> On 03/06, Jonathan Santos wrote:
> > The VCM output voltage can be used as a common-mode voltage within the
> > amplifier preconditioning circuits external to the AD7768-1.
> > 
> > This change allows the user to configure VCM output using the regulator
> > framework.
> > 
> > Signed-off-by: Jonathan Santos <Jonathan.Santos@...log.com>  
> 
> Acked-by: Marcelo Schmitt <marcelo.schmitt@...log.com>


...

> > diff --git a/drivers/iio/adc/ad7768-1.c b/drivers/iio/adc/ad7768-1.c
> > index e88e9431bb7a..2a6317f5b582 100644
> > --- a/drivers/iio/adc/ad7768-1.c
> > +++ b/drivers/iio/adc/ad7768-1.c
> > @@ -12,8 +12,10 @@
> >  #include <linux/gpio/consumer.h>
> >  #include <linux/kernel.h>
> >  #include <linux/module.h>
> > +#include <linux/of.h>
> >  #include <linux/regmap.h>
> >  #include <linux/regulator/consumer.h>
> > +#include <linux/regulator/driver.h>
> >  #include <linux/sysfs.h>
> >  #include <linux/spi/spi.h>
> >  
> > @@ -80,9 +82,15 @@
> >  #define AD7768_CONV_MODE_MSK		GENMASK(2, 0)
> >  #define AD7768_CONV_MODE(x)		FIELD_PREP(AD7768_CONV_MODE_MSK, x)
> >  
> > +/* AD7768_REG_ANALOG2 */
> > +#define AD7768_REG_ANALOG2_VCM_MSK	GENMASK(2, 0)
> > +#define AD7768_REG_ANALOG2_VCM(x)	FIELD_PREP(AD7768_REG_ANALOG2_VCM_MSK, x)  
> 
> Should we enforce macro argument evaluation here?
> #define AD7768_REG_ANALOG2_VCM(x)	FIELD_PREP(AD7768_REG_ANALOG2_VCM_MSK, (x))
> 
Yes.  Seems there is another case above as well that needs fixing up.

> > +
> >  #define AD7768_RD_FLAG_MSK(x)		(BIT(6) | ((x) & 0x3F))
> >  #define AD7768_WR_FLAG_MSK(x)		((x) & 0x3F)
> >  


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ