public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
To: "Nechita, Ramona" <Ramona.Nechita@analog.com>
Cc: "linux-iio@vger.kernel.org" <linux-iio@vger.kernel.org>,
	Jonathan Cameron <jic23@kernel.org>,
	Lars-Peter Clausen <lars@metafoo.de>,
	"Hennerich, Michael" <Michael.Hennerich@analog.com>,
	Liam Girdwood <lgirdwood@gmail.com>,
	Mark Brown <broonie@kernel.org>, "Sa, Nuno" <Nuno.Sa@analog.com>,
	Marius Cristea <marius.cristea@microchip.com>,
	"Schmitt, Marcelo" <Marcelo.Schmitt@analog.com>,
	Maksim Kiselev <bigunclemax@gmail.com>,
	Ivan Mikhaylov <fr0st61te@gmail.com>,
	Marcus Folkesson <marcus.folkesson@gmail.com>,
	Liam Beguin <liambeguin@gmail.com>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] drivers: iio: adc: add support for ad777x family
Date: Thu, 30 May 2024 18:07:52 +0300	[thread overview]
Message-ID: <ZliWSBihPdkkYoTg@smile.fi.intel.com> (raw)
In-Reply-To: <SN6PR03MB432024DCE5978841F016A71FF3F22@SN6PR03MB4320.namprd03.prod.outlook.com>

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



  reply	other threads:[~2024-05-30 15:07 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-05-22 11:59 [PATCH] drivers: iio: adc: add support for ad777x family ranechita
2024-05-22 14:18 ` Andy Shevchenko
2024-05-29 15:01   ` Nechita, Ramona
2024-05-29 15:11     ` Andy Shevchenko
2024-05-29 15:45       ` Nechita, Ramona
2024-05-30 15:07         ` Andy Shevchenko [this message]
2024-05-22 14:35 ` Nuno Sá
2024-05-22 15:01   ` Nechita, Ramona
2024-05-22 15:07     ` Andy Shevchenko
2024-05-22 22:40 ` kernel test robot
2024-05-24  7:17 ` kernel test robot

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=ZliWSBihPdkkYoTg@smile.fi.intel.com \
    --to=andriy.shevchenko@linux.intel.com \
    --cc=Marcelo.Schmitt@analog.com \
    --cc=Michael.Hennerich@analog.com \
    --cc=Nuno.Sa@analog.com \
    --cc=Ramona.Nechita@analog.com \
    --cc=bigunclemax@gmail.com \
    --cc=broonie@kernel.org \
    --cc=fr0st61te@gmail.com \
    --cc=jic23@kernel.org \
    --cc=lars@metafoo.de \
    --cc=lgirdwood@gmail.com \
    --cc=liambeguin@gmail.com \
    --cc=linux-iio@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=marcus.folkesson@gmail.com \
    --cc=marius.cristea@microchip.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox