mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: David Lechner <dlechner@baylibre.com>
To: Angelo Dureghello <adureghello@baylibre.com>
Cc: Lars-Peter Clausen <lars@metafoo.de>,
	Michael Hennerich <Michael.Hennerich@analog.com>,
	Jonathan Cameron <jic23@kernel.org>,
	Mihail Chindris <mihail.chindris@analog.com>,
	Nuno Sa <nuno.sa@analog.com>,
	Jonathan Cameron <Jonathan.Cameron@huawei.com>,
	linux-iio@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2 6/9] iio: dac: ad3552r-hs: use instruction mode for configuration
Date: Thu, 9 Jan 2025 12:04:54 -0600	[thread overview]
Message-ID: <e6bd5a48-1ba2-4a01-af75-fbf74a0de3c3@baylibre.com> (raw)
In-Reply-To: <gnh2oayoj5bwqwrixm5x5qtjdq5i3cclokekkezagonl65su3m@b6b4p7duyot5>

On 1/9/25 11:25 AM, Angelo Dureghello wrote:
> Hi,
> 
> On 08.01.2025 15:16, David Lechner wrote:
>> On 1/8/25 11:29 AM, Angelo Dureghello wrote:
>>> From: Angelo Dureghello <adureghello@baylibre.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.
>>
>> I'm not sure it is really "safer". The way I read the datasheet, this just
>> enables bulk reads of multiple registers. So unless we need to do bulk reads
>> it seems like this is just adding extra complexity to the driver without a
>> tangible benefit.
>>
> 
> this change was initially requested from the HDL team to stay aligned with
> the HDL side streaming/non streaming mode, and later, applied since seems
> a safer way to operate.
> 
> I see that for the driver and DAC point of view, this is "functionally"
> not needed, but streaming mode for configuration or raw read/write works
> until STREAM_MODE register is set to 0 or to a value >= to the register
> size to be accessed, since the _CS deasserting completes the transaction.
> 
> I.e., a transaction with a STREAM_MODE set to 1 would fail in case of 
> a 16bit r/w access. Staying into streaming mode seems to me a bit tricky,
> and setting to instruction mode may be safer since in this mode the
> STREAM_MODE value is not important anymore.
> 
> For me is the same, i can remove related code. As you prefer.
> 
If it really does make a difference, I'm OK to keep it.

  reply	other threads:[~2025-01-09 18:05 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-01-08 17:29 [PATCH v2 0/9] iio: ad3552r-hs: add support for ad3541/42r Angelo Dureghello
2025-01-08 17:29 ` [PATCH v2 1/9] iio: dac: ad3552r-common: fix ad3541/2r ranges Angelo Dureghello
2025-01-08 20:43   ` David Lechner
2025-01-12 13:35     ` Jonathan Cameron
2025-01-08 17:29 ` [PATCH v2 2/9] iio: dac: ad3552r-hs: clear reset status flag Angelo Dureghello
2025-01-08 20:51   ` David Lechner
2025-01-12 13:36     ` Jonathan Cameron
2025-01-08 17:29 ` [PATCH v2 3/9] iio: dac: adi-axi-dac: modify stream enable Angelo Dureghello
2025-01-08 21:00   ` David Lechner
2025-01-08 17:29 ` [PATCH v2 4/9] iio: dac: adi-axi-dac: add bus mode setup Angelo Dureghello
2025-01-08 21:06   ` David Lechner
2025-01-08 17:29 ` [PATCH v2 5/9] iio: dac: ad3552r-hs: fix message on wrong chip id Angelo Dureghello
2025-01-12 14:20   ` Jonathan Cameron
2025-01-08 17:29 ` [PATCH v2 6/9] iio: dac: ad3552r-hs: use instruction mode for configuration Angelo Dureghello
2025-01-08 21:16   ` David Lechner
2025-01-09 17:25     ` Angelo Dureghello
2025-01-09 18:04       ` David Lechner [this message]
2025-01-08 17:29 ` [PATCH v2 7/9] iio: dac: ad3552r: share model data structures Angelo Dureghello
2025-01-08 21:19   ` David Lechner
2025-01-08 17:29 ` [PATCH v2 8/9] iio: dac: ad3552r-hs: add ad3541/2r support Angelo Dureghello
2025-01-08 21:37   ` David Lechner
2025-01-12 14:36   ` Jonathan Cameron
2025-01-14  9:18     ` Angelo Dureghello
2025-01-08 17:29 ` [PATCH v2 9/9] iio: dac: ad3552r-hs: update function name (non functional) Angelo Dureghello
2025-01-08 21:39   ` David Lechner

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=e6bd5a48-1ba2-4a01-af75-fbf74a0de3c3@baylibre.com \
    --to=dlechner@baylibre.com \
    --cc=Jonathan.Cameron@huawei.com \
    --cc=Michael.Hennerich@analog.com \
    --cc=adureghello@baylibre.com \
    --cc=jic23@kernel.org \
    --cc=lars@metafoo.de \
    --cc=linux-iio@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mihail.chindris@analog.com \
    --cc=nuno.sa@analog.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

all inboxes | Powered by JetHome®