1
0
Fork 0
Commit Graph

69 Commits (5937a55cf9a94214cae83248e73f8e4ddc27db48)

Author SHA1 Message Date
Alison Schofield 10e840dfb0 iio: trigger: free trigger resource correctly
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>
2017-01-22 16:14:21 +00:00
rishabh hardas 04e917305d iio:trigger: Fix coding style in iio-trig-bfin-timer.c by aligning 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>
2017-01-07 11:59:55 -05:00
Greg Kroah-Hartman eb7bfed901 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
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v2
 
 iQIcBAABCAAGBQJXAYogAAoJEFSFNJnE9BaIhtsQAK9hsojCFC4EmcE0LdlC7A6r
 h/Any+ehurHSQIZmAZ1mn8QDBedf6Afpj+jl/qt/DADQk3e3u+TO1TbVHHUDB8Na
 ynvt1eibnUPAKxjbetUnPfOTaksp2GN8oScjPqk/3xmP1ip/uP3l2DM+jBOspW2K
 44UDpKE/aeulyCeG8wBHLY0ySuipQ8ZJyebETM3E94UrNdMHiuMyRA+SEbhcG+0T
 GyHYrlmPScFlk3xlhuYk7kS6gJQG0xg6u/qyuaBlQMKY1KXMGknU8sxSmqxRmCNn
 pJ3MeHZY6hFe3PNTgd30z+xbXN4JAifyUBHT2foRF86+f0BJSNIZJo/ynfCPli4z
 Rl+4M9NziYxw4V6osjKtPBquvk8UV6G/1tcgrr5pNFJor4dk6xRg/xCotYsqZuMX
 ypWOMuvkPQq+mqf68uJYlE++/A3xHP7aHdOlsXMgM8605KH1aSecbUP2dhRbHdRs
 u8XTt8Xj6uumQnxUnKjDZGIsDaxyw5JwarjhiNdJaCRgAgFw2qmNiFWYNkBaxxOt
 BheQBceoHLHDk/qTDsi0b5KDLqvArrbY8L6WBR+gW21isFpho5VDMgBSfNfdObGB
 nYaYTBcdx6sXm1SC1bMwVcgMnd3Bs4eWJRw79VFz/pFtTOc5Xpj4uVvnNCzuomqb
 MygKzQb48Gx23saBy4Za
 =SgQo
 -----END PGP SIGNATURE-----

Merge tag 'iio-for-4.7a' of 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
2016-04-04 12:31:05 -07:00
Alison Schofield e279ee89d3 staging: iio: io-trig-bfin-timer: use dev_get_platdata()
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>
2016-03-28 07:30:36 -07:00
Alison Schofield 51fadb9857 staging: iio: convert bare unsigned usage to unsigned int
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>
2016-03-28 09:37:41 +01:00
Lars-Peter Clausen c720842e36 staging:iio: Remove periodic RTC trigger driver
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>
2016-02-27 17:18:38 +00:00
Cristina Moraru ac1640fbd8 staging: iio: trigger: Remove explicit comparisons
Remove comparisons to 0 or NULL

Signed-off-by: Cristina Moraru <cristina.moraru09@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-24 19:32:09 -07:00
Cristina Opriceana c71e16ef7a Staging: iio: trigger: Use braces on both branches of if statement
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>
2015-08-14 17:36:24 -07:00
Cristina Opriceana 2f3403ac2c Staging: iio: trigger: Alignment should match open parenthesis
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>
2015-08-14 17:36:24 -07:00
Cristina Opriceana e84d072410 Staging: iio: trigger: Remove explicit NULL comparison
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>
2015-04-01 17:23:20 +02:00
Greg Kroah-Hartman dc5f2c5f6a 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.
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v2
 
 iQIcBAABCAAGBQJVBe4zAAoJEFSFNJnE9BaISXAP+wcVdU9PyiLdpjh7D73qbbV0
 KnKJHdO+aKe4hCv6Xl0fWIbJcsxTn8ALPHkkxHnu06hd2Q9zANgdJ5dER5XB34fX
 vw+EjsIdiyCDmoOVGzP5SsmbSoO3gNoR5GdWmjKFKjr0eSxinh3AmAesTVSC2T9Y
 vHkjgDj3KaqN735brd2GneeG/s3jY8ZZaiTZ0jFotCtSmBAiPi8uYwIwMLmVpsVu
 M3tcUPWKithRoyKBmO4tiDg2Qwnj0IhN8zyIYiUBftxCIIY7tSlQkYgRzDmrxGG2
 HCITf33Ss87UH0IF1BOm5PXjQ3ClI3idtCwqCeXscAo6IXmoe/+BsXR/m2JqUTdp
 EOrORyzsHc0WkJK8dnp1h1XfiBR4UQpiwce5xGFbni2ycfNBw1/J0l7QTi45D6Z7
 SdGXTgt1AWd8MoWxcxMhWMPQlHsxK/XMPh10O5wD5icxo5EHvnPP0ObZ15Ax6T/V
 kcO+NEJCEHH2Q/kna2M6h4FdUVBxvzjjwhdZVs8PGGfJNDij2cVwspT81lKMauwf
 07S0KHEjhqbRSM0TvsMyf2li1Xwv5eu+G2FTkopESJ4a2zyaLobt/QgTu9dzg4Gh
 QDJFx4xdmNv4OQ+psZuoDznjM/EV+eQR+swH7P6UDyef0jghLwVkqHxM/HYChiyP
 OvZCCnHDB4EiC8jx+c43
 =BmiY
 -----END PGP SIGNATURE-----

