Linux IIO development
 help / color / mirror / Atom feed
From: Jonathan Cameron <jic23@kernel.org>
To: Andy Shevchenko <andriy.shevchenko@intel.com>
Cc: Hungyu Lin <dennylin0707@gmail.com>,
	lars@metafoo.de, Michael.Hennerich@analog.com,
	gregkh@linuxfoundation.org, dlechner@baylibre.com,
	nuno.sa@analog.com, andy@kernel.org, m32285159@gmail.com,
	linux-iio@vger.kernel.org, linux-staging@lists.linux.dev,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH v3] staging: iio: addac: adt7316: document SPI interface switching sequence
Date: Mon, 11 May 2026 14:46:05 +0100	[thread overview]
Message-ID: <20260511144605.76c8ff39@jic23-huawei> (raw)
In-Reply-To: <agGtKQs0V679s6Kx@ashevche-desk.local>

On Mon, 11 May 2026 13:19:21 +0300
Andy Shevchenko <andriy.shevchenko@intel.com> wrote:

> On Mon, May 11, 2026 at 02:31:27AM +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.
> > 
> > Datasheet: https://www.analog.com/en/products/adt7316.html
> > Signed-off-by: Hungyu Lin <dennylin0707@gmail.com>  
> 
> Thanks, almost there!
> Please, address the below and feel free to add
> Reviewed-by: Andy Shevchenko <andriy.shevchenko@intel.com>
> to your v4 of this patch.
> 
> Also I think we don't need "staging" in the Subject, as we can deduce that,
> in any case it's up to Jonathan (and yes, I see the common use of the pattern
> in the Git history).

I think keeping staging is appropriate for a couple of reasons.

1) Affects who looks at it.  
2) Aligns with the more general pattern for most of staging that goes
   directly through Greg rather than via another tree like IIO.

> 
> ...
> 
> > Changes in v3:
> > - Add Datasheet tag
> > - Use datasheet name in code comment  
> 
> ...
> 
> > +	/*
> > +	 * The device powers up in I2C mode. Switching to SPI mode
> > +	 * requires sending a sequence of SPI writes as described in
> > +	 * the datasheet "ADT7316/ADT7317/ADT7318", Rev. B.  
> 
> Yeah, but you dropped the section title...
> 
> 	 * the datasheet "ADT7316/ADT7317/ADT7318", Rev. B in
> 	 * the section "...".

Absolutely agree on this! Can be hard to find this stuff in the bigger
datasheets :(
> 
> > +	 * 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.
> > +	 *
> > +	 * TL;DR: Do not change this!
> > +	 */  
> 


  reply	other threads:[~2026-05-11 13:46 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-05-11  2:31 [PATCH v3] staging: iio: addac: adt7316: document SPI interface switching sequence Hungyu Lin
2026-05-11  3:00 ` Maxwell Doose
2026-05-11 10:19 ` Andy Shevchenko
2026-05-11 13:46   ` Jonathan Cameron [this message]
2026-05-11 13:48 ` Jonathan Cameron

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=20260511144605.76c8ff39@jic23-huawei \
    --to=jic23@kernel.org \
    --cc=Michael.Hennerich@analog.com \
    --cc=andriy.shevchenko@intel.com \
    --cc=andy@kernel.org \
    --cc=dennylin0707@gmail.com \
    --cc=dlechner@baylibre.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=lars@metafoo.de \
    --cc=linux-iio@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-staging@lists.linux.dev \
    --cc=m32285159@gmail.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