#include <linux/device.h>
#include <linux/err.h>
#include <linux/module.h>
#include <linux/kernel.h>
#include <linux/spi/spi.h>
#include <linux/slab.h>
#include <linux/sysfs.h>
#include <linux/delay.h>
#include <linux/iio/iio.h>
#include <linux/iio/sysfs.h>
#include <linux/platform_data/ad5755.h>
Go to the source code of this file.
#define AD5755_ADDR |
( |
|
x | ) |
((x) << 16) |
#define AD5755_CHANNEL |
( |
|
_bits | ) |
|
Value:{ \
.indexed = 1, \
.output = 1, \
IIO_CHAN_INFO_SCALE_SEPARATE_BIT | \
IIO_CHAN_INFO_OFFSET_SEPARATE_BIT | \
IIO_CHAN_INFO_CALIBSCALE_SEPARATE_BIT | \
IIO_CHAN_INFO_CALIBBIAS_SEPARATE_BIT, \
.scan_type =
IIO_ST(
'u', (_bits), 16, 16 - (_bits)), \
.ext_info = ad5755_ext_info, \
}
Definition at line 398 of file ad5755.c.
#define AD5755_CTRL_REG_DAC 0x2 |
#define AD5755_CTRL_REG_DC_DC 0x3 |
#define AD5755_CTRL_REG_MAIN 0x1 |
#define AD5755_CTRL_REG_SLEW 0x0 |
#define AD5755_CTRL_REG_SW 0x4 |
#define AD5755_DAC_CLR_EN BIT(7) |
#define AD5755_DAC_DC_DC_EN BIT(4) |
#define AD5755_DAC_INT_CURRENT_SENSE_RESISTOR BIT(5) |
#define AD5755_DAC_INT_EN BIT(8) |
#define AD5755_DAC_OUT_EN BIT(6) |
#define AD5755_DAC_VOLTAGE_OVERRANGE_EN BIT(3) |
#define AD5755_DC_DC_FREQ_SHIFT 2 |
#define AD5755_DC_DC_MAXV 0 |
#define AD5755_DC_DC_PHASE_SHIFT 4 |
#define AD5755_DEFAULT_DAC_PDATA |
Value:{ \
.ext_current_sense_resistor = true, \
.enable_voltage_overrange = false, \
.slew = { \
.enable = false, \
}, \
}
Definition at line 541 of file ad5755.c.
#define AD5755_EXT_DC_DC_COMP_RES BIT(6) |
#define AD5755_NOOP 0x1CE000 |
#define AD5755_NUM_CHANNELS 4 |
#define AD5755_READ_FLAG 0x800000 |
#define AD5755_READ_REG_CLEAR |
( |
|
chan | ) |
(0x10 | (chan)) |
#define AD5755_READ_REG_CTRL |
( |
|
chan | ) |
(0x4 | (chan)) |
#define AD5755_READ_REG_DATA |
( |
|
chan | ) |
(chan) |
#define AD5755_READ_REG_DC_DC 0x1a |
#define AD5755_READ_REG_GAIN |
( |
|
chan | ) |
(0x8 | (chan)) |
#define AD5755_READ_REG_MAIN 0x19 |
#define AD5755_READ_REG_OFFSET |
( |
|
chan | ) |
(0xc | (chan)) |
#define AD5755_READ_REG_SLEW |
( |
|
chan | ) |
(0x14 | (chan)) |
#define AD5755_READ_REG_STATUS 0x18 |
#define AD5755_SLEW_ENABLE BIT(12) |
#define AD5755_SLEW_RATE_SHIFT 3 |
#define AD5755_SLEW_STEP_SIZE_SHIFT 0 |
#define AD5755_WRITE_REG_CTRL |
( |
|
chan | ) |
(0x1c | (chan)) |
#define AD5755_WRITE_REG_DATA |
( |
|
chan | ) |
(chan) |
#define AD5755_WRITE_REG_GAIN |
( |
|
chan | ) |
(0x08 | (chan)) |
#define AD5755_WRITE_REG_OFFSET |
( |
|
chan | ) |
(0x10 | (chan)) |
- Enumerator:
ID_AD5755 |
|
ID_AD5757 |
|
ID_AD5735 |
|
ID_AD5737 |
|
Definition at line 105 of file ad5755.c.
MODULE_DESCRIPTION |
( |
"Analog Devices AD5755/55-1/57/35/37 DAC" |
| ) |
|
MODULE_DEVICE_TABLE |
( |
spi |
, |
|
|
ad5755_id |
|
|
) |
| |
MODULE_LICENSE |
( |
"GPL v2" |
| ) |
|
module_spi_driver |
( |
ad5755_driver |
| ) |
|