Merge tag 'iio-for-4.1a' of 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.
2015-03-24 22:53:52 +01:00
Somya Anand dc6ed26dc3 Staging: iio: use !x instead of x == NULL
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>
2015-03-16 16:14:35 +01:00
Rickard Strandqvist 1a179a14d1 staging: iio: trigger: iio-trig-periodic-rtc: Change frequency type to 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>
2015-02-21 18:14:23 +00:00
Linus Torvalds dab363f938 Staging patches for 3.19-rc1
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.
 
 Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v2
 
 iEYEABECAAYFAlSPICkACgkQMUfUDdst+yksdwCfSLE9VUy1o2sAPDRe+J3bQced
 EWEAoL3RtnejKbo5tHS2IT69pLrwiIDS
 =YXyM
 -----END PGP SIGNATURE-----

Merge tag 'staging-3.19-rc1' of 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
  ...
2014-12-15 18:06:13 -08:00
Wolfram Sang c85d13ed2b staging: iio: trigger: drop owner assignment from platform_drivers
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>
2014-10-20 16:21:38 +02:00
Darshana Padmadas a2bc425bb3 Staging: iio: trigger: Break line over 80 characters
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>
2014-10-20 10:29:09 +08:00
Darshana Padmadas 5c0ec98eba Staging: iio: trigger: Add module name information in Kconfig
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>
2014-10-20 10:29:09 +08:00
Catalina Mocanu 714ab9bdd3 staging: iio: trigger: add blank lines after declarations
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>
2014-09-19 16:25:09 -07:00
Himangi Saraogi f64c3052b6 iio:trigger: Introduce the use of devm_kzalloc
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>
2014-07-07 18:12:02 +01:00
Peter Meerwald 398fd22b6b iio: Remove timestamp argument from iio_trigger_poll() and 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>
2014-06-14 16:25:59 +01:00
Peter Meerwald 9d2f79abdf staging:iio-trig-periodic-rtc: Allow to reset frequency to 0
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>
2014-06-14 16:11:55 +01:00
Peter Meerwald 1c70f7bebc staging:iio-trig-periodic-rtc: Cleanup
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>
2014-06-14 16:11:21 +01:00
Joel Porquet 9f9e1e0ff3 staging: iio: fix coding style
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>
2014-04-14 08:29:28 -07:00
Lars-Peter Clausen 85528e881d staging:iio:iio-trig-bfin-timer: Fix compile error
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>
2013-09-28 11:46:18 +01:00
Jingoo Han e5e26dd5bb staging: iio: replace strict_strto*() with kstrto*()
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>
2013-09-08 15:16:07 +01:00
Jonathan Cameron c7a8be08da iio:triggers:interrupt trigger - move out of staging.
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>
2013-06-04 18:33:19 +01:00
Jonathan Cameron 3c1e02dbb3 staging:iio:triggers:interrupt trigger - one per platform device.
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>
2013-06-04 18:32:53 +01:00
Jonathan Cameron d4fd73bf25 staging:iio:triggers: rename iio-trig-gpio to iio-trig-interrupt
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>
2013-06-04 18:32:24 +01:00
Jonathan Cameron b840333e95 staging:iio:trigger:gpio bug in release of gpio in error path
Also dropped the unneeded gpio.h header.

Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Reviewed-by: Lars-Peter Clausen <lars@metafoo.de>
2013-06-04 18:30:56 +01:00
Jonathan Cameron e64e7d5c8c iio:trigger:sysfs Move out of staging.
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>
2013-05-22 22:16:48 +01:00
Linus Torvalds 5647ac0ad4 Removal of GENERIC_GPIO for v3.10
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.
 
 However, it is not trivial to just create a branch to remove it. Over
 the course of the v3.9 cycle more code referencing GENERIC_GPIO has been
 added to linux-next that conflicts with this branch. The following must
 be done to resolve the conflicts when merging this branch into mainline:
 
 * "git grep CONFIG_GENERIC_GPIO" should return 0 hits. Matches should be
   replaced with CONFIG_GPIOLIB
 * "git grep '\bGENERIC_GPIO\b'" should return 1 hit in the Chinese
   documentation.
 * Selectors of GENERIC_GPIO should be turned into selectors of GPIOLIB
 * definitions of the option in architecture Kconfig code should be deleted.
 
 Stephen has 3 merge fixup patches[1] that do the above. They are currently
 applicable on mainline as of May 2nd.
 
 [1] http://www.mail-archive.com/linux-kernel@vger.kernel.org/msg428056.html
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.4.12 (GNU/Linux)
 
 iQIcBAABAgAGBQJRifUnAAoJEEFnBt12D9kBs2YP/0U6+ia+xYvkVaJc28PDVIzn
 OReZNcJOYU8D5voxz0voaRD0EdcPwjbMu9Kp9aXMHlk4VxevF+8jCc/us0bIjtO1
 VcB5VmSCIhMhxdnBlum11Mk7Vr5MCweyl9NBsypnPt8cl4obMBZHf2yzoodFktNb
 wtyYlOb6FALtc6iDbOO6dG3w9F7FAOLvskUFzdv89m8mupTsBu9jw9NqFDbJHOex
 rxq0Sdd+kWF/nkJVcV5Y6jIdletRlhpipefMJ9diexreHvwqh+c4kJEYZaXgB5+m
 ha95cPbReK1d+RqzM3A8d4irzSVSmq4k7ijI6QkFOr48+AH7XsgKv5so885LKzMN
 IIXg2Phm9i0H8+ecEvhcc4oIYBHJiEKK54Y0qUD9dqbFoDGPTCSqMHdSSMbpAY+J
 bIIXlVzj1En3PPNUJLPt8q8Qz6WxCT9mDST3QSGYnD4o90HT+1R9j92RxGL6McOq
 rUOyJDwmzFvpBvKK4raGdOU435M+ps2NPKKNIRaIGQPPY9rM1kN4YqvhXukEsC9L
 3a3+3cQLh7iKxBHncxeQsJfethP1CPkJnzvF9r+ZZLf2rcPH4pbQIE2uO0XnX/nd
 5/DKi0nGgAJ//GMMzdo3RiOA5zGFjIZ/KMvfhQldpP6qFJRhqdGi6FPlAcwr1z1n
 YnCByPwwlvfC4LTXFOGL
 =xodc
 -----END PGP SIGNATURE-----

