root/include/linux/platform_data/ad7266.h

/* [<][>][^][v][top][bottom][index][help] */

INCLUDED FROM


   1 /* SPDX-License-Identifier: GPL-2.0-only */
   2 /*
   3  * AD7266/65 SPI ADC driver
   4  *
   5  * Copyright 2012 Analog Devices Inc.
   6  */
   7 
   8 #ifndef __IIO_ADC_AD7266_H__
   9 #define __IIO_ADC_AD7266_H__
  10 
  11 /**
  12  * enum ad7266_range - AD7266 reference voltage range
  13  * @AD7266_RANGE_VREF: Device is configured for input range 0V - VREF
  14  *                      (RANGE pin set to low)
  15  * @AD7266_RANGE_2VREF: Device is configured for input range 0V - 2VREF
  16  *                      (RANGE pin set to high)
  17  */
  18 enum ad7266_range {
  19         AD7266_RANGE_VREF,
  20         AD7266_RANGE_2VREF,
  21 };
  22 
  23 /**
  24  * enum ad7266_mode - AD7266 sample mode
  25  * @AD7266_MODE_DIFF: Device is configured for full differential mode
  26  *                              (SGL/DIFF pin set to low, AD0 pin set to low)
  27  * @AD7266_MODE_PSEUDO_DIFF: Device is configured for pseudo differential mode
  28  *                              (SGL/DIFF pin set to low, AD0 pin set to high)
  29  * @AD7266_MODE_SINGLE_ENDED: Device is configured for single-ended mode
  30  *                              (SGL/DIFF pin set to high)
  31  */
  32 enum ad7266_mode {
  33         AD7266_MODE_DIFF,
  34         AD7266_MODE_PSEUDO_DIFF,
  35         AD7266_MODE_SINGLE_ENDED,
  36 };
  37 
  38 /**
  39  * struct ad7266_platform_data - Platform data for the AD7266 driver
  40  * @range: Reference voltage range the device is configured for
  41  * @mode: Sample mode the device is configured for
  42  * @fixed_addr: Whether the address pins are hard-wired
  43  * @addr_gpios: GPIOs used for controlling the address pins, only used if
  44  *              fixed_addr is set to false.
  45  */
  46 struct ad7266_platform_data {
  47         enum ad7266_range range;
  48         enum ad7266_mode mode;
  49         bool fixed_addr;
  50         unsigned int addr_gpios[3];
  51 };
  52 
  53 #endif

/* [<][>][^][v][top][bottom][index][help] */