Commit f94aa354 authored by Michael Hennerich's avatar Michael Hennerich Committed by Greg Kroah-Hartman

iio: impedance-analyzer: New driver for AD5933/4 Impedance Converter, Network Analyzer

The AD5933 is a high precision impedance converter system solution
that combines an on-board frequency generator with a 12-bit, 1 MSPS,
analog-to-digital converter (ADC). The frequency generator allows an
external complex impedance to be excited with a known frequency.

The response signal from the impedance is sampled by the on-board ADC
and a discrete Fourier transform (DFT) is processed by an on-chip DSP engine.
The DFT algorithm returns a real (R) and imaginary (I) data-word at each
output frequency.

Changes since V1:

Apply list review feedback:
Consistently use poll_time_jiffies.
Use be|le cpu endian helpers where applicable.
Add various comments.

Changes since V2:

Fix KernelVersion tag in Documentation.
Declare ad5933_default_pdata static.
Fix typos.
Signed-off-by: default avatarMichael Hennerich <michael.hennerich@analog.com>
Acked-by: default avatarJonathan Cameron <jic23@cam.ac.uk>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent 2051f25d
What: /sys/bus/iio/devices/iio:deviceX/outY_freq_start
KernelVersion: 3.1.0
Contact: linux-iio@vger.kernel.org
Description:
Frequency sweep start frequency in Hz.
What: /sys/bus/iio/devices/iio:deviceX/outY_freq_increment
KernelVersion: 3.1.0
Contact: linux-iio@vger.kernel.org
Description:
Frequency increment in Hz (step size) between consecutive
frequency points along the sweep.
What: /sys/bus/iio/devices/iio:deviceX/outY_freq_points
KernelVersion: 3.1.0
Contact: linux-iio@vger.kernel.org
Description:
Number of frequency points (steps) in the frequency sweep.
This value, in conjunction with the outY_freq_start and the
outY_freq_increment, determines the frequency sweep range
for the sweep operation.
What: /sys/bus/iio/devices/iio:deviceX/outY_settling_cycles
KernelVersion: 3.1.0
Contact: linux-iio@vger.kernel.org
Description:
Number of output excitation cycles (settling time cycles)
that are allowed to pass through the unknown impedance,
after each frequency increment, and before the ADC is triggered
to perform a conversion sequence of the response signal.
...@@ -62,6 +62,7 @@ source "drivers/staging/iio/addac/Kconfig" ...@@ -62,6 +62,7 @@ source "drivers/staging/iio/addac/Kconfig"
source "drivers/staging/iio/dac/Kconfig" source "drivers/staging/iio/dac/Kconfig"
source "drivers/staging/iio/dds/Kconfig" source "drivers/staging/iio/dds/Kconfig"
source "drivers/staging/iio/gyro/Kconfig" source "drivers/staging/iio/gyro/Kconfig"
source "drivers/staging/iio/impedance-analyzer/Kconfig"
source "drivers/staging/iio/imu/Kconfig" source "drivers/staging/iio/imu/Kconfig"
source "drivers/staging/iio/light/Kconfig" source "drivers/staging/iio/light/Kconfig"
source "drivers/staging/iio/magnetometer/Kconfig" source "drivers/staging/iio/magnetometer/Kconfig"
......
...@@ -16,6 +16,7 @@ obj-y += addac/ ...@@ -16,6 +16,7 @@ obj-y += addac/
obj-y += dac/ obj-y += dac/
obj-y += dds/ obj-y += dds/
obj-y += gyro/ obj-y += gyro/
obj-y += impedance-analyzer/
obj-y += imu/ obj-y += imu/
obj-y += light/ obj-y += light/
obj-y += magnetometer/ obj-y += magnetometer/
......
#
# Impedance Converter, Network Analyzer drivers
#
comment "Network Analyzer, Impedance Converters"
config AD5933
tristate "Analog Devices AD5933, AD5934 driver"
depends on I2C
select IIO_RING_BUFFER
select IIO_SW_RING
help
Say yes here to build support for Analog Devices Impedance Converter,
Network Analyzer, AD5933/4, provides direct access via sysfs.
To compile this driver as a module, choose M here: the
module will be called ad5933.
#
# Makefile for Impedance Converter, Network Analyzer drivers
#
obj-$(CONFIG_AD5933) += ad5933.o
This diff is collapsed.
/*
* AD5933 AD5934 Impedance Converter, Network Analyzer
*
* Copyright 2011 Analog Devices Inc.
*
* Licensed under the GPL-2.
*/
#ifndef IIO_ADC_AD5933_H_
#define IIO_ADC_AD5933_H_
/*
* TODO: struct ad5933_platform_data needs to go into include/linux/iio
*/
/**
* struct ad5933_platform_data - platform specific data
* @ext_clk_Hz: the external clock frequency in Hz, if not set
* the driver uses the internal clock (16.776 MHz)
* @vref_mv: the external reference voltage in millivolt
*/
struct ad5933_platform_data {
unsigned long ext_clk_Hz;
unsigned short vref_mv;
};
#endif /* IIO_ADC_AD5933_H_ */
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment