lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <973852b372f8ecf3a62dc7e5b26d75bfaab99a4d.1734530280.git.marcelo.schmitt@analog.com>
Date: Wed, 18 Dec 2024 11:37:26 -0300
From: Marcelo Schmitt <marcelo.schmitt@...log.com>
To: <linux-iio@...r.kernel.org>, <devicetree@...r.kernel.org>,
        <linux-kernel@...r.kernel.org>
CC: Ana-Maria Cusco <ana-maria.cusco@...log.com>, <jic23@...nel.org>,
        <lars@...afoo.de>, <Michael.Hennerich@...log.com>, <robh@...nel.org>,
        <krzk+dt@...nel.org>, <conor+dt@...nel.org>,
        <marcelo.schmitt1@...il.com>
Subject: [RFC PATCH 1/4] include: dt-bindings: iio: adc: Add defines for AD4170

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

Add defines to improve readability of AD4170 device tree nodes.

Signed-off-by: Ana-Maria Cusco <ana-maria.cusco@...log.com>
Co-developed-by: Marcelo Schmitt <marcelo.schmitt@...log.com>
Signed-off-by: Marcelo Schmitt <marcelo.schmitt@...log.com>
---
 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


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