aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
Commit message (Collapse)AuthorAgeFilesLines
* Merge branch 'staging-next' of ↵Linus Torvalds2011-05-23821-171851/+68282
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging-2.6 * 'staging-next' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging-2.6: (970 commits) staging: usbip: replace usbip_u{dbg,err,info} and printk with dev_ and pr_ staging:iio: Trivial kconfig reorganization and uniformity improvements. staging:iio:documenation partial update. staging:iio: use pollfunc allocation helpers in remaining drivers. staging:iio:max1363 misc cleanups and use of for_each_bit_set to simplify event code spitting out. staging:iio: implement an iio_info structure to take some of the constant elements out of iio_dev. staging:iio:meter:ade7758: Use private data space from iio_allocate_device staging:iio:accel:lis3l02dq make write_reg_8 take value not a pointer to value. staging:iio: ring core cleanups + check if read_last available in lis3l02dq staging:iio:core cleanup: squash tiny wrappers and use dev_set_name to handle creation of event interface name. staging:iio: poll func allocation clean up. staging:iio:ad7780 trivial unused header cleanup. staging:iio:adc: AD7780: Use private data space from iio_allocate_device + trivial fixes staging:iio:adc:AD7780: Convert to new channel registration method staging:iio:adc: AD7606: Drop dev_data in favour of iio_priv() staging:iio:adc: AD7606: Consitently use indio_dev staging:iio: Rip out helper for software rings. staging:iio:adc:AD7298: Use private data space from iio_allocate_device staging:iio: rationalization of different buffer implementation hooks. staging:iio:imu:adis16400 avoid allocating rx, tx, and state separately from iio_dev. ... Fix up trivial conflicts in - drivers/staging/intel_sst/intelmid.c: patches applied in both branches - drivers/staging/rt2860/common/cmm_data_{pci,usb}.c: removed vs spelling - drivers/staging/usbip/vhci_sysfs.c: trivial header file inclusion
| * staging: usbip: replace usbip_u{dbg,err,info} and printk with dev_ and pr_matt mooney2011-05-1911-306/+220
| | | | | | | | | | | | | | | | | | This switches all of the usbip_u{dbg,err,info} and printk statements to dev_<level>, if possible, or pr_<level> macros. And removes a few unnecessary debug statements. Signed-off-by: matt mooney <mfm@muteddisk.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
| * staging:iio: Trivial kconfig reorganization and uniformity improvements.Jonathan Cameron2011-05-193-41/+41
| | | | | | | | | | Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
| * staging:iio:documenation partial update.Jonathan Cameron2011-05-195-78/+91
| | | | | | | | | | | | | | | | | | More to be added, but this brings the docs in line with the current code. Now they are hopefully just uninformative rather than actually incorrect. Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
| * staging:iio: use pollfunc allocation helpers in remaining drivers.Jonathan Cameron2011-05-199-129/+79
| | | | | | | | | | | | | | Some didn't get converted the first time around. Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
| * staging:iio:max1363 misc cleanups and use of for_each_bit_set to simplify ↵Jonathan Cameron2011-05-193-116/+63
| | | | | | | | | | | | | | event code spitting out. Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
| * staging:iio: implement an iio_info structure to take some of the constant ↵Jonathan Cameron2011-05-1961-669/+964
| | | | | | | | | | | | | | | | | | | | 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-194-70/+62
| | | | | | | | | | | | | | | | | | | | 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:accel:lis3l02dq make write_reg_8 take value not a pointer to value.Jonathan Cameron2011-05-193-21/+21
| | | | | | | | | | | | | | Silliness that has been there a long time. Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
| * staging:iio: ring core cleanups + check if read_last available in lis3l02dqJonathan Cameron2011-05-193-233/+136
| | | | | | | | | | Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
| * staging:iio:core cleanup: squash tiny wrappers and use dev_set_name to ↵Jonathan Cameron2011-05-192-39/+18
| | | | | | | | | | | | | | handle creation of event interface name. Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
| * staging:iio: poll func allocation clean up.Jonathan Cameron2011-05-198-90/+95
| | | | | | | | | | | | | | | | Add a function to neatly deal with allocation of poll functions. Ultimately this allows us to more easily change the implementation. Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
| * staging:iio:ad7780 trivial unused header cleanup.Jonathan Cameron2011-05-191-2/+0
| | | | | | | | | | Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
| * staging:iio:adc: AD7780: Use private data space from iio_allocate_device + ↵Michael Hennerich2011-05-191-44/+36
| | | | | | | | | | | | | | | | | | | | | | | | | | | | trivial fixes Use private data space from iio_allocate_device Drop dev_data in favour of iio_priv() Fix typo in gpio name Fix error return path, free gpio Make scale_uv 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>
| * staging:iio:adc:AD7780: Convert to new channel registration methodMichael Hennerich2011-05-191-62/+51
| | | | | | | | | | | | | | | | Convert to new channel registration method 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:adc: AD7606: Drop dev_data in favour of iio_priv()Michael Hennerich2011-05-193-19/+16
| | | | | | | | | | | | | | | | Some other small cleanups including excess header removals. 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:adc: AD7606: Consitently use indio_devMichael Hennerich2011-05-191-19/+19
| | | | | | | | | | | | 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: Rip out helper for software rings.Jonathan Cameron2011-05-195-209/+111
| | | | | | | | | | | | | | | | | | | | | | | | It seemed like a good idea at the time, it wasn't. The code with this in place is larger and more complex for no real gain. Basically we've cleaned up the core around it so much that this no longer makes sense. Only really effects the lis3l02dq driver. Signed-off-by: Jonathan Cameron <jic23@cam.acuk> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
| * staging:iio:adc:AD7298: Use private data space from iio_allocate_deviceMichael Hennerich2011-05-193-44/+41
| | | | | | | | | | | | | | Use private data space from iio_allocate_device Signed-off-by: Michael Hennerich <michael.hennerich@analog.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
| * staging:iio: rationalization of different buffer implementation hooks.Jonathan Cameron2011-05-1923-463/+363
| | | | | | | | | | | | | | | | | | | | | | | | | | 1) move a generic helper function out of ring_sw. It applies to other buffers as well. 2) Get rid of a lot of left over function definitions. 3) Move all the access functions into static structures. 4) Introduce and use a static structure for the setup functions, preenable etc. Some driver conversions thanks to Michael Hennerich (pulled out of patches that would otherwise sit after this). Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
| * staging:iio:imu:adis16400 avoid allocating rx, tx, and state separately from ↵Jonathan Cameron2011-05-194-90/+63
| | | | | | | | | | | | | | | | | | | | iio_dev. Uses the iio_allocate_device parameter to set aside space for adis16400_state and ____cacheline_aligned buffers for tx and rx to avoid separatel allocating them. Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
| * staging:iio:trigger handle name attr in core, remove old alloc and register ↵Jonathan Cameron2011-05-1915-356/+110
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | any control_attrs via struct device As the majority of triggers don't actually have any other control_attrs lets use the fact that struct device has a groups element when we do need to have these attributes registered. A vargs function is used to cut down on lots of building strings in every single driver just in order to pass them into the allocate. Also iio_allocate_trigger_named -> iio_allocate_trigger as there is no unamed version any more, so that is now just confusing. Blackfin tested and fixed by Michael Hennerich. V2: Elements from Michael Hennerich's patches for the ade7758 Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
| * staging:iio: iio_event_interfaces - clean out unused elementsJonathan Cameron2011-05-192-18/+8
| | | | | | | | | | | | | | Also removed const casting of _name that was unnecessary. Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
| * staging:iio:lis3l02dq remerge the two interrupt handlers.Jonathan Cameron2011-05-193-40/+47
| | | | | | | | | | | | | | | | Does add a small burden to both handlers, but the gain is somewhat simpler code. Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
| * staging:iio:buffer - remove unused event code for buffer events.Jonathan Cameron2011-05-193-7/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | These events are no longer passed up to userspace. ad7745 - was using these events to indicate directly dataready events. I'm not sure when it ever makes sense to push these to userspace so for now I've taken them to event codes 0 and 1 until someone has time to make this driver do something more standard. (they were arbitary before, they still are, be it in a different way!) Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
| * staging:iio:addac:adt7316 replace abuse of buffer events.Jonathan Cameron2011-05-191-30/+52
| | | | | | | | | | | | | | | | | | | | | | | | Currently squashed the fault condition from external temperature sensor - lots of other issues to be fixed with this driver which obeys almost no elements of the abi. V2: removed a couple of usused variables that sparse found. Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
| * staging:iio:adc:adt7410 replace abuse of buffer events.Jonathan Cameron2011-05-191-14/+12
| | | | | | | | | | Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
| * staging:iio:adc:adt7310 replace abuse of buffer events.Jonathan Cameron2011-05-191-13/+11
| | | | | | | | | | Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
| * staging:iio:adc:ad7291 remove abuse of buffer events and replace with ↵Jonathan Cameron2011-05-191-16/+42
| | | | | | | | | | | | | | | | | | | | | | something almost sane This device has separate events for a sort of decaying average and for the raw value. We don't have a way of specifying this as yet. For now I have both resulting in the same event code. Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
| * staging:iio:adc:ad7816 and adt75 change to meaningful event code.Jonathan Cameron2011-05-192-2/+8
| | | | | | | | | | | | | | This was another abuse of the buffer event codes. Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
| * staging:iio:adc:ad7150 fix event codes.Jonathan Cameron2011-05-191-12/+19
| | | | | | | | | | | | | | | | I won't guarantee I got these right, but they are certainly closer than the abuse of buffer event codes that was perviously in here. Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
| * staging:iio:core clean out unused elements.Jonathan Cameron2011-05-192-58/+2
| | | | | | | | | | | | | | Trivial cleanup of things that have fallen by the way. Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
| * staging:iio:trigger sysfs userspace trigger rework.Jonathan Cameron2011-05-193-35/+149
| | | | | | | | | | | | | | | | | | | | | | | | | | Awaiting comments on using the nested_irq_trick so that may change. Moves away from platform device to sysfs controlled creation and removal of these triggers. Fix double free of name on trigger allocation failure thanks to Michael Hennerich. Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk> Reviewed-by: Michael Hennerich <michael.hennerich@analog.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
| * staging:iio:max1363 add new 2 channels parts form maxim, 11644-7Jonathan Cameron2011-05-192-3/+58
| | | | | | | | | | | | | | V2: IIO_CHAN macro usage update. Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
| * staging:iio:max1363 trivial removal of unused trig pointer.Jonathan Cameron2011-05-191-1/+0
| | | | | | | | | | Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
| * staging:iio: rip out scan_el attributes. Now handled as iio_dev_attrs like ↵Jonathan Cameron2011-05-192-183/+26
| | | | | | | | | | | | | | | | | | | | everything else. Drivers have no need to use this functionality any more and we save a lot of code by getting rid of it. Signed-off-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-193-212/+258
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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:meter:ade7758: Update trigger to the new APIMichael Hennerich2011-05-191-25/+27
| | | | | | | | | | | | | | | | | | | | | | | | Update trigger to the new API. Add file comment/license header. Some backporting needed to keep the driver building all the way through the 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: Add channel types IIO_CURRENT and IIO_POWER.Michael Hennerich2011-05-192-0/+4
| | | | | | | | | | | | | | | | This is required for the ADE7758 driver cleanup. 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:adc:ad7606: Use private data space from iio_allocate_deviceMichael Hennerich2011-05-195-77/+85
| | | | | | | | | | | | | | | | Trivial backport done by Jonathan Cameron 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:adc:ad7606 Convert to new channel registration method Update Add ↵Michael Hennerich2011-05-193-175/+116
| | | | | | | | | | | | | | | | | | | | | | | | | | missing call to iio_trigger_notify_done() Set pollfunc top and bottom half handler V3: rebase fixup. Backported to relevant merge point by Jonathan Cameron. V2: IIO_CHAN macro usage update 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:gyro:adis16260 move to chan_spec based setup.Jonathan Cameron2011-05-194-266/+239
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | For clean drivers its easier to convert to chan_spec based registration than to work around the scan_el attributes going away. Some minor cleanups done whilst here. Untested. V3: rebase fixup and make attribute_group static. V2: IIO_CHAN macro updates. Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
| * staging:iio:accel:adis16240 move to chan_spec based setup.Jonathan Cameron2011-05-194-199/+220
| | | | | | | | | | | | | | | | | | | | | | | | | | | | For clean drivers its easier to convert to chan_spec based registration than to work around the scan_el attributes going away. Some minor cleanups done whilst here. Untested. V2: IIO_CHAN macro use updated. Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
| * staging:iio: Add chan info support for 'peak_raw' attributes.Jonathan Cameron2011-05-192-1/+7
| | | | | | | | | | Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
| * staging:iio:accel: lis3l02dq add writing for calibscale and calibbias.Jonathan Cameron2011-05-191-0/+29
| | | | | | | | | | | | | | This was missed out in original chan_spec conversion. Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
| * staging:iio:adc:ad7298: Convert to new channel registration methodMichael Hennerich2011-05-193-123/+103
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Convert to new channel registration method Update Add missing call to iio_trigger_notify_done() Backported to a point that will allow the driver to build all the way through the series. V2: IIO_CHAN macro usage updated. 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:adc:ad799x removed unused headers.Jonathan Cameron2011-05-192-3/+0
| | | | | | | | | | Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>