Merge tag 'gpio-for-linus' of git://git.secretlab.ca/git/linux

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-05-09 09:59:16 -07:00
Alexandre Courbot 76ec9d18b8 Convert selectors of GENERIC_GPIO to GPIOLIB
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-04-16 18:47:14 +09:00
Lars-Peter Clausen 1e9663c62b iio:trigger: Introduce iio_tigger_{set,get}_drvdata
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>
2013-03-25 21:06:09 +00:00
Ingo Molnar 786133f6e8 Merge branch 'core/irq_work' of 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>
2013-01-24 12:48:41 +01:00
Bill Pemberton e543acf07d staging: iio: remove use of __devexit_p
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-21 15:02:23 -08:00
Bill Pemberton 447d4f29ee staging: iio: remove use of __devexit
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-21 14:59:37 -08:00
Bill Pemberton 4ae1c61ff2 staging: iio: remove use of __devinit
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-11-21 14:31:41 -08:00
Frederic Weisbecker 6147a9d807 irq_work: Remove CONFIG_HAVE_IRQ_WORK
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>
2012-11-17 19:25:12 +01:00
Lars-Peter Clausen 587a51241c staging:iio:trigger:bfintmr Add output support
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>
2012-09-17 22:10:00 +01:00
Lars-Peter Clausen 2aecc5b95c staging:iio:trigger:bfintmr: Only enable timer when necessary
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>
2012-09-17 22:10:00 +01:00
Lars-Peter Clausen 37812d2e10 staging:iio:trigger:bfintmr: Avoid divide by zero
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>
2012-09-17 22:09:59 +01:00
Lars-Peter Clausen f38bc926d0 staging:iio:sysfs-trigger: Use irq_work to properly active trigger
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>
2012-09-06 22:00:28 +01:00
Jonathan Cameron 0f8c962004 staging:iio: Update email address for Jonathan Cameron.
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2012-09-03 20:26:46 +01:00
Lars-Peter Clausen 8e82875268 staging:iio: Add missing __devinit and __devexit annotations
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>
2012-08-27 18:58:11 +01:00
Lars-Peter Clausen 4bf8172772 staging:iio:trigger: Use to_iio_trigger() instead of dev_get_drvdata()
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>
2012-06-22 21:08:10 -07:00
Lars-Peter Clausen 7cbb753701 staging:iio: Streamline API function naming
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-29 21:23:49 -04:00
Jonathan Cameron 06458e277e IIO: Move core headers to include/linux/iio
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-25 11:01:43 -07:00
Michael Hennerich 5f953732ac staging: iio: Convert platform_drivers to use module_platform_driver
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>
2012-03-02 16:35:39 -08:00
Jonathan Cameron c0fdbe149c staging:iio: iio_trigger contains defunct owner field. Remove it.
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>
2011-12-16 10:56:26 -08:00
Lars-Peter Clausen dafb7d1bd0 staging:iio:trigger:bfin-timer: Fix compile error
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>
2011-10-23 10:15:02 +02:00