From: Andy Shevchenko <andriy.shevchenko@intel.com>
To: Hungyu Lin <dennylin0707@gmail.com>
Cc: lars@metafoo.de, Michael.Hennerich@analog.com, jic23@kernel.org,
gregkh@linuxfoundation.org, dlechner@baylibre.com,
nuno.sa@analog.com, andy@kernel.org, linux-iio@vger.kernel.org,
linux-staging@lists.linux.dev, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] staging: iio: addac: adt7316: document SPI interface switching sequence
Date: Sun, 10 May 2026 10:45:45 +0300 [thread overview]
Message-ID: <agA3qSyLQs1_ySKh@ashevche-desk.local> (raw)
In-Reply-To: <20260510072918.85734-1-dennylin0707@gmail.com>
On Sun, May 10, 2026 at 07:29:18AM +0000, Hungyu Lin wrote:
> The device powers up in I2C mode. Switching to SPI mode
> requires sending a sequence of SPI writes as described in
> the datasheet.
>
> During this sequence, the device may still be in I2C mode,
> so SPI transactions may not be recognized and can fail.
> Such errors are expected and are ignored.
>
> Add a comment to clarify this behavior.
...
> - /* switch from default I2C protocol to SPI protocol */
> + /*
> + * The device powers up in I2C mode. Switching to SPI mode
> + * requires sending a sequence of SPI writes as described in
> + * the datasheet.
Add a reference (Section number and title, and/or table / chart number
and its title).
> + * During this sequence, the device may still be in I2C mode,
> + * so SPI transactions may not be recognized and can fail.
> + * Such errors are expected and are ignored.
> + */
Otherwise it is indeed what we want to be here.
Perhaps also add a line closer to the code (that will be visible in the patch
in case someone ignores to read the comment)
*
* TL;DR: Do not change this!
*/
--
With Best Regards,
Andy Shevchenko
prev parent reply other threads:[~2026-05-10 7:45 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-05-10 7:29 Hungyu Lin
2026-05-10 7:45 ` Andy Shevchenko [this message]
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=agA3qSyLQs1_ySKh@ashevche-desk.local \
--to=andriy.shevchenko@intel.com \
--cc=Michael.Hennerich@analog.com \
--cc=andy@kernel.org \
--cc=dennylin0707@gmail.com \
--cc=dlechner@baylibre.com \
--cc=gregkh@linuxfoundation.org \
--cc=jic23@kernel.org \
--cc=lars@metafoo.de \
--cc=linux-iio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-staging@lists.linux.dev \
--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®