From: Jonathan Cameron <jic23@kernel.org>
To: Piyush Patle <piyushpatle228@gmail.com>
Cc: Krzysztof Kozlowski <krzk@kernel.org>,
ak@it-klinger.de, dlechner@baylibre.com, nuno.sa@analog.com,
andy@kernel.org, robh@kernel.org, krzk+dt@kernel.org,
conor+dt@kernel.org, linux-iio@vger.kernel.org,
devicetree@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2 1/2] dt-bindings: iio: adc: avia-hx711: add avia,hx710b compatible
Date: Fri, 24 Apr 2026 13:21:48 +0100 [thread overview]
Message-ID: <20260424132148.69e63bbe@jic23-huawei> (raw)
In-Reply-To: <CAMB+xkZ_FypL9_pYiE9nEoyaGxzc7_vdAzb-FgKEeXok0_fi1w@mail.gmail.com>
On Wed, 22 Apr 2026 11:32:56 +0530
Piyush Patle <piyushpatle228@gmail.com> wrote:
> On Tue, Apr 21, 2026 at 1:53 PM Krzysztof Kozlowski <krzk@kernel.org> wrote:
> >
> > On Sun, Apr 19, 2026 at 11:16:39PM +0530, Piyush Patle wrote:
> > > description: |
> > > - Bit-banging driver using two GPIOs:
> > > - - sck-gpio gives a clock to the sensor with 24 cycles for data retrieval
> > > - and up to 3 cycles for selection of the input channel and gain for the
> > > - next measurement
> > > - - dout-gpio is the sensor data the sensor responds to the clock
> > > + The HX711 is a 24-bit ADC with selectable gain (32/64/128) and two
> > > + differential input channels. Channel A supports gain 64 and 128;
> > > + channel B supports gain 32.
> > >
> > > - Specifications about the driver can be found at:
> > > - http://www.aviaic.com/ENProducts.aspx
> > > + The HX710B is a 24-bit ADC with fixed gain of 128. Channel 0 is the
> > > + differential input and channel 1 measures the DVDD-AVDD supply
> > > + voltage difference.
> > >
> > > properties:
> > > compatible:
> > > enum:
> > > + - avia,hx710b
> > > - avia,hx711
> > >
> > > sck-gpios:
> > > @@ -40,13 +40,45 @@ properties:
> > >
> > > avdd-supply:
> > > description:
> > > - Definition of the regulator used as analog supply
> > > + Analog supply voltage (AVDD). Also serves as the voltage reference on
> > > + both chips; no separate vref-supply is required.
> >
> > There is no such thing as vref-supply.
> >
> > > +
> > > + dvdd-supply:
> > > + description:
> > > + Digital supply voltage (DVDD). HX711 only.
> > > +
> > > + vsup-supply:
> > > + description:
> > > + Supply voltage for the on-chip regulator (VSUP). HX711 only.
> > > +
> > > + rate-gpios:
> > > + description:
> > > + GPIO connected to the RATE pin (HX711 only). When driven low the
> > > + output data rate is 10 SPS; when driven high it is 80 SPS. If
> > > + omitted the RATE pin state is determined by the board wiring.
> > > + maxItems: 1
> > >
> > > clock-frequency:
> > > + description:
> > > + Controls the SCK bit-bang timing. The value is used to derive the
> > > + delay between SCK edges; keep the SCK high time below 60 us to
> > > + avoid triggering chip power-down mode. Defaults to 400 kHz if not
> > > + specified.
> >
> > Don't repeat constraints in free form text. Drop last sentence.
> >
> > > minimum: 20000
> > > maximum: 2500000
> > > default: 400000
> > >
> > > +allOf:
> > > + - if:
> > > + properties:
> > > + compatible:
> > > + const: avia,hx710b
> > > + then:
> > > + properties:
> > > + vsup-supply: false
> > > + dvdd-supply: false
> > > + rate-gpios: false
> > > +
> > > required:
> > > - compatible
> > > - sck-gpios
> > > @@ -58,10 +90,19 @@ additionalProperties: false
> > > examples:
> > > - |
> > > #include <dt-bindings/gpio/gpio.h>
> > > - weight {
> > > + weight0 {
> >
> > Don't change the node names.
> >
> > > compatible = "avia,hx711";
> > > sck-gpios = <&gpio3 10 GPIO_ACTIVE_HIGH>;
> > > dout-gpios = <&gpio0 7 GPIO_ACTIVE_HIGH>;
> > > + rate-gpios = <&gpio0 9 GPIO_ACTIVE_HIGH>;
> > > avdd-supply = <&avdd>;
> > > clock-frequency = <100000>;
> > > };
> > > + - |
> > > + #include <dt-bindings/gpio/gpio.h>
> > > + weight1 {
> > > + compatible = "avia,hx710b";
> > > + sck-gpios = <&gpio3 11 GPIO_ACTIVE_HIGH>;
> > > + dout-gpios = <&gpio0 8 GPIO_ACTIVE_HIGH>;
> > > + avdd-supply = <&avdd>;
> >
> > Why no clock-frequency? So basically difference is one property? Then no
> > need for new example, less code to maintain.
> >
> > But OTOH, where is vsup and dvdd?
>
> dvdd-supply and vsup-supply are optional HX711 properties and
> arenot present on all boards (e.g. DVDD tied to AVDD or use of the
> on-chip regulator without a separate supply node).
For DVDD tied to AVDD as a board config (rather than internally)
both would ideally be set to the same regulator rather than just
not mentioning that tie. The other case of it not being connected
is valid.
> The example shows a minimal working configuration.
>
> I will remove the example for HX710B.
> >
> > > + };
> > > --
> > > 2.43.0
> > >
>
> Thanks for the review.
>
> I'll fix the schema issues you pointed out in v3
> Will share v3 shortly
>
> Regards
> Piyush Patle
next prev parent reply other threads:[~2026-04-24 12:21 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-04-19 17:46 [PATCH v2 0/2] iio: adc: hx711: add HX710B support Piyush Patle
2026-04-19 17:46 ` [PATCH v2 1/2] dt-bindings: iio: adc: avia-hx711: add avia,hx710b compatible Piyush Patle
2026-04-21 8:23 ` Krzysztof Kozlowski
2026-04-22 6:02 ` Piyush Patle
2026-04-24 12:21 ` Jonathan Cameron [this message]
2026-04-19 17:46 ` [PATCH v2 2/2] iio: adc: hx711: add support for HX710B Piyush Patle
2026-04-20 9:03 ` Andy Shevchenko
2026-04-22 5:49 ` Piyush Patle
2026-04-22 8:38 ` Andy Shevchenko
2026-04-21 15:17 ` Jonathan Cameron
2026-04-22 5:21 ` Piyush Patle
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=20260424132148.69e63bbe@jic23-huawei \
--to=jic23@kernel.org \
--cc=ak@it-klinger.de \
--cc=andy@kernel.org \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=dlechner@baylibre.com \
--cc=krzk+dt@kernel.org \
--cc=krzk@kernel.org \
--cc=linux-iio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=nuno.sa@analog.com \
--cc=piyushpatle228@gmail.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