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: <CAKUZ0z+kr1ToeOJaRihbfQyKoJ+vgOF7YjK811TbEcyd-43a-Q@mail.gmail.com>
Date: Fri, 18 Apr 2025 13:01:02 -0400
From: Gabriel Shahrouzi <gshahrouzi@...il.com>
To: Jonathan Cameron <jic23@...nel.org>
Cc: gregkh@...uxfoundation.org, lars@...afoo.de, linux-iio@...r.kernel.org, 
	linux-kernel@...r.kernel.org, linux-staging@...ts.linux.dev, 
	Michael.Hennerich@...log.com, skhan@...uxfoundation.org, 
	linux-kernel-mentees@...ts.linux.dev, stable@...r.kernel.org
Subject: Re: [PATCH] iio: frequency: Use SLEEP bit instead of RESET to disable output

On Fri, Apr 18, 2025 at 11:40 AM Jonathan Cameron <jic23@...nel.org> wrote:
>
> On Thu, 17 Apr 2025 09:54:34 -0400
> Gabriel Shahrouzi <gshahrouzi@...il.com> wrote:
>
> > According to the AD9832 datasheet (Table 10, D12 description), setting
> > the RESET bit forces the phase accumulator to zero, which corresponds to
> > a full-scale DC output, rather than disabling the output signal.
> >
> > The correct way to disable the output and enter a low-power state is to
> > set the AD9832_SLEEP bit (Table 10, D13 description), which powers down
> > the internal DAC current sources and disables internal clocks.
> >
> > Fixes: ea707584bac1 ("Staging: IIO: DDS: AD9832 / AD9835 driver")
> > Cc: stable@...r.kernel.org
> > Signed-off-by: Gabriel Shahrouzi <gshahrouzi@...il.com>
> > ---
> Seems reasonable but I'd like some more review of this before picking it up.
> So feel free to poke me if nothing happens in say 2 weeks from now.
Sounds good.
>
> >  drivers/staging/iio/frequency/ad9832.c | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/drivers/staging/iio/frequency/ad9832.c b/drivers/staging/iio/frequency/ad9832.c
> > index db42810c7664b..0872ff4ec4896 100644
> > --- a/drivers/staging/iio/frequency/ad9832.c
> > +++ b/drivers/staging/iio/frequency/ad9832.c
> > @@ -232,7 +232,7 @@ static ssize_t ad9832_write(struct device *dev, struct device_attribute *attr,
> >                       st->ctrl_src &= ~(AD9832_RESET | AD9832_SLEEP |
> >                                       AD9832_CLR);
> >               else
> > -                     st->ctrl_src |= AD9832_RESET;
> > +                     st->ctrl_src |= AD9832_SLEEP;
> >
> >               st->data = cpu_to_be16((AD9832_CMD_SLEEPRESCLR << CMD_SHIFT) |
> >                                       st->ctrl_src);
>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