aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/staging/iio/meter/ade7758_core.c
Commit message (Collapse)AuthorAgeFilesLines
* staging:iio: implement an iio_info structure to take some of the constant ↵Jonathan Cameron2011-05-191-2/+6
| | | | | | | | | | 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>
* staging:iio:meter:ade7758: Use private data space from iio_allocate_deviceMichael Hennerich2011-05-191-49/+43
| | | | | | | | | | Use private data space from iio_allocate_device. Drop dev_data in favor of iio_priv(). Fix indention issues from previous patches. 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>
* staging:iio:meter:ade7758: Use iio channel spec and miscellaneous other changes.Michael Hennerich2011-05-191-84/+89
| | | | | | | | | | | | | | | | | | | Use iio channel spec for the ring buffer channels. Add/update file comment/license headers. Use available_scan_masks to prevent that multiple channels are enabled. Remove wavefrom type attributes. (no handled directly by the scan_elements) Use SPI_MODE_1. Move ade7758_initial_setup() before ade7758_probe_trigger() to ensure the ADE7758 interrupt is disabled when the host interrupt get's enabled. Add spi_device_id. Update ring buffer setup. Some backporting needed to ensure driver builds all the way through core changes. Signed-off-by: Michael Hennerich <michael.hennerich@analog.com> Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* staging:iio:meter:ade7758: Fix list and set of available sample frequencies.Michael Hennerich2011-05-191-10/+18
| | | | | | | | | Fix list of available sample frequencies. Fix ade7758_write_frequency(). 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>
* staging:iio:meter:ade7758: Fix return value of ade7758_write_resetMichael Hennerich2011-05-191-4/+4
| | | | | | | | Update file comment/license header. 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>
* staging:iio:meter:ade7758: Fix timing on SPI read accessor functions.Michael Hennerich2011-05-191-10/+33
| | | | | | | | | | According to the ADE7758 datasheet the minimum time between read command (that is, a write to communication register) and data read must not be less than 4us. 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>
* staging:iio: use the new central name attribute creation codeJonathan Cameron2011-05-191-3/+1
| | | | | Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* staging:iio:ade7758 replace unnecessary event line registration.Jonathan Cameron2011-04-251-27/+3
| | | | | | | | | | | | This was only used for triggering and hence should never have been done this way in the first place. Needs to go prior to cleaning out some of the registration functions. Untested but identical in form to those that have been. 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>
* staging:iio: Add ability to allocate private data space to iio_allocate_deviceJonathan Cameron2011-04-251-1/+1
| | | | | | | | | | | | | 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>
* staging: iio: meter: new driver for ADE7758 devicesBarry Song2010-11-091-0/+866
Signed-off-by: Barry Song <barry.song@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>