[RFC PATCH 1/4] include: dt-bindings: iio: adc: Add defines for AD4170

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: Ana-Maria Cusco <ana-maria.cusco@xxxxxxxxxx>

Add defines to improve readability of AD4170 device tree nodes.

Signed-off-by: Ana-Maria Cusco <ana-maria.cusco@xxxxxxxxxx>
Co-developed-by: Marcelo Schmitt <marcelo.schmitt@xxxxxxxxxx>
Signed-off-by: Marcelo Schmitt <marcelo.schmitt@xxxxxxxxxx>
---
 include/dt-bindings/iio/adc/adi,ad4170.h | 96 ++++++++++++++++++++++++
 1 file changed, 96 insertions(+)
 create mode 100644 include/dt-bindings/iio/adc/adi,ad4170.h

diff --git a/include/dt-bindings/iio/adc/adi,ad4170.h b/include/dt-bindings/iio/adc/adi,ad4170.h
new file mode 100644
index 000000000000..a508b37e9a46
--- /dev/null
+++ b/include/dt-bindings/iio/adc/adi,ad4170.h
@@ -0,0 +1,96 @@
+/* SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) */
+/*
+ * AD4170 ADC
+ *
+ * Copyright 2024 Analog Devices Inc.
+ *
+ * Licensed under the GPL-2.
+ */
+
+#ifndef _DT_BINDINGS_IIO_ADC_AD4170_H_
+#define _DT_BINDINGS_IIO_ADC_AD4170_H_
+
+/*
+ * Excitation Current Chopping Control.
+ * Use for adi,chop-iexc
+ */
+#define AD4170_MISC_CHOP_IEXC_OFF	0
+/* Chopping of Iout_A and Iout_B Excitation Currents. */
+#define AD4170_MISC_CHOP_IEXC_AB	1
+/* Chopping of Iout_C and Iout_D Excitation Currents. */
+#define AD4170_MISC_CHOP_IEXC_CD	2
+/* Chopping of Both Pairs of Excitation Currents. */
+#define AD4170_MISC_CHOP_IEXC_ABCD	3
+
+/*
+ * Chopping
+ * Use for adi,chop-adc
+ */
+/* No Chopping. */
+#define AD4170_MISC_CHOP_ADC_OFF		0
+/* Chops Internal Mux. */
+#define AD4170_MISC_CHOP_ADC_MUX		1
+/* Chops AC Excitation Using 4 GPIO Pins. */
+#define AD4170_MISC_CHOP_ADC_ACX_4PIN		2
+/* Chops AC Excitation Using 2 GPIO Pins. */
+#define AD4170_MISC_CHOP_ADC_ACX_2PIN		3
+
+/*
+ * Reference Selection Mode
+ * Use for adi,reference-select
+ */
+#define AD4170_AFE_REFIN_REFIN1		0
+#define AD4170_AFE_REFIN_REFIN2		1
+#define AD4170_AFE_REFIN_REFOUT		2
+#define AD4170_AFE_REFIN_AVDD		3
+
+/*
+ * Definitios for describing channel selections
+ * Use for adi,channel-map
+ */
+#define AD4170_MAP_AIN0			0
+#define AD4170_MAP_AIN1			1
+#define AD4170_MAP_AIN2			2
+#define AD4170_MAP_AIN3			3
+#define AD4170_MAP_AIN4			4
+#define AD4170_MAP_AIN5			5
+#define AD4170_MAP_AIN6			6
+#define AD4170_MAP_AIN7			7
+#define AD4170_MAP_AIN8			8
+#define AD4170_MAP_TEMP_SENSOR_P	17
+#define AD4170_MAP_TEMP_SENSOR_N	17
+#define AD4170_MAP_AVDD_AVSS_P		18
+#define AD4170_MAP_AVDD_AVSS_N		18
+#define AD4170_MAP_IOVDD_DGND_P		19
+#define AD4170_MAP_IOVDD_DGND_N		19
+#define AD4170_MAP_DAC_P		20
+#define AD4170_MAP_DAC_N		20
+#define AD4170_MAP_ALDO			21
+#define AD4170_MAP_DLDO			22
+#define AD4170_MAP_AVSS			23
+#define AD4170_MAP_DGND			24
+#define AD4170_MAP_REFIN1_P		25
+#define AD4170_MAP_REFIN1_N		26
+#define AD4170_MAP_REFIN2_P		27
+#define AD4170_MAP_REFIN2_N		28
+#define AD4170_MAP_REFOUT		29
+
+/*
+ * Definitios for describing excitation current output pin selections
+ * Use for adi,excitation-pin-0/1/2/3
+ */
+#define AD4170_CURRENT_IOUT_AIN0			0
+#define AD4170_CURRENT_IOUT_AIN1			1
+#define AD4170_CURRENT_IOUT_AIN2			2
+#define AD4170_CURRENT_IOUT_AIN3			3
+#define AD4170_CURRENT_IOUT_AIN4			4
+#define AD4170_CURRENT_IOUT_AIN5			5
+#define AD4170_CURRENT_IOUT_AIN6			6
+#define AD4170_CURRENT_IOUT_AIN7			7
+#define AD4170_CURRENT_IOUT_AIN8			8
+#define AD4170_CURRENT_IOUT_GPIO0			17
+#define AD4170_CURRENT_IOUT_GPIO1			18
+#define AD4170_CURRENT_IOUT_GPIO2			19
+#define AD4170_CURRENT_IOUT_GPIO3			20
+
+#endif /* _DT_BINDINGS_IIO_ADC_AD4170_H_ */
-- 
2.45.2





[Index of Archives]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Input]     [Linux Kernel]     [Linux SCSI]     [X.org]

  Powered by Linux