~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

TOMOYO Linux Cross Reference
Linux/include/linux/platform_data/ad7793.h

Version: ~ [ linux-6.12-rc7 ] ~ [ linux-6.11.7 ] ~ [ linux-6.10.14 ] ~ [ linux-6.9.12 ] ~ [ linux-6.8.12 ] ~ [ linux-6.7.12 ] ~ [ linux-6.6.60 ] ~ [ linux-6.5.13 ] ~ [ linux-6.4.16 ] ~ [ linux-6.3.13 ] ~ [ linux-6.2.16 ] ~ [ linux-6.1.116 ] ~ [ linux-6.0.19 ] ~ [ linux-5.19.17 ] ~ [ linux-5.18.19 ] ~ [ linux-5.17.15 ] ~ [ linux-5.16.20 ] ~ [ linux-5.15.171 ] ~ [ linux-5.14.21 ] ~ [ linux-5.13.19 ] ~ [ linux-5.12.19 ] ~ [ linux-5.11.22 ] ~ [ linux-5.10.229 ] ~ [ linux-5.9.16 ] ~ [ linux-5.8.18 ] ~ [ linux-5.7.19 ] ~ [ linux-5.6.19 ] ~ [ linux-5.5.19 ] ~ [ linux-5.4.285 ] ~ [ linux-5.3.18 ] ~ [ linux-5.2.21 ] ~ [ linux-5.1.21 ] ~ [ linux-5.0.21 ] ~ [ linux-4.20.17 ] ~ [ linux-4.19.323 ] ~ [ linux-4.18.20 ] ~ [ linux-4.17.19 ] ~ [ linux-4.16.18 ] ~ [ linux-4.15.18 ] ~ [ linux-4.14.336 ] ~ [ linux-4.13.16 ] ~ [ linux-4.12.14 ] ~ [ linux-4.11.12 ] ~ [ linux-4.10.17 ] ~ [ linux-4.9.337 ] ~ [ linux-4.4.302 ] ~ [ linux-3.10.108 ] ~ [ linux-2.6.32.71 ] ~ [ linux-2.6.0 ] ~ [ linux-2.4.37.11 ] ~ [ unix-v6-master ] ~ [ ccs-tools-1.8.12 ] ~ [ policy-sample ] ~
Architecture: ~ [ i386 ] ~ [ alpha ] ~ [ m68k ] ~ [ mips ] ~ [ ppc ] ~ [ sparc ] ~ [ sparc64 ] ~

  1 /* SPDX-License-Identifier: GPL-2.0-only */
  2 /*
  3  * AD7792/AD7793 SPI ADC driver
  4  *
  5  * Copyright 2011 Analog Devices Inc.
  6  */
  7 #ifndef __LINUX_PLATFORM_DATA_AD7793_H__
  8 #define __LINUX_PLATFORM_DATA_AD7793_H__
  9 
 10 /**
 11  * enum ad7793_clock_source - AD7793 clock source selection
 12  * @AD7793_CLK_SRC_INT: Internal 64 kHz clock, not available at the CLK pin.
 13  * @AD7793_CLK_SRC_INT_CO: Internal 64 kHz clock, available at the CLK pin.
 14  * @AD7793_CLK_SRC_EXT: Use external clock.
 15  * @AD7793_CLK_SRC_EXT_DIV2: Use external clock divided by 2.
 16  */
 17 enum ad7793_clock_source {
 18         AD7793_CLK_SRC_INT,
 19         AD7793_CLK_SRC_INT_CO,
 20         AD7793_CLK_SRC_EXT,
 21         AD7793_CLK_SRC_EXT_DIV2,
 22 };
 23 
 24 /**
 25  * enum ad7793_bias_voltage - AD7793 bias voltage selection
 26  * @AD7793_BIAS_VOLTAGE_DISABLED: Bias voltage generator disabled
 27  * @AD7793_BIAS_VOLTAGE_AIN1: Bias voltage connected to AIN1(-).
 28  * @AD7793_BIAS_VOLTAGE_AIN2: Bias voltage connected to AIN2(-).
 29  * @AD7793_BIAS_VOLTAGE_AIN3: Bias voltage connected to AIN3(-).
 30  *      Only valid for AD7795/AD7796.
 31  */
 32 enum ad7793_bias_voltage {
 33         AD7793_BIAS_VOLTAGE_DISABLED,
 34         AD7793_BIAS_VOLTAGE_AIN1,
 35         AD7793_BIAS_VOLTAGE_AIN2,
 36         AD7793_BIAS_VOLTAGE_AIN3,
 37 };
 38 
 39 /**
 40  * enum ad7793_refsel - AD7793 reference voltage selection
 41  * @AD7793_REFSEL_REFIN1: External reference applied between REFIN1(+)
 42  *      and REFIN1(-).
 43  * @AD7793_REFSEL_REFIN2: External reference applied between REFIN2(+)
 44  *      and REFIN1(-). Only valid for AD7795/AD7796.
 45  * @AD7793_REFSEL_INTERNAL: Internal 1.17 V reference.
 46  */
 47 enum ad7793_refsel {
 48         AD7793_REFSEL_REFIN1 = 0,
 49         AD7793_REFSEL_REFIN2 = 1,
 50         AD7793_REFSEL_INTERNAL = 2,
 51 };
 52 
 53 /**
 54  * enum ad7793_current_source_direction - AD7793 excitation current direction
 55  * @AD7793_IEXEC1_IOUT1_IEXEC2_IOUT2: Current source IEXC1 connected to pin
 56  *      IOUT1, current source IEXC2 connected to pin IOUT2.
 57  * @AD7793_IEXEC1_IOUT2_IEXEC2_IOUT1: Current source IEXC2 connected to pin
 58  *      IOUT1, current source IEXC1 connected to pin IOUT2.
 59  * @AD7793_IEXEC1_IEXEC2_IOUT1: Both current sources connected to pin IOUT1.
 60  *      Only valid when the current sources are set to 10 uA or 210 uA.
 61  * @AD7793_IEXEC1_IEXEC2_IOUT2: Both current sources connected to Pin IOUT2.
 62  *      Only valid when the current ources are set to 10 uA or 210 uA.
 63  */
 64 enum ad7793_current_source_direction {
 65         AD7793_IEXEC1_IOUT1_IEXEC2_IOUT2 = 0,
 66         AD7793_IEXEC1_IOUT2_IEXEC2_IOUT1 = 1,
 67         AD7793_IEXEC1_IEXEC2_IOUT1 = 2,
 68         AD7793_IEXEC1_IEXEC2_IOUT2 = 3,
 69 };
 70 
 71 /**
 72  * enum ad7793_excitation_current - AD7793 excitation current selection
 73  * @AD7793_IX_DISABLED: Excitation current Disabled.
 74  * @AD7793_IX_10uA: Enable 10 micro-ampere excitation current.
 75  * @AD7793_IX_210uA: Enable 210 micro-ampere excitation current.
 76  * @AD7793_IX_1mA: Enable 1 milli-Ampere excitation current.
 77  */
 78 enum ad7793_excitation_current {
 79         AD7793_IX_DISABLED = 0,
 80         AD7793_IX_10uA = 1,
 81         AD7793_IX_210uA = 2,
 82         AD7793_IX_1mA = 3,
 83 };
 84 
 85 /**
 86  * struct ad7793_platform_data - AD7793 platform data
 87  * @clock_src: Clock source selection
 88  * @burnout_current: If set to true the 100nA burnout current is enabled.
 89  * @boost_enable: Enable boost for the bias voltage generator.
 90  * @buffered: If set to true configure the device for buffered input mode.
 91  * @unipolar: If set to true sample in unipolar mode, if set to false sample in
 92  *              bipolar mode.
 93  * @refsel: Reference voltage selection
 94  * @bias_voltage: Bias voltage selection
 95  * @exitation_current: Excitation current selection
 96  * @current_source_direction: Excitation current direction selection
 97  */
 98 struct ad7793_platform_data {
 99         enum ad7793_clock_source clock_src;
100         bool burnout_current;
101         bool boost_enable;
102         bool buffered;
103         bool unipolar;
104 
105         enum ad7793_refsel refsel;
106         enum ad7793_bias_voltage bias_voltage;
107         enum ad7793_excitation_current exitation_current;
108         enum ad7793_current_source_direction current_source_direction;
109 };
110 
111 #endif /* IIO_ADC_AD7793_H_ */
112 

~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

kernel.org | git.kernel.org | LWN.net | Project Home | SVN repository | Mail admin

Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.

sflogo.php