aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/iio/common/st_sensors.h24
-rw-r--r--include/linux/iio/frequency/adf4350.h4
-rw-r--r--include/linux/platform_data/ad7303.h21
3 files changed, 34 insertions, 15 deletions
diff --git a/include/linux/iio/common/st_sensors.h b/include/linux/iio/common/st_sensors.h
index 172c5b23cb84..72b26940730d 100644
--- a/include/linux/iio/common/st_sensors.h
+++ b/include/linux/iio/common/st_sensors.h
@@ -24,14 +24,10 @@
24#define ST_SENSORS_FULLSCALE_AVL_MAX 10 24#define ST_SENSORS_FULLSCALE_AVL_MAX 10
25 25
26#define ST_SENSORS_NUMBER_ALL_CHANNELS 4 26#define ST_SENSORS_NUMBER_ALL_CHANNELS 4
27#define ST_SENSORS_NUMBER_DATA_CHANNELS 3
28#define ST_SENSORS_ENABLE_ALL_AXIS 0x07 27#define ST_SENSORS_ENABLE_ALL_AXIS 0x07
29#define ST_SENSORS_BYTE_FOR_CHANNEL 2
30#define ST_SENSORS_SCAN_X 0 28#define ST_SENSORS_SCAN_X 0
31#define ST_SENSORS_SCAN_Y 1 29#define ST_SENSORS_SCAN_Y 1
32#define ST_SENSORS_SCAN_Z 2 30#define ST_SENSORS_SCAN_Z 2
33#define ST_SENSORS_DEFAULT_12_REALBITS 12
34#define ST_SENSORS_DEFAULT_16_REALBITS 16
35#define ST_SENSORS_DEFAULT_POWER_ON_VALUE 0x01 31#define ST_SENSORS_DEFAULT_POWER_ON_VALUE 0x01
36#define ST_SENSORS_DEFAULT_POWER_OFF_VALUE 0x00 32#define ST_SENSORS_DEFAULT_POWER_OFF_VALUE 0x00
37#define ST_SENSORS_DEFAULT_WAI_ADDRESS 0x0f 33#define ST_SENSORS_DEFAULT_WAI_ADDRESS 0x0f
@@ -42,20 +38,20 @@
42#define ST_SENSORS_MAX_NAME 17 38#define ST_SENSORS_MAX_NAME 17
43#define ST_SENSORS_MAX_4WAI 7 39#define ST_SENSORS_MAX_4WAI 7
44 40
45#define ST_SENSORS_LSM_CHANNELS(device_type, index, mod, endian, bits, addr) \ 41#define ST_SENSORS_LSM_CHANNELS(device_type, mask, index, mod, \
42 ch2, s, endian, rbits, sbits, addr) \
46{ \ 43{ \
47 .type = device_type, \ 44 .type = device_type, \
48 .modified = 1, \ 45 .modified = mod, \
49 .info_mask_separate = BIT(IIO_CHAN_INFO_RAW) | \ 46 .info_mask_separate = mask, \
50 BIT(IIO_CHAN_INFO_SCALE), \
51 .scan_index = index, \ 47 .scan_index = index, \
52 .channel2 = mod, \ 48 .channel2 = ch2, \
53 .address = addr, \ 49 .address = addr, \
54 .scan_type = { \ 50 .scan_type = { \
55 .sign = 's', \ 51 .sign = s, \
56 .realbits = bits, \ 52 .realbits = rbits, \
57 .shift = 16 - bits, \ 53 .shift = sbits - rbits, \
58 .storagebits = 16, \ 54 .storagebits = sbits, \
59 .endianness = endian, \ 55 .endianness = endian, \
60 }, \ 56 }, \
61} 57}
@@ -204,6 +200,7 @@ struct st_sensors {
204 * @multiread_bit: Use or not particular bit for [I2C/SPI] multiread. 200 * @multiread_bit: Use or not particular bit for [I2C/SPI] multiread.
205 * @buffer_data: Data used by buffer part. 201 * @buffer_data: Data used by buffer part.
206 * @odr: Output data rate of the sensor [Hz]. 202 * @odr: Output data rate of the sensor [Hz].
203 * num_data_channels: Number of data channels used in buffer.
207 * @get_irq_data_ready: Function to get the IRQ used for data ready signal. 204 * @get_irq_data_ready: Function to get the IRQ used for data ready signal.
208 * @tf: Transfer function structure used by I/O operations. 205 * @tf: Transfer function structure used by I/O operations.
209 * @tb: Transfer buffers and mutex used by I/O operations. 206 * @tb: Transfer buffers and mutex used by I/O operations.
@@ -220,6 +217,7 @@ struct st_sensor_data {
220 char *buffer_data; 217 char *buffer_data;
221 218
222 unsigned int odr; 219 unsigned int odr;
220 unsigned int num_data_channels;
223 221
224 unsigned int (*get_irq_data_ready) (struct iio_dev *indio_dev); 222 unsigned int (*get_irq_data_ready) (struct iio_dev *indio_dev);
225 223
diff --git a/include/linux/iio/frequency/adf4350.h b/include/linux/iio/frequency/adf4350.h
index be91f344d5fc..ffd8c8f90928 100644
--- a/include/linux/iio/frequency/adf4350.h
+++ b/include/linux/iio/frequency/adf4350.h
@@ -1,7 +1,7 @@
1/* 1/*
2 * ADF4350/ADF4351 SPI PLL driver 2 * ADF4350/ADF4351 SPI PLL driver
3 * 3 *
4 * Copyright 2012 Analog Devices Inc. 4 * Copyright 2012-2013 Analog Devices Inc.
5 * 5 *
6 * Licensed under the GPL-2. 6 * Licensed under the GPL-2.
7 */ 7 */
@@ -41,7 +41,7 @@
41#define ADF4350_REG2_RDIV2_EN (1 << 24) 41#define ADF4350_REG2_RDIV2_EN (1 << 24)
42#define ADF4350_REG2_RMULT2_EN (1 << 25) 42#define ADF4350_REG2_RMULT2_EN (1 << 25)
43#define ADF4350_REG2_MUXOUT(x) ((x) << 26) 43#define ADF4350_REG2_MUXOUT(x) ((x) << 26)
44#define ADF4350_REG2_NOISE_MODE(x) ((x) << 29) 44#define ADF4350_REG2_NOISE_MODE(x) (((unsigned)(x)) << 29)
45#define ADF4350_MUXOUT_THREESTATE 0 45#define ADF4350_MUXOUT_THREESTATE 0
46#define ADF4350_MUXOUT_DVDD 1 46#define ADF4350_MUXOUT_DVDD 1
47#define ADF4350_MUXOUT_GND 2 47#define ADF4350_MUXOUT_GND 2
diff --git a/include/linux/platform_data/ad7303.h b/include/linux/platform_data/ad7303.h
new file mode 100644
index 000000000000..de6a7a6b4bbf
--- /dev/null
+++ b/include/linux/platform_data/ad7303.h
@@ -0,0 +1,21 @@
1/*
2 * Analog Devices AD7303 DAC driver
3 *
4 * Copyright 2013 Analog Devices Inc.
5 *
6 * Licensed under the GPL-2.
7 */
8
9#ifndef __IIO_ADC_AD7303_H__
10#define __IIO_ADC_AD7303_H__
11
12/**
13 * struct ad7303_platform_data - AD7303 platform data
14 * @use_external_ref: If set to true use an external voltage reference connected
15 * to the REF pin, otherwise use the internal reference derived from Vdd.
16 */
17struct ad7303_platform_data {
18 bool use_external_ref;
19};
20
21#endif