Re: [PATCH v1 1/2] dt-bindings: iio: adc: avia-hx711: add avia,hx710b compatible
From: Jonathan Cameron
Date: Sun Apr 19 2026 - 07:47:14 EST
On Sun, 19 Apr 2026 07:17:50 +0200
Andreas Klinger <ak@xxxxxxxxxxxxx> wrote:
> Hi,
>
> David Lechner <dlechner@xxxxxxxxxxxx> schrieb am Sa, 18. Apr 16:46:
> > On 4/18/26 12:05 PM, Piyush Patle wrote:
>
> [...]
>
> > >
> > > Specifications about the driver can be found at:
> > > http://www.aviaic.com/ENProducts.aspx
> > > @@ -23,11 +33,12 @@ properties:
> > > compatible:
> > > enum:
> > > - avia,hx711
> > > + - avia,hx710b
> > >
> > > sck-gpios:
> > > description:
> > > Definition of the GPIO for the clock (output). In the datasheet it is
> > > - named PD_SCK
> > > + named PD_SCK.
> >
> > Save the cleanups for a separate patch to keep the adding HX710B changes clear.
> >
> > I'm guessing the existing binding for HX711 is quite old because it is quite
> > incomplete.
> >
> > It has avdd-supply, but is missing vsup-supply and dvdd-supply.
> >
> > It should probably also have a way to describe how the rate pin is wired.
> >
> > And it should have a clocks property instead of clock-frequency.
>
> The real meaning is a wait time until the DOUT is stable. As a submitted the
> driver many years ago my suggestion of a wait time property was not accepted
> because it would have introduced a new property which didn't exit in those days.
> The suggestion was to name it clock-frequency because it already existed. This
> clock-frequency made the driver also a little bit more complicated because at
> the end we needed a waiting time and not a frequency.
>
> Today i see there is as "wait-delay" property already introduced at other
> bindings. This would also simplify the driver a bit.
>
> @robh@xxxxxxxxxx, @krzk+dt@xxxxxxxxxx, @conor+dt@xxxxxxxxxx:
> Would this change in the binding be acceptable?
>
> If yes, i could prepare a driver and binding patch separate of this patchset to
> clean it up.
You would need to maintain backwards compatiblity with the old binding.
Might be fine to deprecate it.
Jonathan
>
> > It would make sense to have two clocks, on for XI/XO and one for PD_SCK.
> > The second one being optional because of sck-gpios.
> >
> > HX710B has many fewer pins, so we will need an:
> >
> > allOf:
> > - if:
> > properties:
> > compatible:
> > const: avia,hx710b
> >
> > section that sets anything for pins that chip doesn't have to false, like
> > vsup-supply.
> >
> > HX710B also has a vref-supply that HX711 doesn't have. (Unless these are the
> > same thing by a different name?)
> >
> >
> > > maxItems: 1
> > >
> > > dout-gpios:
> > > @@ -43,6 +54,9 @@ properties:
> > > Definition of the regulator used as analog supply
> > >
> > > clock-frequency:
> > > + description:
> > > + Bit-bang clock frequency on PD_SCK. Keep the PD_SCK high time below
> > > + the chip power-down threshold.
> >
> > I suspect that this was meant to be the crystal frequency (XI/XO), not PD_SCK
> > since sck-gpios already exists for PD_SCK
>
> see above
>
> [...]
>
> Best regards,
>
> Andreas
>