Commit Graph

15 Commits (4a33c525f0e94b57602abd1e43644cbf6f5418f4)

Author SHA1 Message Date
Jonathan Cameron 6fe8135fcc staging:iio: implement an iio_info structure to take some of the constant elements out of iio_dev.
This was suggested by Arnd Bergmann,  Other elements may well
move in here in future, but it definitely makes sense for these.

Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-05-19 16:15:05 -07:00
Jonathan Cameron 845bd12ac7 staging:iio: use the new central name attribute creation code
Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-05-19 16:14:54 -07:00
Michael Hennerich bd5a793fec IIO: DDS: AD9834: Add support for AD9837 and AD9838 DDS devices
Add support for AD9837 and AD9838 DDS devices
Update copyright and license notice
Fix typo

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-05-03 11:40:01 -07:00
Jonathan Cameron 6f7c8ee585 staging:iio: Add ability to allocate private data space to iio_allocate_device
Suggested by Arnd Bergmann.  Note this will break ALL drivers that
are out of mainline.  The fix is trivial change of
iio_allocate_device() -> iio_allocate_device(0)
Sorry if this causes issues for any one!

V2: Include new drivers in the update

Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk>
Acked-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-04-25 17:23:09 -07:00
Michael Hennerich ea707584ba Staging: IIO: DDS: AD9832 / AD9835 driver
This is a complete rewrite of the AD9832/35 driver.
Purpose was to move this driver to the recently
created API for such devices.

Changes since V1:
IIO: DDS: AD9832 / AD9835 driver: Apply review feedback

Save a few bytes, use union for data allocated for spi buffers.
Remove use of device IDs.
Fix comments.
Make master clock mclk always type unsigned long.

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-09 14:58:57 -08:00
Michael Hennerich 12b9d5bf76 Staging: IIO: DDS: AD9833 / AD9834 driver
Changes since RFC/v1:
IIO: Apply list review feedback

Apply list review feedback:
	Rename attributes to fit IIO convention used in other drivers.
	Fix typos.
	Provide ddsX_out_enable as opposed to ddsX_out_disable.
	Use proper __devexit marking.
	Use strict_strtoul() to avoid negatives.

Changes since v2:
IIO: ad9834.c: Apply more list review feedback

	Update use of dds convenience macros.
	Fix tabbing.
	Remove superfluous brackets.
	Keep output disabled after probe.
	Remove unnecessary code.

Signed-off-by: Michael Hennerich <michael.hennerich@analog.com>
Reviewed-by: Datta Shubhrajyoti <shubhrajyoti@ti.com>
Acked-by: Jonathan Cameron <jic23@cam.ac.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-12-16 12:23:03 -08:00
Michael Hennerich 4851d97d87 Staging: IIO: dds.h convenience macros
Changes since RFC/v1:
IIO: Apply list review feedback

Apply list review feedback:
	Rename attributes to fit IIO convention used in other drivers.
	Provide ddsX_out_enable as opposed to ddsX_out_disable.
	Fix typos.

Changes since v2:
IIO: dds.h: Apply more list review feedback

	Fix mixture of X and [n] notation for indices.
	Remove duplicated descriptions.
	Add store methods to some dds convenience macros.

Signed-off-by: Michael Hennerich <michael.hennerich@analog.com>
Reviewed-by: Jonathan Cameron <jic23@cam.ac.uk>
Acked-by: Jonathan Cameron <jic23@cam.ac.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-12-16 12:23:03 -08:00
Michael Hennerich 8c66be9203 staging: iio: dds: ad9832: Fix kconfig description
The AD9832 driver doesn't support the AD9833 and AD9834

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-12-01 14:53:33 -08:00
Dan Carpenter 59a126418b Staging: iio/dds: double locking bugs
This is a static checker patch and I don't have this hardware.

This code is unusual because while I've often seen a double lock, this
is the first time I've seen code that takes a lock 11 times in a row.  I
feel like I must have missed something.  But I've looked very carefully
I don't see any way the original code is correct.  Does spi_sync()
somehow release the lock in a way that I can't see?  Even if it does,
the locking would still be wrong.

Signed-off-by: Dan Carpenter <error27@gmail.com>
Acked-by: Michael Hennerich <michael.hennerich@analog.com>
Acked-by: Cliff Cai <cliff.cai@analog.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-11-16 12:31:49 -08:00
Cliff Cai 0152a05852 staging: iio: dds: new driver for AD9951 devices
Signed-off-by: Cliff Cai <cliff.cai@analog.com>
Signed-off-by: Michael Hennerich <michael.hennerich@analog.com>
Acked-by: Jonathan Cameron <jic23@cam.ac.uk>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-11-09 15:46:42 -08:00
Cliff Cai 2996a2dc38 staging: iio: dds: new driver for AD9910 devices
Signed-off-by: Cliff Cai <cliff.cai@analog.com>
Signed-off-by: Michael Hennerich <michael.hennerich@analog.com>
Acked-by: Jonathan Cameron <jic23@cam.ac.uk>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-11-09 15:46:41 -08:00
Cliff Cai a886689f6c staging: iio: dds: new driver for AD9852/4 devices
Signed-off-by: Cliff Cai <cliff.cai@analog.com>
Signed-off-by: Michael Hennerich <michael.hennerich@analog.com>
Acked-by: Jonathan Cameron <jic23@cam.ac.uk>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-11-09 15:46:41 -08:00
Cliff Cai a82ab27aa7 staging: iio: dds: new driver for AD9850/1 devices
Signed-off-by: Cliff Cai <cliff.cai@analog.com>
Signed-off-by: Michael Hennerich <michael.hennerich@analog.com>
Acked-by: Jonathan Cameron <jic23@cam.ac.uk>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-11-09 15:46:41 -08:00
Cliff Cai 4a8e6c33e8 staging: iio: dds: new driver for AD9832/3/4/5 devices
Signed-off-by: Cliff Cai <cliff.cai@analog.com>
Signed-off-by: Michael Hennerich <michael.hennerich@analog.com>
Acked-by: Jonathan Cameron <jic23@cam.ac.uk>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-11-09 15:46:40 -08:00
Cliff Cai da6fcbdf76 staging: iio: dds: new driver for AD5930/2 devices
This is the initial driver in the new Direct Digital Synthesis section.

Signed-off-by: Cliff Cai <cliff.cai@analog.com>
Signed-off-by: Michael Hennerich <michael.hennerich@analog.com>
Acked-by: Jonathan Cameron <jic23@cam.ac.uk>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-11-09 15:46:40 -08:00