summaryrefslogtreecommitdiff
path: root/drivers/staging/iio/dac/ad5446.h
AgeCommit message (Collapse)Author
2012-06-05staging:iio: Move DAC drivers out of stagingLars-Peter Clausen
The IIO DAC drivers are in a reasonably good shape. They all make use of channel spec and non of them provides non-documented sysfs attributes. Code style should be OK as well, both checkpatch and coccicheck only report trivial issues. So lets move the whole folder out of staging. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Acked-by: Jonathan Cameron <jic23@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-04-25staging:iio:dac:ad5446: Add support for the AD5662Lars-Peter Clausen
The AD5662 is compatible to the AD5660, but uses an external reference instead of an internal. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Acked-by: Jonathan Cameron <jic23@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-04-25staging:iio:dac:ad5446: Consolidate store_sample and store_pwr_down functionsLars-Peter Clausen
The devices supported by this drivers only have a single shift register, which contains both the power down mode and the output sample. So writing the power down mode and the output sample can be done by the same function. Call this function prepare_write as it will prepare the spi message for a write. Also introduce a small helper function which performs the whole write by calling the chip the specific prepare function followed by a spi_sync. The two power down bits are always placed ontop of the msb of the output sample, so we can easily calculate their position by adding the channels shift to the channels realbits. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Acked-by: Jonathan Cameron <jic23@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-04-25staging:iio:dac:ad5446: Remove duplicated chip_info entriesLars-Peter Clausen
There are three identical chip_info entries. Remove two of them and use the id of the remaining entry for all three device table entries. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Acked-by: Jonathan Cameron <jic23@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-04-25staging:iio:dac:ad5446: Remove unused struct fieldLars-Peter Clausen
Remove the unused "poll_work" field from the ad5446_state struct. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Acked-by: Jonathan Cameron <jic23@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-04-25staging:iio:dac:ad5446: Fix 24bit transfersLars-Peter Clausen
We currently only write 16 bit in case where we should write 24 bit. The spi message length is calculated from the channel storage_size, but since the storage size is only 16 bit we end up with the wrong value for devices which have power down bits and thus a register with 24 bit. Since each store function knows how many bytes it has to write just use the spi_write function from there instead of going through the hassle of manually preparing a spi_message and keeping buffers in the state struct. Another advantage of this patch is that it will make implementing support for similar I2C based DACs much easier. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Acked-by: Jonathan Cameron <jic23@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2011-11-26staging:iio:dac:ad5446: Convert to channel specLars-Peter Clausen
Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Acked-by: Jonathan Cameron <jic23@cam.ac.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-06-28staging:iio:dac:ad5446: allocate chip state with iio_dev and use iio_priv ↵Jonathan Cameron
for access. Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk> Acked-by: Michael Hennerich <michael.hennerich@analog.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-04-25staging: IIO: DAC: AD5446 add support for AD5541A devicesMichael Hennerich
Signed-off-by: Michael Hennerich <michael.hennerich@analog.com> Acked-by: Jonathan Cameron <jic23@cam.ac.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-03-14staging: IIO: DAC: AD5446: Add support for AD5601/AD5611/AD5621Michael Hennerich
This patch adds support for the AD5601/AD5611/AD5621 single channel, 8-/10-/12-bit, buffered voltage output DACs. Changes since v1: Sort Kconfig description my number Signed-off-by: Michael Hennerich <michael.hennerich@analog.com> Acked-by: Jonathan Cameron <jic23@cam.ac.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-03-14staging: IIO: DAC: AD5446: Add power down supportMichael Hennerich
Signed-off-by: Michael Hennerich <michael.hennerich@analog.com> Acked-by: Jonathan Cameron <jic23@cam.ac.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-02-23staging: IIO: DAC: Add support for the AD5543/AD5553Michael Hennerich
Add support for the AD5543/AD5553 SPI 16-/14-Bit DACs Fix typo in kconfig description Changes since V1: reorder Kconfig help text Signed-off-by: Michael Hennerich <michael.hennerich@analog.com> Acked-by: Jonathan Cameron <jic23@cam.ac.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-11-29staging: iio: dac: ad5446: Remove unused sign member from chip specific ↵Michael Hennerich
information structure Remove unused sign member from chip specific information structure Fix typos Signed-off-by: Michael Hennerich <michael.hennerich@analog.com> Acked-by: Jonathan Cameron <jic23@cam.ac.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-11-29staging: iio: dac: ad5446: Enable driver support for AD5620/AD5640/AD5660 DA ↵Michael Hennerich
converters Initial support for single channel, 12-/14-/16-Bit nanoDAC with On-Chip Reference staging: iio: dac: ad5446: Fix according to review feedback Review feedback by Jonathan Cameron: Use kernel doc style to document headers. Turn data into a union Add some comments for clarity Signed-off-by: Michael Hennerich <michael.hennerich@analog.com> Acked-by: Jonathan Cameron <jic23@cam.ac.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-11-29staging: iio: dac: Enable driver support for AD5444 and AD5446 DA convertersMichael Hennerich
Enable support for AD5444 and AD5446: 12-/14-Bit High Bandwidth Multiplying DACs with Serial Interface. staging: iio: dac: Add support for AD5541A, AD5512A digital to analog convertors staging: iio: dac: Fix according to review feedback Review feedback by Jonathan Cameron: Remove spurious new line. Document struct members. Remove redundant variable initialization. Signed-off-by: Michael Hennerich <michael.hennerich@analog.com> Acked-by: Jonathan Cameron <jic23@cam.ac.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>