Skip to contentSkip to conversation

iio:amplifiers:ada4250: add support for ADA4250

PATCH In review Antoniu Miclaus 2 participants 6 messages Feb 21, 2022 – Feb 22, 2022

Subsystems (4)
lore
Share & tools
lore

Antoniu Miclaus

author maintainer
#0 lore raw

PATCH v4 1/3 iio:amplifiers:ada4250: add support for ADA4250

The ADA4250 is an instrumentation amplifier with SPI/pin-strap progammable gains that is optimized for ultra-low power systems. With a minimum supply voltage of 1.7V, 26uA of quiescent current, a shutdown mode, a sleep mode, and a fast wake up settling time, ADA4250 can be power cycled on a battery powered system for even futher savings.

---
changes in v4:
- update multiline comment syntax inside ada4250_set_offset_uv

 drivers/iio/amplifiers/Kconfig   |  11 +
 drivers/iio/amplifiers/Makefile  |   1 +
 drivers/iio/amplifiers/ada4250.c | 403 +++++++++++++++++++++++++++++++
 3 files changed, 415 insertions(+)
 create mode 100644 drivers/iio/amplifiers/ada4250.c
drivers/iio/amplifiers/Kconfig +11 -0
index 5eb1357a9c78..f217a2a1e958 100644
@@ -23,6 +23,17 @@ config AD8366
 	  To compile this driver as a module, choose M here: the
 	  module will be called ad8366.
 
+config ADA4250
+	tristate "Analog Devices ADA4250 Instrumentation Amplifier"
+	depends on SPI
+	help
+	  Say yes here to build support for Analog Devices ADA4250
+	  SPI Amplifier's support. The driver provides direct access via
+	  sysfs.
+
+	  To compile this driver as a module, choose M here: the
+	  module will be called ada4250.
+
 config HMC425
 	tristate "Analog Devices HMC425A and similar GPIO Gain Amplifiers"
 	depends on GPIOLIB
drivers/iio/amplifiers/Makefile +1 -0
index cb551d82f56b..2126331129cf 100644
@@ -5,4 +5,5 @@
 
 # When adding new entries keep the list in alphabetical order
 obj-$(CONFIG_AD8366) += ad8366.o
+obj-$(CONFIG_ADA4250) += ada4250.o
 obj-$(CONFIG_HMC425) += hmc425a.o
drivers/iio/amplifiers/ada4250.c new file +403 -0

403 lines not on this page · raw message

Signature · 1 line
2.35.1
author maintainer
#1 lore raw

PATCH v4 2/3 dt-bindings:iio:amplifiers: add ada4250 doc

Add device tree bindings for the ADA4250 driver.

---
changes in v4:
- add spi-max-frequency property
- use generic node naming

 .../bindings/iio/amplifiers/adi,ada4250.yaml  | 50 +++++++++++++++++++
 1 file changed, 50 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/iio/amplifiers/adi,ada4250.yaml
Documentation/devicetree/bindings/iio/amplifiers/adi,ada4250.yaml new file +50 -0
new file mode 100644
index 000000000000..3bb9539e2b49
@@ -0,0 +1,50 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/iio/amplifiers/adi,ada4250.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: ADA4250 Programmable Gain Instrumentation Amplifier
+
+maintainers:
+  - Antoniu Miclaus <[email protected]>
+
+description: |
+  Precision Low Power, 110kHz, 26uA, Programmable Gain Instrumentation Amplifier.
+
+properties:
+  compatible:
+    enum:
+      - adi,ada4250
+
+  reg:
+    maxItems: 1
+
+  avdd-supply: true
+
+  adi,refbuf-enable:
+    description:
+      Enable internal buffer to drive the reference pin.
+    type: boolean
+
+  spi-max-frequency: true
+
+required:
+  - compatible
+  - reg
+  - avdd-supply
+
+additionalProperties: false
+
+examples:
+  - |
+    spi {
+      #address-cells = <1>;
+      #size-cells = <0>;
+      amplifier@0{
+        compatible = "adi,ada4250";
+        reg = <0>;
+        avdd-supply = <&avdd>;
+      };
+    };
+...
Signature · 1 line
2.35.1
#2 lore raw

Re: [PATCH v4 2/3] dt-bindings:iio:amplifiers: add ada4250 doc

Quoted 11 lines · Antoniu Miclaus

