From: Matti Vaittinen <mazziesaccount@gmail.com>
To: Matti Vaittinen <mazziesaccount@gmail.com>,
Matti Vaittinen <matti.vaittinen@fi.rohmeurope.com>
Cc: Lee Jones <lee@kernel.org>, Rob Herring <robh@kernel.org>,
Krzysztof Kozlowski <krzk+dt@kernel.org>,
Conor Dooley <conor+dt@kernel.org>,
Jonathan Cameron <jic23@kernel.org>,
Lars-Peter Clausen <lars@metafoo.de>,
Matti Vaittinen <mazziesaccount@gmail.com>,
Linus Walleij <linus.walleij@linaro.org>,
Nuno Sa <nuno.sa@analog.com>,
David Lechner <dlechner@baylibre.com>,
Dumitru Ceclan <mitrutzceclan@gmail.com>,
Trevor Gamblin <tgamblin@baylibre.com>,
Matteo Martelli <matteomartelli3@gmail.com>,
AngeloGioacchino Del Regno
<angelogioacchino.delregno@collabora.com>,
devicetree@vger.kernel.org, linux-kernel@vger.kernel.org,
linux-iio@vger.kernel.org, linux-gpio@vger.kernel.org
Subject: [RFC PATCH 0/5] Support ROHM BD79124 ADC/GPO
Date: Fri, 31 Jan 2025 15:34:43 +0200 [thread overview]
Message-ID: <cover.1738328714.git.mazziesaccount@gmail.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 2905 bytes --]
Support ROHM BD79124 ADC.
Quite usual stuff. 12-bit, 8-channel ADC with threshold monitoring.
Except that:
- each ADC input pin can be configured as a general purpose output.
- manually starting an ADC conversion and reading the result would
require the I2C _master_ to do clock stretching(!) for the duration
of the conversion... Let's just say this is not well supported.
- IC supports 'autonomous measurement mode' and storing latest results
to the result registers. This mode is used by the driver due to the
"peculiar" I2C when doing manual reads.
I sent this as an RFC because I implemented the pin purposing (GPO/ADC)
using pinmux - which I've never done for upstream stuff before. Hence
it's better to ask if this makes sense, or if there is better way to go.
Anyways, resulted drivers spread to 3 subsystems (MFD, pinctrl and IIO).
Furthermore, the GPO functionality has not been (properly) tested. I'll
do more testing for v2 if this pinmux approach is appropriate.
Furthermore, because the ADC uses this continuous autonomous measuring,
and because the IC keeps producing new 'out of window' IRQs if
measurements are out of window - the driver disables the event when
sending one. This prevents generating storm of events, but it also
requires users to reconfigure / re-enable an event if they wish to
continue monitoring after receiving one. Again I am not sure if this is
the best way to handle such HW - so better to ask for an opinion than a
nose bleed, right? Maybe the next version will no longer be a RFC :)
---
Matti Vaittinen (5):
dt-bindings: ROHM BD79124 ADC/GPO
mfd: Add ROHM BD79124 ADC/GPO
iio: adc: Support ROHM BD79124 ADC
pinctrl: Support ROHM BD79124 pinmux / GPO
MAINTAINERS: Add ROHM BD79124 ADC/GPO
.../devicetree/bindings/mfd/rohm,bd79124.yaml | 111 +++
MAINTAINERS | 8 +
drivers/iio/adc/Kconfig | 10 +
drivers/iio/adc/Makefile | 1 +
drivers/iio/adc/rohm-bd79124-adc.c | 890 ++++++++++++++++++
drivers/mfd/Kconfig | 12 +
drivers/mfd/Makefile | 1 +
drivers/mfd/rohm-bd79124.c | 165 ++++
drivers/pinctrl/Kconfig | 11 +
drivers/pinctrl/Makefile | 1 +
drivers/pinctrl/pinctrl-bd79124.c | 276 ++++++
include/linux/mfd/rohm-bd79124.h | 32 +
12 files changed, 1518 insertions(+)
create mode 100644 Documentation/devicetree/bindings/mfd/rohm,bd79124.yaml
create mode 100644 drivers/iio/adc/rohm-bd79124-adc.c
create mode 100644 drivers/mfd/rohm-bd79124.c
create mode 100644 drivers/pinctrl/pinctrl-bd79124.c
create mode 100644 include/linux/mfd/rohm-bd79124.h
base-commit: 5bc55a333a2f7316b58edc7573e8e893f7acb532
--
2.48.1
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
next reply other threads:[~2025-01-31 13:35 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-01-31 13:34 Matti Vaittinen [this message]
2025-01-31 13:36 ` [RFC PATCH 1/5] dt-bindings: ROHM BD79124 ADC/GPO Matti Vaittinen
2025-01-31 13:37 ` [RFC PATCH 2/5] mfd: Add " Matti Vaittinen
2025-01-31 17:14 ` Jonathan Cameron
2025-02-01 16:04 ` Matti Vaittinen
2025-02-05 13:40 ` Matti Vaittinen
2025-01-31 13:37 ` [RFC PATCH 3/5] iio: adc: Support ROHM BD79124 ADC Matti Vaittinen
2025-01-31 17:41 ` Jonathan Cameron
2025-02-01 15:38 ` Matti Vaittinen
2025-02-01 16:26 ` Jonathan Cameron
2025-02-05 13:58 ` Matti Vaittinen
2025-02-08 13:01 ` Jonathan Cameron
2025-01-31 13:38 ` [RFC PATCH 4/5] pinctrl: Support ROHM BD79124 pinmux / GPO Matti Vaittinen
2025-02-05 13:40 ` Matti Vaittinen
2025-02-06 9:39 ` Linus Walleij
2025-02-06 10:05 ` Matti Vaittinen
2025-02-06 10:09 ` Matti Vaittinen
2025-02-13 11:53 ` Linus Walleij
2025-02-13 12:10 ` Matti Vaittinen
2025-02-13 16:18 ` David Lechner
2025-01-31 13:38 ` [RFC PATCH 5/5] MAINTAINERS: Add ROHM BD79124 ADC/GPO Matti Vaittinen
2025-01-31 17:08 ` [RFC PATCH 0/5] Support " Jonathan Cameron
2025-02-01 15:00 ` Matti Vaittinen
2025-02-01 16:30 ` Jonathan Cameron
2025-02-01 17:12 ` 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.1738328714.git.mazziesaccount@gmail.com \
--to=mazziesaccount@gmail.com \
--cc=angelogioacchino.delregno@collabora.com \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=dlechner@baylibre.com \
--cc=jic23@kernel.org \
--cc=krzk+dt@kernel.org \
--cc=lars@metafoo.de \
--cc=lee@kernel.org \
--cc=linus.walleij@linaro.org \
--cc=linux-gpio@vger.kernel.org \
--cc=linux-iio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=matteomartelli3@gmail.com \
--cc=matti.vaittinen@fi.rohmeurope.com \
--cc=mitrutzceclan@gmail.com \
--cc=nuno.sa@analog.com \
--cc=robh@kernel.org \
--cc=tgamblin@baylibre.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;
as well as URLs for NNTP newsgroup(s).