All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andy Shevchenko <andriy.shevchenko@intel.com>
To: Matti Vaittinen <mazziesaccount@gmail.com>
Cc: "Matti Vaittinen" <matti.vaittinen@fi.rohmeurope.com>,
	"Matti Vaittinen" <matti.vaittinen@linux.dev>,
	"Jonathan Cameron" <jic23@kernel.org>,
	"David Lechner" <dlechner@baylibre.com>,
	"Nuno Sá" <nuno.sa@analog.com>,
	"Andy Shevchenko" <andy@kernel.org>,
	"Rob Herring" <robh@kernel.org>,
	"Krzysztof Kozlowski" <krzk+dt@kernel.org>,
	"Conor Dooley" <conor+dt@kernel.org>,
	linux-iio@vger.kernel.org, devicetree@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH 4/4] bd79703: Support ROHM BD7971x DACs
Date: Thu, 3 Dec 2026 19:09:29 +0200	[thread overview]
Message-ID: <axGiSc4pD_tm0lv-@ashevche-desk.local> (raw)
In-Reply-To: <dad8730304665b9a8bed56c3b7b5eaf3d58c78fb.1796049052.git.mazziesaccount@gmail.com>

On Wed, Dec 02, 2026 at 03:39:21PM +0200, Matti Vaittinen wrote:

> The BD7971x are logically similar to BD7970x. Main difference is the
> amount of bits in DAC-word. The BD7970x had 8-bit DAC whereas the
> BD7971x use 10-bit DAC word.
> 
> The SPI data format differs. The BD7971x requires two least significant
> bits to be zeroes, and carries the DAC word in following 10 bits. The
> channel number is in highest 4 bits.
> 
> Add support for the BD7971x family of DACs.

Subject went wrong (w/o required prefix).

...

> +/* The BD7971X uses 16-bit data transfers. Four high bits define the channel
> + * and following 10 bits define the DAC word. Two last bits must be zero.
> + *
> + * Let's try having the 4 channel-bits as an address and following bits as data
> + */

/*
 * The multi-line comment style should follow this
 * example. It's even inconsistent to the one used
 * in the driver.
 */

...

>  	struct bd79703_data *data = iio_priv(idev);
> +	unsigned int tmp = val;

This signed->unsigned trick begs for a comment. It's quite easy to miss and
someone might introduce some issues due to that.

-- 
With Best Regards,
Andy Shevchenko



  reply	other threads:[~2026-12-03 17:09 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-12-02 13:38 [PATCH 0/4] Support ROHM BD7971x family of DACs Matti Vaittinen
2026-12-02 13:38 ` [PATCH 1/4] dt-bindings: iio: bd79703: Fix VFS explanation Matti Vaittinen
2026-12-02 13:38 ` [PATCH 2/4] dt-bindings: iio: dac: Add ROHM BD7971x Matti Vaittinen
2026-12-02 18:05   ` Conor Dooley
2026-12-03  6:54     ` Matti Vaittinen
2026-12-03  8:35       ` Conor Dooley
2026-12-03  9:03         ` Matti Vaittinen
2026-12-03 12:10         ` Matti Vaittinen
2026-12-03 16:36           ` Conor Dooley
2026-12-04  5:52             ` Matti Vaittinen
2026-12-02 13:39 ` [PATCH 3/4] iio: dac: rohm-bd79703: Avoid copying chip-data Matti Vaittinen
2026-12-03 17:10   ` Andy Shevchenko
2026-12-02 13:39 ` [PATCH 4/4] bd79703: Support ROHM BD7971x DACs Matti Vaittinen
2026-12-03 17:09   ` Andy Shevchenko [this message]
2026-12-04  5:58     ` Matti Vaittinen
2026-12-04  9:39       ` Andy Shevchenko

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=axGiSc4pD_tm0lv-@ashevche-desk.local \
    --to=andriy.shevchenko@intel.com \
    --cc=andy@kernel.org \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=dlechner@baylibre.com \
    --cc=jic23@kernel.org \
    --cc=krzk+dt@kernel.org \
    --cc=linux-iio@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=matti.vaittinen@fi.rohmeurope.com \
    --cc=matti.vaittinen@linux.dev \
    --cc=mazziesaccount@gmail.com \
    --cc=nuno.sa@analog.com \
    --cc=robh@kernel.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.