From: Conor Dooley <conor@kernel.org>
To: Phil Elwell <phil@raspberrypi.com>
Cc: Stanimir Varbanov <svarbanov@suse.de>,
Guenter Roeck <linux@roeck-us.net>,
linux-kernel@vger.kernel.org, devicetree@vger.kernel.org,
linux-arm-kernel@lists.infradead.org,
linux-rpi-kernel@lists.infradead.org,
Broadcom internal kernel review list
<bcm-kernel-feedback-list@broadcom.com>,
linux-hwmon@vger.kernel.org, Jean Delvare <jdelvare@suse.com>,
Rob Herring <robh@kernel.org>,
Florian Fainelli <florian.fainelli@broadcom.com>,
Krzysztof Kozlowski <krzk+dt@kernel.org>,
Conor Dooley <conor+dt@kernel.org>, Andrew Lunn <andrew@lunn.ch>,
Stefan Wahren <wahrenst@gmx.net>,
Saenz Julienne <nsaenz@kernel.org>,
Andrea della Porta <andrea.porta@suse.com>,
Jonathan Bell <jonathan@raspberrypi.com>,
Dave Stevenson <dave.stevenson@raspberrypi.com>
Subject: Re: [PATCH 1/4] dt-bindings: Add Raspberry Pi's RP1 ADC
Date: Tue, 30 Sep 2025 19:58:16 +0100 [thread overview]
Message-ID: <20250930-overlord-scion-d60cff2ef1f5@spud> (raw)
In-Reply-To: <CAMEGJJ0KqPX462iigbMP+fwoyZgZ1J1PqaWt82MrNTW1VMwbpQ@mail.gmail.com>
[-- Attachment #1: Type: text/plain, Size: 3561 bytes --]
On Tue, Sep 30, 2025 at 11:47:58AM +0100, Phil Elwell wrote:
> Hi Stanimir, Guenter,
>
> On Tue, 30 Sept 2025 at 11:21, Stanimir Varbanov <svarbanov@suse.de> wrote:
> >
> > Hi,
> >
> > On 9/25/25 11:37 PM, Guenter Roeck wrote:
> > > On Thu, Sep 25, 2025 at 08:40:54PM +0100, Conor Dooley wrote:
> > >> On Thu, Sep 25, 2025 at 03:04:13AM +0300, Stanimir Varbanov wrote:
> > >>> Document dt-bindings for Raspberry Pi's RP1 ADC.
> > >>>
> > >>> Signed-off-by: Stanimir Varbanov <svarbanov@suse.de>
> > >>> ---
> > >>> .../bindings/hwmon/raspberrypi,rp1-adc.yaml | 46 +++++++++++++++++++
> > >>> 1 file changed, 46 insertions(+)
> > >>> create mode 100644 Documentation/devicetree/bindings/hwmon/raspberrypi,rp1-adc.yaml
> > >>>
> > >>> diff --git a/Documentation/devicetree/bindings/hwmon/raspberrypi,rp1-adc.yaml b/Documentation/devicetree/bindings/hwmon/raspberrypi,rp1-adc.yaml
> > >>> new file mode 100644
> > >>> index 000000000000..5266b253fd2b
> > >>> --- /dev/null
> > >>> +++ b/Documentation/devicetree/bindings/hwmon/raspberrypi,rp1-adc.yaml
> > >>> @@ -0,0 +1,46 @@
> > >>> +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
> > >>> +%YAML 1.2
> > >>> +---
> > >>> +$id: http://devicetree.org/schemas/hwmon/raspberrypi,rp1-adc.yaml#
> > >>> +$schema: http://devicetree.org/meta-schemas/core.yaml#
> > >>> +
> > >>> +title: Rasberry Pi RP1 ADC device
> > >>> +
> > >>> +maintainers:
> > >>> + - Stanimir Varbanov <svarbanov@suse.de>
> > >>> +
> > >>> +description: |
> > >>> + The RP1 ADC is a five input successive-approximation ADC with 12-bit
> > >>> + resolution (ENOB 9.5-bit) at 500kSPS. It has four external inputs
> > >>> + and one internal temperature sensor.
> > >>> +
> > >>> +properties:
> > >>> + compatible:
> > >>> + const: raspberrypi,rp1-adc
> > >>> +
> > >>> + reg:
> > >>> + maxItems: 1
> > >>> +
> > >>> + clocks:
> > >>> + maxItems: 1
> > >>> +
> > >>> + vref-supply:
> > >>> + description:
> > >>> + Reference voltage regulator 3.3V.
> > >>
> > >> Looks like you're missing the io-channels-cells property that allows
> > >> this device to be a provider of adc channels to other devices.
> > >>
> > > Only makes sense if the driver is implemented as iio driver.
> > > Which would be fine with me, assuming this is a generic ADC.
> > > The iio -> hwmon bridge can then be used to instantiate a
> > > hwmon device if needed.
> > >
> >
> > According to the RP1 peripheral document the information about ADC is
> > limited and I cannot be 100% sure that this is generic ADC, but it looks
> > like it is. On RPi5 board the ADC inputs are not configurable, but that
> > could change on another board.
> >
> > I personally don't have objections to implement it as IIO driver.
> >
> > Phil, are you fine with implementing the driver as IIO?
>
> The problem with adding unused functionality, apart from the effort
> involved, is that testing it is harder. Will the IIO driver be
> inherently better/simpler because some of the hwmon support gets
> picked up by the generic IIO/HWMON bridge?
>
> Ultimately we'll make whatever changes are considered necessary in
> order to get this simple driver accepted, but it would be nice to feel
> there was some real world benefit now for the work, not on Pi 6/7/etc.
tbh, I don't care how the driver side of things is done, I would just
like for the binding documentation to be complete. If there's no usecase
at all where the device provides io channels, then omit the property.
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]
next prev parent reply other threads:[~2025-09-30 18:58 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-09-25 0:04 [PATCH 0/4] Add Raspberry Pi's RP1 ADC Stanimir Varbanov
2025-09-25 0:04 ` [PATCH 1/4] dt-bindings: " Stanimir Varbanov
2025-09-25 19:40 ` Conor Dooley
2025-09-25 20:37 ` Guenter Roeck
2025-09-30 10:20 ` Stanimir Varbanov
2025-09-30 10:47 ` Phil Elwell
2025-09-30 18:58 ` Conor Dooley [this message]
2025-09-25 0:04 ` [PATCH 2/4] hwmon: adc: rp1: Add Raspberry Pi's RP1 ADC driver Stanimir Varbanov
2025-09-25 0:34 ` Guenter Roeck
2025-09-25 2:42 ` Guenter Roeck
2025-09-25 5:26 ` Stefan Wahren
2025-09-25 14:34 ` Guenter Roeck
2025-09-29 21:50 ` Stanimir Varbanov
2025-09-25 0:04 ` [PATCH 3/4] arm64: dts: rp1: Add Raspberry Pi's RP1 ADC DT node Stanimir Varbanov
2025-09-25 0:04 ` [PATCH 4/4] arm64: dts: broadcom: Enable RP1 ADC for RPi5 Stanimir Varbanov
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=20250930-overlord-scion-d60cff2ef1f5@spud \
--to=conor@kernel.org \
--cc=andrea.porta@suse.com \
--cc=andrew@lunn.ch \
--cc=bcm-kernel-feedback-list@broadcom.com \
--cc=conor+dt@kernel.org \
--cc=dave.stevenson@raspberrypi.com \
--cc=devicetree@vger.kernel.org \
--cc=florian.fainelli@broadcom.com \
--cc=jdelvare@suse.com \
--cc=jonathan@raspberrypi.com \
--cc=krzk+dt@kernel.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-hwmon@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-rpi-kernel@lists.infradead.org \
--cc=linux@roeck-us.net \
--cc=nsaenz@kernel.org \
--cc=phil@raspberrypi.com \
--cc=robh@kernel.org \
--cc=svarbanov@suse.de \
--cc=wahrenst@gmx.net \
/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