[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <ZliWSBihPdkkYoTg@smile.fi.intel.com>
Date: Thu, 30 May 2024 18:07:52 +0300
From: Andy Shevchenko <andriy.shevchenko@...ux.intel.com>
To: "Nechita, Ramona" <Ramona.Nechita@...log.com>
Cc: "linux-iio@...r.kernel.org" <linux-iio@...r.kernel.org>,
Jonathan Cameron <jic23@...nel.org>,
Lars-Peter Clausen <lars@...afoo.de>,
"Hennerich, Michael" <Michael.Hennerich@...log.com>,
Liam Girdwood <lgirdwood@...il.com>,
Mark Brown <broonie@...nel.org>, "Sa, Nuno" <Nuno.Sa@...log.com>,
Marius Cristea <marius.cristea@...rochip.com>,
"Schmitt, Marcelo" <Marcelo.Schmitt@...log.com>,
Maksim Kiselev <bigunclemax@...il.com>,
Ivan Mikhaylov <fr0st61te@...il.com>,
Marcus Folkesson <marcus.folkesson@...il.com>,
Liam Beguin <liambeguin@...il.com>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] drivers: iio: adc: add support for ad777x family
On Wed, May 29, 2024 at 03:45:58PM +0000, Nechita, Ramona wrote:
> >On Wed, May 29, 2024 at 03:01:06PM +0000, Nechita, Ramona wrote:
..
> >> >> + ret = ad777x_spi_write(st, AD777X_REG_SRC_N_LSB, lsb);
> >> >> + if (ret)
> >> >> + return ret;
> >> >> + ret = ad777x_spi_write(st, AD777X_REG_SRC_N_MSB, msb);
> >> >> + if (ret)
> >> >> + return ret;
> >> >
> >> >Can you use 16-bit writes?
> >> >Same Q to all similar LSB/MSB write groups.
> >>
> >> I cannot do 16-bit writes due to how the spi functions on the chip and
> >> because the registers for MSB/LSB are at different addresses.
> >
> >They are supposed to be on the different addresses.
> >You mean the distance between them > than stride?
>
> I may be misunderstanding this, but the spi read/write expects
> HeaderBit+Addr+/-Data+CRC. Writing two consecutive registers would mean
> creating a buffer with this format for each address and sending all of them
> at once, correct? I feel like that would overcomplicate the code a bit, but I
> can do it if it seems appropriate.
You can add a new ad777x_spi_bulk_write() where you perform needed magic.
--
With Best Regards,
Andy Shevchenko
Powered by blists - more mailing lists