Skip to contentSkip to conversation

iio: hx711: add data-ready-delay-ns property in DT

PATCH Applied Andreas Klinger 3 participants 3 messages Jun 25, 2018 – Jul 3, 2018

Subsystems (2)

v2 of 5 Applied Latest is v5 →

lore
Share & tools
lore
#0 lore raw

PATCH v2 1/4 iio: hx711: add data-ready-delay-ns property in DT

add data-ready-delay-ns property for hx711 ADC
this is the delay after rising PD_SCK until DOUT is read and assumed to be ready

---
 Documentation/devicetree/bindings/iio/adc/avia-hx711.txt | 7 +++++++
 1 file changed, 7 insertions(+)
Documentation/devicetree/bindings/iio/adc/avia-hx711.txt +7 -0
index b3629405f568..d0c066e3df69 100644
@@ -8,11 +8,18 @@ Required properties:
 		See Documentation/devicetree/bindings/gpio/gpio.txt
  - avdd-supply:	Definition of the regulator used as analog supply
 
+Optional properties:
+ - data-ready-delay-ns:	additional delay in nanoseconds between rising of
+			PD_SCK until DOUT is ready
+			should be less then maximum PD_SCK high time which
+			is 50000 in the datasheet
+
 Example:
 weight@0 {
 	compatible = "avia,hx711";
 	sck-gpios = <&gpio3 10 GPIO_ACTIVE_HIGH>;
 	dout-gpios = <&gpio0 7 GPIO_ACTIVE_HIGH>;
 	avdd-suppy = <&avdd>;
+	data-ready-delay-ns = <1000>;
 };
 
Signature · 1 line
2.1.4
maintainer
#1 lore raw
Quoted 5 lines · On Mon, 25 Jun 2018 17:18:02 +0200 Andreas Klinger <[email protected]> wrote:

add data-ready-delay-ns property for hx711 ADC
this is the delay after rising PD_SCK until DOUT is read and assumed to be ready

Hmm. It's not particularly generic... I think this should have have vendor prefix until we have some visibility of whether it is a common thing we want to standardise around or not.

I'll also be waiting for a devicetree ack on this one as it's a tiny bit unusual.

Thanks,

Jonathan

Quoted 27 lines
---
 Documentation/devicetree/bindings/iio/adc/avia-hx711.txt | 7 +++++++
 1 file changed, 7 insertions(+)
Documentation/devicetree/bindings/iio/adc/avia-hx711.txt +7 -0
index b3629405f568..d0c066e3df69 100644
@@ -8,11 +8,18 @@ Required properties:
 		See Documentation/devicetree/bindings/gpio/gpio.txt
  - avdd-supply:	Definition of the regulator used as analog supply
 
+Optional properties:
+ - data-ready-delay-ns:	additional delay in nanoseconds between rising of
+			PD_SCK until DOUT is ready
+			should be less then maximum PD_SCK high time which
+			is 50000 in the datasheet
+
 Example:
 weight@0 {
 	compatible = "avia,hx711";
 	sck-gpios = <&gpio3 10 GPIO_ACTIVE_HIGH>;
 	dout-gpios = <&gpio0 7 GPIO_ACTIVE_HIGH>;
 	avdd-suppy = <&avdd>;
+	data-ready-delay-ns = <1000>;
 };
 
maintainer
#2 lore raw
Quoted 7 lines · Jonathan Cameron
Quoted 4 lines · On Mon, 25 Jun 2018 17:18:02 +0200 Andreas Klinger <[email protected]> wrote:

add data-ready-delay-ns property for hx711 ADC
this is the delay after rising PD_SCK until DOUT is read and assumed to be ready

Quoted 5 lines
Quoted 1 line

Hmm. It's not particularly generic... I think this should have have vendor prefix until we have some visibility of whether it is a common thing we want to standardise around or not.

Agreed. Doesn't look like any interface I've seen before.

Since it's bit-banging, seems to me it would be better to specify the frequency for PD_SCK and sample DOUT just before or after setting PD_SCK low.

Rob

Quoted 6 lines

I'll also be waiting for a devicetree ack on this one as it's a tiny bit unusual.

Thanks,

Jonathan