summaryrefslogtreecommitdiffstats
path: root/drivers/staging/iio/trigger
Commit message (Collapse)AuthorAgeFilesLines
* iio: trigger: free trigger resource correctlyAlison Schofield2017-01-221-2/+2
| | | | | | | | | | | | | | | | | | | | | | These stand-alone trigger drivers were using iio_trigger_put() where they should have been using iio_trigger_free(). The iio_trigger_put() adds a module_put which is bad since they never did a module_get. In the sysfs driver, module_get/put's are used as triggers are added & removed. This extra module_put() occurs on an error path in the probe routine (probably rare). In the bfin-timer & interrupt trigger drivers, the module resources are not explicitly managed, so it's doing a put on something that was never get'd. It occurs on the probe error path and on the remove path (not so rare). Tested with the sysfs trigger driver. The bfin & interrupt drivers were build tested & inspected only. Signed-off-by: Alison Schofield <amsfield22@gmail.com> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
* iio:trigger: Fix coding style in iio-trig-bfin-timer.c by aligning ↵rishabh hardas2017-01-071-1/+1
| | | | | | | | | parameters with opening bracket. Fixes a warning flagged by checkpatch.pl Signed-off-by: rishabh hardas <rishabheudyptula@gmail.com> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
* Merge tag 'iio-for-4.7a' of ↵Greg Kroah-Hartman2016-04-041-6/+6
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/jic23/iio into staging-next Jonathan writes: First round of IIO new device support, features and cleanups for the 4.7 cycle. New core support * UV light modifier (for intensity) * UV light index channel type. New device support * hp206c barometer and altimeter - new driver. * mcp4131 potentiometer - new driver supporting lots of parts from Microchip. * mma8452 - FXLS8471Q support - NXP LPC18XX SOC ADC - new driver. - NXP LPC18XX SOC DAC - new driver. - rockchip_saradc - support rk3399 * st accel - h3lis331dl support Staging driver removals * adis16204 - obsolete part making it hard to get parts to test the driver in order to clean it up. * adis16220 - obsolete part making it hard to get the parts test the driver in order to clean it up. Features * core - convenience functions to claim / release direct access to the device. Makes more consistent handling of this corner easier. Used in ad7192 driver. * ak8975 - power regulator support. * at91-sama5d2 - differential channel support. * mma8452 - runtime pm support - drop device specific autosleep and use the runtime pm one instead. * ms5611 - DT bindings - oversampling ratio support Cleanups and minor fixes * MAINTAINERS - Peter got married - hence name change! * Documentation - Fix a typo in in_proximity_raw description. - Add some missing docs for iio_buffer_access_funcs. * Tools - update iio_event_monitor names to match new stuff. - make generic_buffer look for triggers ending in -trigger as we let these in for a number of drivers a long time back and now it is a fairly common option. Drivers * staging wide - convert bare unsigned usage to unsigned int to comply with coding style. * non staging wide: - since boiler plate gpio handling of interrupts has been moved into the ACPI core we don't need to include gpio/consumer.h in a load of drivers so drop it. * ad7606 - fix an endian casting sparse warning. * ak8975 - fix a possible unitialized warning from gcc. - drop and unused field left over from earlier cleanups - fix a missing regulator_disable on exit. * at91-sama5d2 - typo and indentation - missing IOMEM dependency. - cleanup mode register usage by avoidling erasing whole thing when changing the sampling frequency. * bmc150 - use the core demux and available_scan_masks to simplify buffer handling - optimize the transfers in the trigger handler now we have a magic function to emulate bulk reads (under circumstances met here). This matters with some rather dumb i2c adapters in particular. - use a single regmap_conf for all bus types as they were all the same. * bmg160 - use the core demux and available_scan_masks to simplify the buffer handling - optimize the transfers in the trigger handler now we have a magic funciton to emulate bulk rads (under circumstances met here). - drop gpio interrupt probing from the driver (ACPI) as now handled by the ACPI core. * ina2xx-adc - update the CALIB register when RShunt changes. - fix scale for VShunt - in reality this error canceled out when used. * isl29028 - use regmap to retrieve the struct device instead of carrying a second copy of it around. * kxcjk-1013 - use core demux - optimize i2c transfers in the trigger handler. * mcp4531 - refactor to use a pointer to access model parameters instead of indexing into the array each time. * mma8452 - style fixes - avoid swtiching to active whenever the config changes - add missin i2c_device_id for mma8451 * mpu6050 - fix possible NULL dereference. - fix the name / chip_id used when ACPI used (otherwise reports as NULL). * ms5611 - fix a missing regulator_disable that left the regulator on during removal. * mxc4005 - drop gpio interrupt handling for ACPI case from driver as the core now handles this case. * st-sensors - note that there are only ever a maximum of 3 axis on current st-sensors so just allocate a fixed sized buffer big enough for that. * tpl0102 - change the i2c_check_functionality condition to bring it inline with other IIO users as EOPNOTSUPP. * tsl2563 - replace deprecated flush_scheduled_work
| * staging: iio: convert bare unsigned usage to unsigned intAlison Schofield2016-03-281-6/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | Use kernel preferred unsigned int declaration style. Patch created using: git ls-files drivers/staging/iio | \ xargs ./scripts/checkpatch.pl -f --fix-inplace --types=unspecified_int Hand edits restored columns in structure definitions. Signed-off-by: Alison Schofield <amsfield22@gmail.com> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
* | staging: iio: io-trig-bfin-timer: use dev_get_platdata()Alison Schofield2016-03-281-1/+2
|/ | | | | | | | | | | Use dev_get_platdata() for retrieving the platform data instead of accessing dev->platform_data directly. Move the assignment out of the declaration (avoid lines over 80 char and put it close to usage). Signed-off-by: Alison Schofield <amsfield22@gmail.com> Acked-by: Daniel Baluta <daniel.baluta@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging:iio: Remove periodic RTC trigger driverLars-Peter Clausen2016-02-273-227/+0
| | | | | | | | | | | | | | | | | | | | | | | With the recently introduced hrtimer based trigger we have a fully functional replacement for the RTC timer trigger that is more flexible and has a better interface to instantiate and manage the trigger instances. The RTC trigger timer could only be instantiated using platform devices which makes it unsuitable for modern devicetree based platforms, while the hrtimer trigger has a configfs based interface that allows creating and deletion of triggers at runtime. In addition since a few years the periodic RTC timer is internally always emulated using a hrtimer using the hrtimer interface directly will yield the same timing precision. So using the RTC timer won't have any advantages on this front either. There is also no evidence that the periodic RTC trigger is currently actually being used on any system. So considering all this remove the driver. Also remove the related item from the TODO list. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Acked-by: Daniel Baluta <daniel.baluta@intel.com> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
* staging: iio: trigger: Remove explicit comparisonsCristina Moraru2015-10-242-3/+3
| | | | | | | Remove comparisons to 0 or NULL Signed-off-by: Cristina Moraru <cristina.moraru09@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* Staging: iio: trigger: Use braces on both branches of if statementCristina Opriceana2015-08-141-1/+2
| | | | | | | Fix style issue related to missing braces, detected by checkpatch.pl. Signed-off-by: Cristina Opriceana <cristina.opriceana@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* Staging: iio: trigger: Alignment should match open parenthesisCristina Opriceana2015-08-142-4/+5
| | | | | | | Fix alignment for function parameters as suggested by checkpatch.pl. Signed-off-by: Cristina Opriceana <cristina.opriceana@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* Staging: iio: trigger: Remove explicit NULL comparisonCristina Opriceana2015-04-011-2/+2
| | | | | | | | This patch removes explicit NULL comparison and replaces it with its shorter form. Detected with coccinelle. Signed-off-by: Cristina Opriceana <cristina.opriceana@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* Merge tag 'iio-for-4.1a' of ↵Greg Kroah-Hartman2015-03-241-7/+5
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/jic23/iio into staging-next Jonathan writes: First set of new drivers, cleanups and functionality for IIO in the 4.1 cycle. New drivers * CM3323 color sensor. * MS5611 pressure and temperature sensor. New functionality * mup6050 - create mux clients for devices described via ACPI. The reasoning and approach taken in this patch are complex. Basically there is no otherway of finding out what is there than by some esoteric look ups in the ACPI data. * cm3232 - PM support * itg3200 - suspend/resume support * mcp320x - add more ADCs to the kconfig to reflect what the driver supports (this patch and the bindings got left behind when the support was added a while back). Docs / utils * ti-adc128s052 - DT bindings. * mcp3422 - DT bindings. * mcp320x - DT bindings * ABI docs for event threshold scale attributes, in_magn_offset, proximity scan_element and thresh falling/rising values for accelerometers. All elements long in use that have slipped by being explicitly documented. * Tidy up the tools previously in drivers/staging/iio/Documentation and move them out to /tools/iio. Yet another move that should have happened long ago. This time Roberta Dobrescu did the leg work. Thanks! Core Cleanups * Export userspace IIO headers. We should have done the appropriate header splitting a long time ago. Thanks to Daniel for sorting this out. * Refactor the registring of attributes for buffers to move all non-custom ones to a vector allowing easier additions to the current set in the future. Driver Cleanups * gpiod related cleanups. Make use of the additional parameter to specify initial direciton to avoid extra code. * bmc150 - Various refactorings to reduce code repitition and prepare for hardware buffer support. Some of these cleanups are good even without the new functionality. * kmx61 - direct use of index to an array avoiding a structure element which was always the index to an element in an array of that structure. * vf610 - avoid incorrect type for return from wait_for_completion_timeout. * gp2ap020a00f - use put_unaligned_le32 for slight code simplification. * ade7754 - improve error handling including suppressing some build warnings. * ade7759 - improve error handling including suppressing some build warnings. * hmc5843 - Long line and indentation fixes. Also some constifying of various constant data. * ade7854 - 80+ character line splitting. * ad2s1210 - fix wrong printf format string. * mxs-lradc - fix wrong printf format string. * ade7954-i2c - code alignment fixes and other trivial but worthwhile bits. * periodic rtc trigger - make the frequency type an unsigned int as it is always treated as such. * jsa1212 - constify struct regmap_config as it is constant. * ad7793 - typo in the MODULE_DESCRIPTION * mma9551 - check gpiod_to_irq errors. Note that this doesn't actually cause any trouble but is worth tidying up as obviously incorrect. * mlx90614 - refactor the register symbols to make it clear which reads are to RAM not PROM.
| * staging: iio: trigger: iio-trig-periodic-rtc: Change frequency type to ↵Rickard Strandqvist2015-02-211-7/+5
| | | | | | | | | | | | | | | | | | | | | | | | unsigned int Change struct iio_prtc_trigger_info frequency type from int to unsigned int. Since it is always treated as such in the driver so they type should probably reflect this. Signed-off-by: Rickard Strandqvist <rickard_strandqvist@spectrumdigital.se> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
* | Staging: iio: use !x instead of x == NULLSomya Anand2015-03-161-1/+1
|/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Functions like devm_kzalloc, kmalloc_array, devm_ioremap, usb_alloc_urb, alloc_netdev return NULL as a return value on failure. Generally, When NULL represents failure, !x is commonly used. This patch cleans up the tests on the results of these functions, thereby using !x instead of x == NULL or NULL == x. This is done via following coccinelle script: @prob_7@ identifier x; statement S; @@ ( x = devm_kzalloc(...); | x = usb_alloc_urb(...); | x = kmalloc_array(...); | x = devm_ioremap(...); | x = alloc_netdev(...); ) ... - if(NULL == x) + if(!x) S Further we have used isomorphism characteristics of coccinelle to indicate x == NULL and NULL == x are equivalent. This is done via following iso script. Expression @ is_null @ expression X; @@ X == NULL <=> NULL == X Signed-off-by: Somya Anand <somyaanand214@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* Merge tag 'staging-3.19-rc1' of ↵Linus Torvalds2014-12-152-2/+6
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging Pull staging driver updates from Greg KH: "Here's the big staging tree pull request for 3.19-rc1. We continued to delete more lines than were added, always a good thing, but not at a huge rate this release, only about 70k lines removed overall mostly from removing the horrid bcm driver. Lots of normal staging driver cleanups and fixes all over the place, well over a thousand of them, the shortlog shows all the horrid details. The "contentious" thing here is the movement of the Android binder code out of staging into the "real" part of the kernel. This is code that has been stable for a few years now and is working as-is in the tens of millions of devices with no issues. Yes, the code is horrid, and the userspace api leaves a lot to be desired, but it's not going to change due to legacy issues that we have no control over. Because so many devices and companies rely on this, and the code is stable, might as well promote it out of staging. This was all discussed at the Linux Plumbers conference, and everyone participating agreed that this was the best way forward. There is work happening to replace the binder code with something new that is happening right now, but I don't expect to see the results of that work for another year at the earliest. If that ever happens, and Android switches over to it, I'll gladly remove this version. As for maintainers, I'll be glad to maintain this code, I've been doing it for the past few years with no problems. I'll send a MAINTAINERS entry for it before 3.19-final is out, still need to talk to the Google developers about if they are willing to help with it or not, last I checked they were, which was good. All of these patches have been in linux-next for a while with no reported issues" * tag 'staging-3.19-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging: (1382 commits) Staging: slicoss: Fix long line issues in slicoss.c staging: rtl8712: remove unnecessary else after return staging: comedi: change some printk calls to pr_err staging: rtl8723au: hal: Removed the extra semicolon lustre: Deletion of unnecessary checks before three function calls staging: lustre: fix sparse warnings: static function declaration staging: lustre: fixed sparse warnings related to static declarations staging: unisys: remove duplicate header staging: unisys: remove unneeded structure staging: ft1000 : replace __attribute ((__packed__) with __packed drivers: staging: rtl8192e: Include "asm/unaligned.h" instead of "access_ok.h" in "rtl819x_BAProc.c" Drivers:staging:rtl8192e: Fixed checkpatch warning Drivers:staging:clocking-wizard: Added a newline staging: clocking-wizard: check for a valid clk_name pointer staging: rtl8723au: Hal_InitPGData() avoid unnecessary typecasts staging: rtl8723au: _DisableAnalog(): Avoid zero-init variables unnecessarily staging: rtl8723au: Remove unnecessary wrapper _ResetDigitalProcedure1() staging: rtl8723au: _ResetDigitalProcedure1_92C() reduce code obfuscation staging: rtl8723au: Remove unnecessary wrapper _DisableRFAFEAndResetBB() staging: rtl8723au: _DisableRFAFEAndResetBB8192C(): Reduce code obfuscation ...
| * Staging: iio: trigger: Break line over 80 charactersDarshana Padmadas2014-10-201-1/+2
| | | | | | | | | | | | | | This patch breaks a line that is over 80 characters as reported by checkpatch.pl Signed-off-by: Darshana Padmadas <darshanapadmadas@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
| * Staging: iio: trigger: Add module name information in KconfigDarshana Padmadas2014-10-201-1/+4
| | | | | | | | | | | | | | | | This patch updates Kconfig with paragraphs that describe config symbol fully. Found using checkpatch.pl. Signed-off-by: Darshana Padmadas <darshanapadmadas@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* | staging: iio: trigger: drop owner assignment from platform_driversWolfram Sang2014-10-202-2/+0
|/ | | | | | | A platform_driver does not need to set an owner, it will be populated by the driver core. Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
* staging: iio: trigger: add blank lines after declarationsCatalina Mocanu2014-09-191-0/+3
| | | | | | | | This fixes the following checkpatch.pl warning: WARNING: Missing a blank line after declarations. Signed-off-by: Catalina Mocanu <catalina.mocanu@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* iio:trigger: Introduce the use of devm_kzallocHimangi Saraogi2014-07-071-20/+11
| | | | | | | | | | This patch introduces the use of the managed version of kzalloc and removes the kfrees in the probe and remove functions. More return paths are added and the labels are renamed to order them. Signed-off-by: Himangi Saraogi <himangi774@gmail.com> Acked-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
* iio: Remove timestamp argument from iio_trigger_poll() and ↵Peter Meerwald2014-06-142-3/+2
| | | | | | | | | iio_trigger_poll_chained() argument has been ignored; adjust drivers accordingly Signed-off-by: Peter Meerwald <pmeerw@pmeerw.net> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
* staging:iio-trig-periodic-rtc: Allow to reset frequency to 0Peter Meerwald2014-06-141-3/+16
| | | | | | | | | | | | | periodic rtc trigger initially has frequency 0 it is possible to change trigger frequency on-the-fly, but it is not possible to set frequency back to 0 this patch allows to set trigger frequency to 0, thereby disabling the rtc interrupt Signed-off-by: Peter Meerwald <pmeerw@pmeerw.net> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
* staging:iio-trig-periodic-rtc: CleanupPeter Meerwald2014-06-141-4/+3
| | | | | | | | Fix extra space in module description Silence output about trigger frequency when trigger gets enabled/disabled Signed-off-by: Peter Meerwald <pmeerw@pmeerw.net> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
* staging: iio: fix coding styleJoel Porquet2014-04-141-1/+2
| | | | | | | | As suggested by checkpatch.pl, use dev_info() instead of printk(KERN_INFO ...) to print message. Signed-off-by: Joel Porquet <joel@porquet.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging:iio:iio-trig-bfin-timer: Fix compile errorLars-Peter Clausen2013-09-281-1/+1
| | | | | | | | | | | | | | | | This patch fixes the following compile errors for the iio-trig-bfin-timer driver: drivers/staging/iio/trigger/iio-trig-bfin-timer.c: In function ‘iio_bfin_tmr_frequency_store’: drivers/staging/iio/trigger/iio-trig-bfin-timer.c:121: error: invalid storage class for function ‘iio_bfin_tmr_frequency_show’ drivers/staging/iio/trigger/iio-trig-bfin-timer.c:118: warning: ISO C90 forbids mixed declarations and code drivers/staging/iio/trigger/iio-trig-bfin-timer.c:135: error: initializer element is not constant ... The issue was introduced in commit e5e26dd5 ("staging: iio: replace strict_strto*() with kstrto*()") by leaving an excess opening bracket. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
* staging: iio: replace strict_strto*() with kstrto*()Jingoo Han2013-09-082-16/+11
| | | | | | | | | | | | | | | | | | The usage of strict_strto*() is not preferred, because strict_strto*() is obsolete. Thus, kstrto*() should be used. Previously, there were only strict_strtol(), strict_strtoul(), strict_strtoull(), and strict_strtoll(). Thus, when converting to the variables, only long, unsigned long, unsigned long long, and long long can be used. However, kstrto*() provides various functions handling all types of variables. Therefore, the types of variables can be changed properly. Signed-off-by: Jingoo Han <jg1.han@samsung.com> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
* iio:triggers:interrupt trigger - move out of staging.Jonathan Cameron2013-06-043-128/+0
| | | | | | | This is now a very simple trigger indeed but useful in many common cases. Signed-off-by: Jonathan Cameron <jic23@kernel.org> Reviewed-by: Lars-Peter Clausen <lars@metafoo.de>
* staging:iio:triggers:interrupt trigger - one per platform device.Jonathan Cameron2013-06-041-76/+45
| | | | | | | | | | Switching from one platform device registering a lot of triggers to one for each trigger simplifies the code somewhat. It would be relatively unusual to have more than a couple of such devices registered so this change will not result in much additional overhead. Signed-off-by: Jonathan Cameron <jic23@kernel.org> Reviewed-by: Lars-Peter Clausen <lars@metafoo.de>
* staging:iio:triggers: rename iio-trig-gpio to iio-trig-interruptJonathan Cameron2013-06-043-45/+31
| | | | | | | | | | Also change all internal naming appropriately. This trigger is no longer just for gpio provided interrupts so change the naming to reflect this. Also drop some now missleading left over comments. Signed-off-by: Jonathan Cameron <jic23@kernel.org> Reviewed-by: Lars-Peter Clausen <lars@metafoo.de>
* staging:iio:trigger:gpio bug in release of gpio in error pathJonathan Cameron2013-06-041-2/+1
| | | | | | | Also dropped the unneeded gpio.h header. Signed-off-by: Jonathan Cameron <jic23@kernel.org> Reviewed-by: Lars-Peter Clausen <lars@metafoo.de>
* iio:trigger:sysfs Move out of staging.Jonathan Cameron2013-05-223-239/+0
| | | | | | | | This simple driver is rather useful. No issues about its interface have been raised for some time hence the proposal to move it out of staging. Signed-off-by: Jonathan Cameron <jic23@kernel.org>
* Merge tag 'gpio-for-linus' of git://git.secretlab.ca/git/linuxLinus Torvalds2013-05-091-1/+1
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
| * Convert selectors of GENERIC_GPIO to GPIOLIBAlexandre Courbot2013-04-161-1/+1
| | | | | | | | | | | | | | | | | | 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>
* | iio:trigger: Introduce iio_tigger_{set,get}_drvdataLars-Peter Clausen2013-03-254-15/+15
|/ | | | | | | | | | | | | | | | | | | | | | | | | | | Introduce iio_tigger_{set,get}_drvdata which allows to attach driver specific data to a trigger. The functions wrap access to the triggers private_data field and all current users are updated to use iio_tigger_{set,get}_drvdata instead of directly accessing the private_data field. This is the first step towards removing the private_data field from the iio_trigger struct. The following coccinelle script has been used to update the drivers: <smpl> @@ struct iio_trigger *trigger; expression priv; @@ -trigger->private_data = priv +iio_trigger_set_drv_data(trigger, priv) @@ struct iio_trigger *trigger; @@ -trigger->private_data +iio_trigger_get_drv_data(trigger) </smpl> Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
* Merge branch 'core/irq_work' of ↵Ingo Molnar2013-01-241-1/+0
|\ | | | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/frederic/linux-dynticks into irq/core irq_work fixes and cleanups, in preparation for full dyntics support. Signed-off-by: Ingo Molnar <mingo@kernel.org>
| * irq_work: Remove CONFIG_HAVE_IRQ_WORKFrederic Weisbecker2012-11-171-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | irq work can run on any arch even without IPI support because of the hook on update_process_times(). So lets remove HAVE_IRQ_WORK because it doesn't reflect any backend requirement. Signed-off-by: Frederic Weisbecker <fweisbec@gmail.com> Acked-by: Steven Rostedt <rostedt@goodmis.org> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Thomas Gleixner <tglx@linutronix.de> Cc: Ingo Molnar <mingo@kernel.org> Cc: Andrew Morton <akpm@linux-foundation.org> Cc: Paul Gortmaker <paul.gortmaker@windriver.com>
* | staging: iio: remove use of __devexit_pBill Pemberton2012-11-213-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>
* | staging: iio: remove use of __devexitBill Pemberton2012-11-213-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>
* | staging: iio: remove use of __devinitBill Pemberton2012-11-213-3/+3
|/ | | | | | | | | 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>
* staging:iio:trigger:bfintmr Add output supportLars-Peter Clausen2012-09-172-16/+80
| | | | | | | | Some converters require an external signal to start the conversion. This patch adds support to the bfintmr trigger driver to generate such a signal. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
* staging:iio:trigger:bfintmr: Only enable timer when necessaryLars-Peter Clausen2012-09-171-3/+24
| | | | | | | | | | This patch hooks up the set_trigger_state callback for the blackfin timer trigger driver and only enables the timer when a trigger consumer requests it to be enabled. There really is no reason to keep the timer running and generate interrupts if nobody is listening to them. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
* staging:iio:trigger:bfintmr: Avoid divide by zeroLars-Peter Clausen2012-09-171-2/+8
| | | | | | | | If the timer frequency has not been configured yet get_gptimer_period() will return 0. Handle this case instead of blindly dividing by the returned value. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
* staging:iio:sysfs-trigger: Use irq_work to properly active triggerLars-Peter Clausen2012-09-062-1/+18
| | | | | | | | | | | | | | | | | | | Since iio_trigger_poll() calls generic_handle_irq() it need to be called from hardirq context. The sysfs trigger is kicked from userspace, so it is obviously not possible to fulfill this requirement by calling iio_trigger_poll directly. As a workaround commit 1f785681 ("staging:iio:trigger sysfs userspace trigger rework.") added iio_trigger_poll_chained() which uses handle_nested_irq instead of generic_handle_irq. This in itself is a hack and only works by chance. handle_nested_irq is intended to be called from the threaded interrupt handler of the parent IRQ. Using handle_nested_irq is also problematic since it will only call the threaded handler of the IRQ. But quite a few IIO drivers rely on their hardirq handler being called or undefined behaviour will occur. This patch uses the irq_work framework to schedule the call to iio_trigger_poll() from hardirq context, which fixes the issues described above. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
* staging:iio: Update email address for Jonathan Cameron.Jonathan Cameron2012-09-032-2/+2
| | | | Signed-off-by: Jonathan Cameron <jic23@kernel.org>
* staging:iio: Add missing __devinit and __devexit annotationsLars-Peter Clausen2012-08-272-6/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Autogenerated using the following coccinelle semantic patch: // <smpl> @r1@ identifier driver; identifier fn; position p; type T; @@ T driver = { .remove = ( fn@p | __devexit_p(fn@p) ) }; @r2@ identifier r1.fn; position p != r1.p; @@ fn@p @r3@ identifier r1.fn; position r1.p; @@ ( __devexit_p(fn@p) | -fn@p +__devexit_p(fn) ) @depends on !r2@ identifier r1.fn; @@ static -int fn +int __devexit fn (...) { ... } @r11@ identifier driver; identifier fn; position p; type T; @@ T driver = { .probe = fn@p }; @r12@ identifier r11.fn; position p != r11.p; @@ fn@p @depends on !r12@ identifier r11.fn; @@ static -int fn +int __devinit fn (...) { ... } // </smpl> Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
* staging:iio:trigger: Use to_iio_trigger() instead of dev_get_drvdata()Lars-Peter Clausen2012-06-223-5/+5
| | | | | | | | | | | Use to_iio_trigger(dev) instead of dev_get_drvdata(dev). Both will return the trigger which belongs to the device, but the the first on is a bit more lightweight. Also this will eventually free up the drvdata pointer of the device for driver specific data. 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>
* staging:iio: Streamline API function namingLars-Peter Clausen2012-04-294-11/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* IIO: Move core headers to include/linux/iioJonathan Cameron2012-04-254-8/+8
| | | | | | | 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>
* staging: iio: Convert platform_drivers to use module_platform_driverMichael Hennerich2012-03-023-33/+3
| | | | | | | | No functional changes. Signed-off-by: Michael Hennerich <michael.hennerich@analog.com> Acked-by: Jonathan Cameron <jic23@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging:iio: iio_trigger contains defunct owner field. Remove it.Jonathan Cameron2011-12-161-1/+0
| | | | | | | | | | This field moved into the trigger_ops structure a while back, but somehow never quite got cleared up. This clears the last few drivers to set it (nothing uses it) and gets rid of it entirely. Signed-off-by: Jonathan Cameron <jic23@kernel.org> Acked-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* staging:iio:trigger:bfin-timer: Fix compile errorLars-Peter Clausen2011-10-231-1/+1
| | | | | | 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>
OpenPOWER on IntegriCloud