linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Matti Vaittinen <mazziesaccount@gmail.com>
To: Matti Vaittinen <mazziesaccount@gmail.com>,
	Matti Vaittinen <matti.vaittinen@fi.rohmeurope.com>
Cc: Jonathan Cameron <jic23@kernel.org>,
	Lars-Peter Clausen <lars@metafoo.de>,
	Rob Herring <robh@kernel.org>,
	Krzysztof Kozlowski <krzk+dt@kernel.org>,
	Conor Dooley <conor+dt@kernel.org>,
	Matti Vaittinen <mazziesaccount@gmail.com>,
	Nuno Sa <nuno.sa@analog.com>,
	David Lechner <dlechner@baylibre.com>,
	Javier Carrasco <javier.carrasco.cruz@gmail.com>,
	linux-iio@vger.kernel.org, devicetree@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: [PATCH v3 0/8] Support ROHM BD79104 ADC
Date: Mon, 7 Apr 2025 13:44:46 +0300	[thread overview]
Message-ID: <cover.1744022065.git.mazziesaccount@gmail.com> (raw)

[-- Attachment #1: Type: text/plain, Size: 2377 bytes --]

The ROHM BD79104 ADC is a 12 bit, 8-channel ADC controlled via SPI.

The communication over SPI uses similar protocol as the ti-adc128s052.
In order to avoid code duplication, the support for the ROHM IC is
added in the same driver.

The driver side differencies between the ti-adc128s052 and the ROHM
BD79104 are related to the supply regulator handling. The BD79104
requires supplies for the VDD and IOVDD. The ti-adc128s052 driver
handles only the reference voltage supply, even though the TI data-sheet
indicates it can also have separate supplies.

Hardware vise the ROHM BD79104 requires SPI MODE 3, and has also some SPI
frequency limitations.

I decided to add own binding document for the ROHM BD79104 so it is
easier to document the SPI limitations. It also allows using the supply
names from the data sheet. And finally, it gives users of this IC a
better hint that it is supported.

I added myself as a maintainer for the driver, so I can stay on track of
the changes to it. If anyone with experience with (and acces to) the
TI's ICs has the energy ... feel free to add more maintainers.

This series was based on the v6.15-rc1

Revision history:

v2 = v3:
 - Rebase on v6.15-rc1
 - Minor improvements to the Vref handling
 - Add MAINTAINERS entry
v1 => v2:
 - Drop the claim that original driver is broken for BE and rename the
   patch 0001 accordingly
 - Fix race when filling the SPI message
 - Check return value for the devm_mutex_init()
 - Add a RFC patch for dropping the support for variable Vref.

---

Matti Vaittinen (8):
  dt-bindings: ROHM BD79104 ADC
  iio: adc: ti-adc128s052: Simplify using be16_to_cpu()
  iio: adc: ti-adc128s052: Be consistent with arrays
  iio: adc: ti-adc128s052: Use devm_mutex_init()
  iio: adc: ti-adc128s052: Simplify using guard(mutex)
  iio: adc: ti-adc128s052: Support ROHM BD79104
  MAINTAINERS: A driver for TI/ROHM ADCs
  iio: ti-adc128s052: Drop variable vref

 .../bindings/iio/adc/rohm,bd79104.yaml        | 69 +++++++++++++
 MAINTAINERS                                   |  6 ++
 drivers/iio/adc/Kconfig                       |  2 +-
 drivers/iio/adc/ti-adc128s052.c               | 96 ++++++++++++-------
 4 files changed, 135 insertions(+), 38 deletions(-)
 create mode 100644 Documentation/devicetree/bindings/iio/adc/rohm,bd79104.yaml

-- 
2.49.0


[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

             reply	other threads:[~2025-04-07 10:44 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-04-07 10:44 Matti Vaittinen [this message]
2025-04-07 10:45 ` [PATCH v3 1/8] dt-bindings: ROHM BD79104 ADC Matti Vaittinen
2025-04-07 11:35 ` [PATCH v3 2/8] iio: adc: ti-adc128s052: Simplify using be16_to_cpu() Matti Vaittinen
2025-04-07 11:36 ` [PATCH v3 3/8] iio: adc: ti-adc128s052: Be consistent with arrays Matti Vaittinen
2025-04-07 11:36 ` [PATCH v3 4/8] iio: adc: ti-adc128s052: Use devm_mutex_init() Matti Vaittinen
2025-04-07 11:36 ` [PATCH v3 5/8] iio: adc: ti-adc128s052: Simplify using guard(mutex) Matti Vaittinen
2025-04-07 11:36 ` [PATCH v3 6/8] iio: adc: ti-adc128s052: Support ROHM BD79104 Matti Vaittinen
2025-04-07 11:36 ` [PATCH v3 7/8] MAINTAINERS: A driver for TI/ROHM ADCs Matti Vaittinen
2025-04-07 11:37 ` [PATCH RFC v3 8/8] iio: ti-adc128s052: Drop variable vref Matti Vaittinen
2025-04-11 13:34   ` David Lechner
2025-04-12 11:42     ` Jonathan Cameron
2025-04-14  6:03       ` Matti Vaittinen
2025-04-14  6:00     ` Matti Vaittinen

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=cover.1744022065.git.mazziesaccount@gmail.com \
    --to=mazziesaccount@gmail.com \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=dlechner@baylibre.com \
    --cc=javier.carrasco.cruz@gmail.com \
    --cc=jic23@kernel.org \
    --cc=krzk+dt@kernel.org \
    --cc=lars@metafoo.de \
    --cc=linux-iio@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=matti.vaittinen@fi.rohmeurope.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).