aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/staging/iio/resolver (follow)
AgeCommit message (Collapse)AuthorFilesLines
2013-05-09Merge tag 'gpio-for-linus' of git://git.secretlab.ca/git/linuxLinus Torvalds1-2/+2
Pull removal of GENERIC_GPIO from Grant Likely: "GENERIC_GPIO now synonymous with GPIOLIB. There are no longer any valid cases for enableing GENERIC_GPIO without GPIOLIB, even though it is possible to do so which has been causing confusion and breakage. This branch does the work to completely eliminate GENERIC_GPIO." * tag 'gpio-for-linus' of git://git.secretlab.ca/git/linux: gpio: update gpio Chinese documentation Remove GENERIC_GPIO config option Convert selectors of GENERIC_GPIO to GPIOLIB blackfin: force use of gpiolib m68k: coldfire: use gpiolib mips: pnx833x: remove requirement for GENERIC_GPIO openrisc: default GENERIC_GPIO to false avr32: default GENERIC_GPIO to false xtensa: remove explicit selection of GENERIC_GPIO sh: replace CONFIG_GENERIC_GPIO by CONFIG_GPIOLIB powerpc: remove redundant GENERIC_GPIO selection unicore32: default GENERIC_GPIO to false unicore32: remove unneeded select GENERIC_GPIO arm: plat-orion: use GPIO driver on CONFIG_GPIOLIB arm: remove redundant GENERIC_GPIO selection mips: alchemy: require gpiolib mips: txx9: change GENERIC_GPIO to GPIOLIB mips: loongson: use GPIO driver on CONFIG_GPIOLIB mips: remove redundant GENERIC_GPIO select
2013-04-16Convert selectors of GENERIC_GPIO to GPIOLIBAlexandre Courbot1-2/+2
GENERIC_GPIO is now equivalent to GPIOLIB and features that depended on GENERIC_GPIO can now depend on GPIOLIB to allow removal of this option. Signed-off-by: Alexandre Courbot <acourbot@nvidia.com> Acked-by: Linus Walleij <linus.walleij@linaro.org> Acked-by: Grant Likely <grant.likely@secretlab.ca>
2013-03-17staging:iio:resolver:ad2s90 move to info_mask_(shared_by_type/separate)Jonathan Cameron1-1/+1
The original info_mask is going away in favour of the broken out versions. Signed-off-by: Jonathan Cameron <jic23@kernel.org> Acked-by: Michael Hennerich <michael.hennerich@analog.com>
2013-03-17staging:iio:resolver:ad2s1210 move to info_mask_(shared_by_type/separate)Jonathan Cameron1-2/+2
The original info_mask is going away in favour of the broken out versions. Signed-off-by: Jonathan Cameron <jic23@kernel.org> Acked-by: Michael Hennerich <michael.hennerich@analog.com>
2013-03-17staging:iio:resolver:ad2s1200 move to info_mask_(shared_by_type/separate)Jonathan Cameron1-2/+2
The original info_mask is going away in favour of the broken out versions. Signed-off-by: Jonathan Cameron <jic23@kernel.org> Acked-by: Michael Hennerich <michael.hennerich@analog.com>
2013-02-09staging:iio: Use spi_sync_transfer()Lars-Peter Clausen1-4/+1
Use the new spi_sync_transfer() helper function instead of open-coding it. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2012-11-21staging: iio: remove use of __devexit_pBill Pemberton3-3/+3
CONFIG_HOTPLUG is going away as an option so __devexit_p is no longer needed. Signed-off-by: Bill Pemberton <wfp5p@virginia.edu> Cc: Jonathan Cameron <jic23@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-11-21staging: iio: remove use of __devexitBill Pemberton3-3/+3
CONFIG_HOTPLUG is going away as an option so __devexit is no longer needed. Signed-off-by: Bill Pemberton <wfp5p@virginia.edu> Cc: Jonathan Cameron <jic23@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-11-21staging: iio: remove use of __devinitBill Pemberton3-4/+4
CONFIG_HOTPLUG is going away as an option so __devinit is no longer needed. Signed-off-by: Bill Pemberton <wfp5p@virginia.edu> Cc: Jonathan Cameron <jic23@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-08-14staging:iio: Constify static iio_chan_spec arraysLars-Peter Clausen1-1/+1
The per driver iio_chan_spec arrays are usually shared between multiple device instances. So a single device instance may not modify the iio_chan_spec array since this would also affect the other device instances. To make this restriction explicit mark the per driver iio_chan_spec arrays as const. Conversion was done automatically using the following coccinelle semantic patch: // <smpl> @disable optional_qualifier@ identifier channels; @@ static +const struct iio_chan_spec channels[] = ...; // </smpl> Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2012-05-14staging:iio:resolver: Use dev_to_iio_dev()Lars-Peter Clausen1-13/+13
Replace open-coded instances of getting a iio_dev struct from a device struct with dev_to_iio_dev(). 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-29staging:iio: Streamline API function namingLars-Peter Clausen3-9/+9
Currently we use two different naming schemes in the IIO API, iio_verb_object and iio_object_verb. E.g iio_device_register and iio_allocate_device. This patches renames instances of the later to the former. The patch also renames allocate to alloc as this seems to be the preferred form throughout the kernel. In particular the following renames are performed by the patch: iio_put_device -> iio_device_put iio_allocate_device -> iio_device_alloc iio_free_device -> iio_device_free iio_get_trigger -> iio_trigger_get iio_put_trigger -> iio_trigger_put iio_allocate_trigger -> iio_trigger_alloc iio_free_trigger -> iio_trigger_free The conversion was done with the following coccinelle patch with manual fixes to comments and documentation. <smpl> @@ @@ -iio_put_device +iio_device_put @@ @@ -iio_allocate_device +iio_device_alloc @@ @@ -iio_free_device +iio_device_free @@ @@ -iio_get_trigger +iio_trigger_get @@ @@ -iio_put_trigger +iio_trigger_put @@ @@ -iio_allocate_trigger +iio_trigger_alloc @@ @@ -iio_free_trigger +iio_trigger_free </smpl> 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-25IIO: Move core headers to include/linux/iioJonathan Cameron3-6/+6
Step 1 in moving the IIO core out of staging. Signed-off-by: Jonathan Cameron <jic23@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-04-18staging:iio:resolver Add IIO_CHAN_INFO_RAW entries to all drivers.Jonathan Cameron3-0/+5
Precursor to making value read / write attribute optional. No processed values in resolvers at the moment. Signed-off-by: Jonathan Cameron <jic23@kernel.org> Acked-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-01-09Merge branch 'staging-next' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/stagingLinus Torvalds3-0/+3
* 'staging-next' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging: (466 commits) net/hyperv: Add support for jumbo frame up to 64KB net/hyperv: Add NETVSP protocol version negotiation net/hyperv: Remove unnecessary kmap_atomic in netvsc driver staging/rtl8192e: Register against lib80211 staging/rtl8192e: Convert to lib80211_crypt_info staging/rtl8192e: Convert to lib80211_crypt_data and lib80211_crypt_ops staging/rtl8192e: Add lib80211.h to rtllib.h staging/mei: add watchdog device registration wrappers drm/omap: GEM, deal with cache staging: vt6656: int.c, int.h: Change return of function to void staging: usbip: removed unused definitions from header staging: usbip: removed dead code from receive function staging:iio: Drop {mark,unmark}_in_use callbacks staging:iio: Drop buffer mark_param_change callback staging:iio: Drop the unused buffer enable() and is_enabled() callbacks staging:iio: Drop buffer busy flag staging:iio: Make sure a device is only opened once at a time staging:iio: Disallow modifying buffer size when buffer is enabled staging:iio: Disallow changing scan elements in all buffered modes staging:iio: Use iio_buffer_enabled instead of open coding it ... Fix up conflict in drivers/staging/iio/adc/ad799x_core.c (removal of module_init due to using module_i2c_driver() helper, next to removal of MODULE_ALIAS due to using MODULE_DEVICE_TABLE instead).
2011-11-26staging:iio: Add missing MODULE_DEVICE_TABLE and MODULE_ALIASLars-Peter Clausen3-0/+3
Quite a few iio drivers provide no MODULE_DEVICE_TABLE or MODULE_ALIAS or only provide a MODULE_ALIAS while they have support for multiple device ids. This prevents auto module loading from working correctly. This patch fixes it by adding the missing MODULE_DEVICE_TABLEs and MODULE_ALIAS'. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Acked-by: Jonathan Cameron <jic23@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-11-17staging:iio: Use module_spi_driver to register SPI driverLars-Peter Clausen3-36/+3
Use the newly introduced module_spi_driver macro for registering SPI drivers. This allows us to remove a few lines of boilerplate code. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Acked-by: Grant Likely <grant.likely@secretlab.ca> Acked-by: Jonathan Cameron <jic23@kernel.org> Acked-by: Wolfram Sang <w.sang@pengutronix.de> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-10-17staging:iio: fix removal path to allow correct freeing.Jonathan Cameron3-2/+4
Fix a dumb lack of consideration of the effect of combining the iio_device_unregister and iio_free_device calls into one. There is no valid place to free some of the sysfs array elements. Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-10-17staging:iio: gpio build dependency fixingJonathan Cameron1-0/+2
Numerous drivers either had pointless includes of gpio.h or should have been dependent on GENERIC_GPIO and were not. Conversion of ads1210 to use array registration triggered build failures that highlighted all was not well. Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk> Reported-by: Randy Dunlap <rdunlap@xenotime.net> Acked-by: Randy Dunlap <rdunlap@xenotime.net> Acked-by: Michael Hennerich <michael.hennerich@analog.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-10-05staging:iio:resolver:ad2s1210 cleanup gpio handling.Jonathan Cameron1-33/+18
Basically make use of the gpio array functions. Technically the free doesn't need as much info as given here, but this keeps it clean and easy to follow. 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-10-05staging:iio:resolver:ad2s1210 drop raw config register accessJonathan Cameron1-44/+0
This should never have been exposed to userspace 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-10-05staging:iio:resolver:ad2s1210 minimal chan spec conversion.Jonathan Cameron1-51/+63
Just convert the raw reads in this patch. 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-10-05staging:iio:resolver:ad2s1210 ensure iio_dev->name is setJonathan Cameron1-0/+7
This is needed to ensure the required name attribute is created. Using an id table is the route most consistent with other drivers. 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-10-05staging:iio:resolver rename ad2s120x ->ad2s1200Jonathan Cameron3-28/+37
There are far too many possible part numbers that are not covered in here to have such a generic name. So move to naming after one of the supported parts. 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-10-05staging:iio:resolver:ad2s120x chan spec conversionJonathan Cameron1-37/+37
Straight forward conversion. 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-10-05staging:iio:resolver:ad2s90 chan spec conversionJonathan Cameron1-23/+18
Trivial conversion. 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-10-05staging:iio:resolver:ad2s90 ensure name is passed to iio_core.Jonathan Cameron1-3/+8
Scraps the pointless name define and adds an id table. It's not technically required in drivers with only one supported part but it does make the probe code more consistent. 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-10-05staging:iio:resolver:ad2s90 fix registration of null pointerJonathan Cameron1-3/+2
When the new allocation code was introduced a stray pointer to iio_dev structure was left in the chip state structure. This was never set but was then registered with the core. 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-09-26staging: iio: Move sensor drivers to sub menusManuel Stahl1-1/+2
We have a lot of drivers now, so the iio sub menu becomes quite large. This patch creates sub menus for the different sensors. Signed-off-by: Manuel Stahl <manuel.stahl@iis.fraunhofer.de> Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-09-06staging:iio: rework of attribute registration.Jonathan Cameron1-0/+1
This set also includes quite a number of bug fixes of particularly remove functions. Necessary due to issue pointed out in Bart Van Assche's patch: docs/driver-model: Document device.groups V2: Rebase due to patch reordering. V3: Pull various error fixes and cleanups out into their own patches. 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-09-06staging:iio:fix using iio_priv or iio_dev after iio_unregister_deviceJonathan Cameron1-1/+1
This includes calling iio_free_device as that should only be called before the device has been registered. Also one case of iio_free_device being called on a registered device. This has been pulled out of the reworking attributes patch. Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-08-25staging: Add module.h to drivers/staging usersPaul Gortmaker3-0/+3
Lots of people expect module.h to just "be there" without any #include effort. But we are crushing that. So fix those files in staging relying on implicit module.h presence. Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-08-23staging:iio:various Stop drivers putting sysfs attributes in a directory named after the device.Jonathan Cameron2-2/+0
No idea how this particularly 'quirk' got in there in the first place. Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-06-28staging:iio:resolver:ad2s90 general cleanupJonathan Cameron1-36/+12
Very simple driver, so not much to do. 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-06-28staging:iio:resolver:ad2s120x cleanup.Jonathan Cameron1-165/+31
I've currently squashed the vel + pos combined attribute. If people need them precisely paired I doubt they will get them from the sysfs interface anyway. If that is a requirement it should come via a buffer implementation. Note this patch leaves the completely non standard interface alone. That will get fixed later. 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-06-28staging:iio:resolver:ad2s1210 general driver cleanup.Jonathan Cameron3-484/+416
Note I haven't made any changes to the userspace interface as yet. This is all about cleaning up what was actually there (handling all errors etc). 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-05-19staging:iio: implement an iio_info structure to take some of the constant elements out of iio_dev.Jonathan Cameron3-13/+18
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-04-25staging:iio: Add ability to allocate private data space to iio_allocate_deviceJonathan Cameron3-3/+3
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>
2010-12-10Staging: iio: fix up world writable sysfs files.Greg Kroah-Hartman1-14/+14
You should not be able to write to sysfs files from any user. Cc: Graf Yang <graf.yang@analog.com> Cc: Michael Hennerich <michael.hennerich@analog.com> Cc: Jonathan Cameron <jic23@cam.ac.uk> Cc: Mike Frysinger <vapier@gentoo.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-11-09staging: iio: resolver: new driver for AD2S1210 devicesGraf Yang3-0/+908
Signed-off-by: Graf Yang <graf.yang@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-09staging: iio: resolver: new driver for AD2S1200/1205 devicesGraf Yang3-0/+319
Signed-off-by: Graf Yang <graf.yang@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-09staging: iio: resolver: new driver for AD2S90 devicesGraf Yang3-0/+175
This also kicks off the new resolver subsection. Signed-off-by: Graf Yang <graf.yang@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>