[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <2f0f77d1e808dd9c55763ee46839a1cd2a74d5bf.camel@gmail.com>
Date: Mon, 13 Jan 2025 16:08:52 +0000
From: Nuno Sá <noname.nuno@...il.com>
To: David Lechner <dlechner@...libre.com>, Angelo Dureghello
<adureghello@...libre.com>, Lars-Peter Clausen <lars@...afoo.de>, Michael
Hennerich <Michael.Hennerich@...log.com>, Jonathan Cameron
<jic23@...nel.org>, Nuno Sa <nuno.sa@...log.com>
Cc: Jonathan Cameron <Jonathan.Cameron@...wei.com>,
linux-iio@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH v3 6/9] iio: dac: ad3552r-hs: use instruction mode for
configuration
On Fri, 2025-01-10 at 09:37 -0600, David Lechner wrote:
> On 1/10/25 4:24 AM, Angelo Dureghello wrote:
> > From: Angelo Dureghello <adureghello@...libre.com>
> >
> > Use "instruction" mode over initial configuration and all other
> > non-streaming operations.
> >
> > DAC boots in streaming mode as default, and the driver is not
> > changing this mode.
> >
> > Instruction r/w is still working becouse instruction is processed
>
> s/becouse/because/
>
> > from the DAC after chip select is deasserted, this works until
> > loop mode is 0 or greater than the instruction size.
> >
> > All initial operations should be more safely done in instruction
> > mode, a mode provided for this.
> >
> > Signed-off-by: Angelo Dureghello <adureghello@...libre.com>
> > ---
> > drivers/iio/dac/ad3552r-hs.c | 22 ++++++++++++++++++++++
> > 1 file changed, 22 insertions(+)
> >
> > diff --git a/drivers/iio/dac/ad3552r-hs.c b/drivers/iio/dac/ad3552r-hs.c
> > index 27949f207d42..991b11702273 100644
> > --- a/drivers/iio/dac/ad3552r-hs.c
> > +++ b/drivers/iio/dac/ad3552r-hs.c
> > @@ -132,6 +132,13 @@ static int ad3552r_hs_buffer_postenable(struct iio_dev
> > *indio_dev)
> > return -EINVAL;
> > }
> >
> > + /* Primary region access, set streaming mode (now in SPI + SDR). */
> > + ret = ad3552r_qspi_update_reg_bits(st,
> > +
> > AD3552R_REG_ADDR_INTERFACE_CONFIG_B,
> > + AD3552R_MASK_SINGLE_INST, 0, 1);
> > + if (ret)
> > + return ret;
>
> Do we need to undo this operation before we return in the case of an error
> later in this function?
Seems reasonable to me...
- Nuno Sá
Powered by blists - more mailing lists