File Index
Files and directories
Sign in
FILE

ad7266.h

File preview with syntax highlighting.

linux-6.19.14/include/linux/platform_data/ad7266.h C
 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 */
18enum 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 */
32enum 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 */
44struct ad7266_platform_data {
45	enum ad7266_range range;
46	enum ad7266_mode mode;
47	bool fixed_addr;
48};
49
50#endif
~/ Read-only file preview.