Add device tree bindings for the ADA4250 driver.

---
changes in v4:
- add spi-max-frequency property
- use generic node naming

 .../bindings/iio/amplifiers/adi,ada4250.yaml  | 50 +++++++++++++++++++
 1 file changed, 50 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/iio/amplifiers/adi,ada4250.yaml

Please do not resend without fixing pointed out issues. It just looks you ignore comments.

Please fix or respond to previous comments. Please also fix all common issues recently pointed out for all Analog devices - folks from Analog are making the same mistakes. Reviewing the same mistake is a bit a waste of time. Much more appreciated is when team applies one feedback to all its submissions. IOW, do not repeat the same mistake second time.

Best regards,
Krzysztof

author maintainer
#3 lore raw

RE: [PATCH v4 2/3] dt-bindings:iio:amplifiers: add ada4250 doc

--
Antoniu Miclăuş

Quoted 34 lines

-----Original Message-----
From: Krzysztof Kozlowski <[email protected]>
Sent: Monday, February 21, 2022 6:36 PM
To: Miclaus, Antoniu <[email protected]>; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]
Subject: Re: [PATCH v4 2/3] dt-bindings:iio:amplifiers: add ada4250 doc

[External]

Quoted 10 lines · Antoniu Miclaus

Add device tree bindings for the ADA4250 driver.

---
changes in v4:
- add spi-max-frequency property
- use generic node naming

 .../bindings/iio/amplifiers/adi,ada4250.yaml  | 50 +++++++++++++++++++
 1 file changed, 50 insertions(+)
 create mode 100644

Documentation/devicetree/bindings/iio/amplifiers/adi,ada4250.yaml

Quoted 1 line

Please do not resend without fixing pointed out issues. It just looks you ignore comments.

Please fix or respond to previous comments. Please also fix all common issues recently pointed out for all Analog devices - folks from Analog are making the same mistakes. Reviewing the same mistake is a bit a waste of time. Much more appreciated is when team applies one feedback to all its submissions. IOW, do not repeat the same mistake second time.

Quoted 2 lines

Best regards,
Krzysztof

I had a look over the previous comments and I saw that some of them were replied by Jonathan already, therefore I fixed only those that were still valid. Indeed I missed the "Please put the bindings patch as first in the series", my bad on that. Let me know if I missed anything else.

Regards,
Antoniu

#4 lore raw

Re: [PATCH v4 2/3] dt-bindings:iio:amplifiers: add ada4250 doc

Quoted 11 lines · Antoniu
Quoted 11 lines

Please do not resend without fixing pointed out issues. It just looks you ignore comments.

Please fix or respond to previous comments. Please also fix all common issues recently pointed out for all Analog devices - folks from Analog are making the same mistakes. Reviewing the same mistake is a bit a waste of time. Much more appreciated is when team applies one feedback to all its submissions. IOW, do not repeat the same mistake second time.

Quoted 7 lines
Quoted 2 lines

Best regards,
Krzysztof

I had a look over the previous comments and I saw that some of them were replied by Jonathan already, therefore I fixed only those that were still valid. Indeed I missed the "Please put the bindings patch as first in the series", my bad on that. Let me know if I missed anything else.

In this patchset you also missed spaces in the subject (after every ':' character).

Best regards,
Krzysztof

author maintainer
#5 lore raw

PATCH v4 3/3 MAINTAINERS: add maintainer for ADA4250 driver

In reply to Antoniu Miclaus

Add myself as maintainer for the ADA4250 driver.

---
 MAINTAINERS | 8 ++++++++
 1 file changed, 8 insertions(+)
MAINTAINERS +8 -0
index fb18ce7168aa..0410054a7bf5 100644
@@ -1075,6 +1075,14 @@ L:	[email protected]
 S:	Maintained
 F:	drivers/media/i2c/ad9389b*
 
+ANALOG DEVICES INC ADA4250 DRIVER
+M:	Antoniu Miclaus <[email protected]>
+L:	[email protected]
+S:	Supported
+W:	https://ez.analog.com/linux-software-drivers
+F:	Documentation/devicetree/bindings/iio/amplifiers/adi,ada4250.yaml
+F:	drivers/iio/amplifiers/ada4250.c
+
 ANALOG DEVICES INC ADGS1408 DRIVER
 M:	Mircea Caprioru <[email protected]>
 S:	Supported
Signature · 1 line
2.35.1