From: Olivier Moysan <olivier.moysan@foss.st.com>
To: <fabrice.gasnier@foss.st.com>,
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>,
Olivier Moysan <olivier.moysan@foss.st.com>,
Arnaud Pouliquen <arnaud.pouliquen@foss.st.com>,
Maxime Coquelin <mcoquelin.stm32@gmail.com>,
Alexandre Torgue <alexandre.torgue@foss.st.com>,
Nuno Sa <nuno.sa@analog.com>, Liam Girdwood <lgirdwood@gmail.com>,
Mark Brown <broonie@kernel.org>
Cc: <linux-iio@vger.kernel.org>, <devicetree@vger.kernel.org>,
<linux-kernel@vger.kernel.org>, <alsa-devel@alsa-project.org>,
<linux-stm32@st-md-mailman.stormreply.com>,
<linux-arm-kernel@lists.infradead.org>
Subject: [PATCH v2 0/8] iio: adc: dfsdm: add scaling support
Date: Tue, 25 Jun 2024 17:07:08 +0200 [thread overview]
Message-ID: <20240625150717.1038212-1-olivier.moysan@foss.st.com> (raw)
The aim of this serie is to add scaling support to STM32 DFSDM
peripheral in the analog context.
The DFSDM currently operates as a consumer of IIO channels
provided by a generic SD modulator. As previously discussed in RFC [1],
this topology is not suitable for implementing scaling.
This series brings the integration of the DFSDM driver with the new
IIO backend framework [2], enabling the DFSDM IIO device to offer
scaling feature based on reference voltage data obtained from the
IIO SD modulator backend. This generic SD modulator backend takes the
place of the former SD modulator, used with legacy implementation.
The DFSDM driver has been updated to adopt the generic ADC channel
binding [3]. The reasons for this include:
- Reducing the use of proprietary properties
- Simplifying the coexistence of legacy and new backend bindings
- Prepare the support of the MDF peripheral on STM32MP25 SoC
Backward compatibility is maintained through legacy support.
This series extends the backend framework with the following APIs:
- iio_backend_read_raw:
This API is intented to retrieve the voltage information from the
backend. It is based on IIO framework read_raw API.
- iio_backend_disable / iio_backend_enable:
backend enable/disable to be used for PM management
- devm_iio_backend_fwnode_get
Intended for parsing DT subnodes to allow generic channel binding
support, as generic channel DT nodes are not populated as devices.
[1]: https://lore.kernel.org/lkml/20200204101008.11411-1-olivier.moysan@st.com/
[2]: https://lore.kernel.org/all/20240206-iio-backend-v9-0-df66d159c000@analog.com/
[3]: devicetree/bindings/iio/adc/adc.yaml
Changes in v2:
- Update enable/disable backend API
- Rename devm_iio_backend_subnode_get(), as devm_iio_backend_fwnode_get()
- Update iio_backend_read_raw() prototype to fully match IIO framework
read_raw callback prototype.
- Change st,adc-channel-type property name and type in DFSDM binding
- Remove sd-backend and rename ads1201 compatibles in SD binding
Conor, in this v2, I left the SD modulator driver & binding unchanged,
regarding the naming issue you raised previously.
The problem here is that we have two versions of the generic sigma delta
modulator driver: one for legacy support and a new one to support new
binding. Maybe an alternate, is to rename former sd modulator as
"legacy" or something similar.
I will address this point in a v3 if necessary.
Olivier Moysan (8):
iio: add read raw service to iio backend framework
iio: add enable and disable services to iio backend framework
iio: add child nodes support in iio backend framework
dt-bindings: iio: dfsdm: move to backend framework
dt-bindings: iio: add sigma delta modulator backend
iio: adc: stm32-dfsdm: adopt generic channels bindings
iio: add sd modulator generic iio backend
iio: adc: stm32-dfsdm: add scaling support to dfsdm
.../iio/adc/sd-modulator-backend.yaml | 39 +++
.../bindings/iio/adc/st,stm32-dfsdm-adc.yaml | 157 ++++++++-
drivers/iio/adc/Kconfig | 11 +
drivers/iio/adc/Makefile | 1 +
drivers/iio/adc/sd_adc_backend.c | 117 +++++++
drivers/iio/adc/stm32-dfsdm-adc.c | 302 +++++++++++++++---
drivers/iio/industrialio-backend.c | 108 +++++--
include/linux/iio/backend.h | 10 +-
8 files changed, 679 insertions(+), 66 deletions(-)
create mode 100644 Documentation/devicetree/bindings/iio/adc/sd-modulator-backend.yaml
create mode 100644 drivers/iio/adc/sd_adc_backend.c
base-commit: 2dfa1b7bfc07e58acb9f9eaa8c871f37189dbfee
--
2.25.1
next reply other threads:[~2024-06-25 15:10 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-06-25 15:07 Olivier Moysan [this message]
2024-06-25 15:07 ` [PATCH v2 4/8] dt-bindings: iio: dfsdm: move to backend framework Olivier Moysan
2024-06-28 21:35 ` Rob Herring
2024-07-03 8:28 ` Olivier MOYSAN
2024-06-25 15:07 ` [PATCH v2 5/8] dt-bindings: iio: add sigma delta modulator backend Olivier Moysan
2024-06-25 15:34 ` Conor Dooley
2024-06-26 16:40 ` Olivier MOYSAN
2024-06-27 16:13 ` Conor Dooley
2024-07-03 7:06 ` Olivier MOYSAN
2024-07-03 7:22 ` Olivier MOYSAN
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=20240625150717.1038212-1-olivier.moysan@foss.st.com \
--to=olivier.moysan@foss.st.com \
--cc=alexandre.torgue@foss.st.com \
--cc=alsa-devel@alsa-project.org \
--cc=arnaud.pouliquen@foss.st.com \
--cc=broonie@kernel.org \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=fabrice.gasnier@foss.st.com \
--cc=jic23@kernel.org \
--cc=krzk+dt@kernel.org \
--cc=lars@metafoo.de \
--cc=lgirdwood@gmail.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-iio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-stm32@st-md-mailman.stormreply.com \
--cc=mcoquelin.stm32@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 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).