History log of /drivers/staging/iio/trigger/iio-trig-periodic-rtc.c
Revision Date Author Comments
714ab9bdd350413f48ad401bd25e11b3e9f257ab 19-Sep-2014 Catalina Mocanu <catalina.mocanu@gmail.com> 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>
398fd22b6b94cb15c1c299bceecd63644a1b17b4 06-Dec-2014 Peter Meerwald <pmeerw@pmeerw.net> 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>
9d2f79abdf8313682d7b38570de0a717b0e9baf1 06-Dec-2014 Peter Meerwald <pmeerw@pmeerw.net> 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>
1c70f7bebce44515ffe30bf81358fe5f691656ad 06-Dec-2014 Peter Meerwald <pmeerw@pmeerw.net> 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>
9f9e1e0ff3980b73da94b1b3b12779581a2ae580 09-Apr-2014 Joel Porquet <joel@porquet.org> 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>
e5e26dd5bb740c34c975e2ae059126ba3486a1ce 20-Aug-2013 Jingoo Han <jg1.han@samsung.com> 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>
1e9663c62b32f695af37fec4afc473b59f5ca9b4 25-Mar-2013 Lars-Peter Clausen <lars@metafoo.de> 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>
e543acf07db78cfc135e45c4ce0ed26ccf774c37 19-Nov-2012 Bill Pemberton <wfp5p@virginia.edu> 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>
447d4f29ee3fa62f13c65688bb7b74d5a9a0d767 19-Nov-2012 Bill Pemberton <wfp5p@virginia.edu> 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>
4ae1c61ff2ba4fea4e4c1a045cb1f34520608789 19-Nov-2012 Bill Pemberton <wfp5p@virginia.edu> 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>
0f8c9620046d698b8a00d38d25dcdc1d2fa23592 02-Sep-2012 Jonathan Cameron <jic23@kernel.org> staging:iio: Update email address for Jonathan Cameron.

Signed-off-by: Jonathan Cameron <jic23@kernel.org>
8e8287526844441008df286536a21722277bb487 17-Aug-2012 Lars-Peter Clausen <lars@metafoo.de> 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>
4bf8172772254a38741de139a355e36eabbb5cb8 21-Jun-2012 Lars-Peter Clausen <lars@metafoo.de> 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>
7cbb753701d11f3c71e8543e1ae0fc0772edac06 26-Apr-2012 Lars-Peter Clausen <lars@metafoo.de> 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>
06458e277eac2b8761b0a04d3c808d57be281a2e 25-Apr-2012 Jonathan Cameron <jic23@kernel.org> 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>
5f953732ac0ca0044114ad162306212a1b8dd5be 01-Mar-2012 Michael Hennerich <michael.hennerich@analog.com> 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>
c0fdbe149c9d1cab9057c39a10cd609751541cf2 14-Dec-2011 Jonathan Cameron <jic23@kernel.org> 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>
d29f73db791098179af90e6a5b1df41f941b32cd 12-Aug-2011 Jonathan Cameron <jic23@cam.ac.uk> staging:iio:triggers introduce iio_trigger_ops to take const bits out of iio_trig_structure.

Right now this results in increased code, but I still think it is worth doing to avoid
replication across instances of drivers etc and move as much stuff as possible to constant.
Ops structure is optional for the occasional driver that uses none of it (currently
only the ad7793).

Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
59c85e82c2e7a672cb4342dc5ccf9df8a3a14f73 18-May-2011 Jonathan Cameron <jic23@cam.ac.uk> staging:iio:trigger handle name attr in core, remove old alloc and register any control_attrs via struct device

As the majority of triggers don't actually have any other control_attrs lets use the fact
that struct device has a groups element when we do need to have these attributes registered.
A vargs function is used to cut down on lots of building strings in every single driver
just in order to pass them into the allocate.

Also iio_allocate_trigger_named -> iio_allocate_trigger as there is no
unamed version any more, so that is now just confusing.

Blackfin tested and fixed by Michael Hennerich.

V2: Elements from Michael Hennerich's patches for the ade7758

Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
9dbfb6f14a85ef4af5c0a8a49a5ff57591171ad1 04-Sep-2010 Jonathan Cameron <jic23@cam.ac.uk> staging: iio: Make use of the convenient IIO_TRIGGER_NAME_ATTR macro

Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk>
Acked-by: Manuel Stahl <manuel.stahl@iis.fraunhofer.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
7b2c33b11ef003d83c87a58201ff42313e13eff4 11-Jul-2010 Jonathan Cameron <jic23@cam.ac.uk> staging: iio: remove timestamp field from trigger and pass instead through pollfuncs

Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
3c9bbf58b2a7e9099343d36a2c0b206f8c2450df 11-Jul-2010 Jonathan Cameron <jic23@cam.ac.uk> staging: iio: Use kasprintf to allocate and fill trig->name

Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
d1d8abdb05bddce645649c17949b0bc62e6f096b 05-May-2010 Greg Kroah-Hartman <gregkh@suse.de> Staging: iio: trigger: fix up some global variables

These should be static.

Cc: Jonathan Cameron <jic23@cam.ac.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
5a0e3ad6af8660be21ca98a971cd00f331318c05 24-Mar-2010 Tejun Heo <tj@kernel.org> include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit slab.h inclusion from percpu.h

percpu.h is included by sched.h and module.h and thus ends up being
included when building most .c files. percpu.h includes slab.h which
in turn includes gfp.h making everything defined by the two files
universally available and complicating inclusion dependencies.

percpu.h -> slab.h dependency is about to be removed. Prepare for
this change by updating users of gfp and slab facilities include those
headers directly instead of assuming availability. As this conversion
needs to touch large number of source files, the following script is
used as the basis of conversion.

http://userweb.kernel.org/~tj/misc/slabh-sweep.py

The script does the followings.

* Scan files for gfp and slab usages and update includes such that
only the necessary includes are there. ie. if only gfp is used,
gfp.h, if slab is used, slab.h.

* When the script inserts a new include, it looks at the include
blocks and try to put the new include such that its order conforms
to its surrounding. It's put in the include block which contains
core kernel includes, in the same order that the rest are ordered -
alphabetical, Christmas tree, rev-Xmas-tree or at the end if there
doesn't seem to be any matching order.

* If the script can't find a place to put a new include (mostly
because the file doesn't have fitting include block), it prints out
an error message indicating which .h file needs to be added to the
file.

The conversion was done in the following steps.

1. The initial automatic conversion of all .c files updated slightly
over 4000 files, deleting around 700 includes and adding ~480 gfp.h
and ~3000 slab.h inclusions. The script emitted errors for ~400
files.

2. Each error was manually checked. Some didn't need the inclusion,
some needed manual addition while adding it to implementation .h or
embedding .c file was more appropriate for others. This step added
inclusions to around 150 files.

3. The script was run again and the output was compared to the edits
from #2 to make sure no file was left behind.

4. Several build tests were done and a couple of problems were fixed.
e.g. lib/decompress_*.c used malloc/free() wrappers around slab
APIs requiring slab.h to be added manually.

5. The script was run on all .h files but without automatically
editing them as sprinkling gfp.h and slab.h inclusions around .h
files could easily lead to inclusion dependency hell. Most gfp.h
inclusion directives were ignored as stuff from gfp.h was usually
wildly available and often used in preprocessor macros. Each
slab.h inclusion directive was examined and added manually as
necessary.

6. percpu.h was updated not to include slab.h.

7. Build test were done on the following configurations and failures
were fixed. CONFIG_GCOV_KERNEL was turned off for all tests (as my
distributed build env didn't work with gcov compiles) and a few
more options had to be turned off depending on archs to make things
build (like ipr on powerpc/64 which failed due to missing writeq).

* x86 and x86_64 UP and SMP allmodconfig and a custom test config.
* powerpc and powerpc64 SMP allmodconfig
* sparc and sparc64 SMP allmodconfig
* ia64 SMP allmodconfig
* s390 SMP allmodconfig
* alpha SMP allmodconfig
* um on x86_64 SMP allmodconfig

8. percpu.h modifications were reverted so that it could be applied as
a separate patch and serve as bisection point.

Given the fact that I had only a couple of failures from tests on step
6, I'm fairly confident about the coverage of this conversion patch.
If there is a breakage, it's likely to be something in one of the arch
headers which should be easily discoverable easily on most builds of
the specific arch.

Signed-off-by: Tejun Heo <tj@kernel.org>
Guess-its-ok-by: Christoph Lameter <cl@linux-foundation.org>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: Lee Schermerhorn <Lee.Schermerhorn@hp.com>
2fdec57610309f2cf67a8c0a82d262045bcd8c41 21-Aug-2009 Randy Dunlap <randy.dunlap@oracle.com> Staging: iio: fix duplicate dev_attr_name

device attr's should be static, otherwise duplicate identifiers are
created:

drivers/staging/iio/trigger/iio-trig-gpio.o:(.data+0x1c): multiple definition of `dev_attr_name'

Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Cc: Jonathan Cameron <jic23@cam.ac.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
7f3a1fb998e11a45d14556cc17f72d4f8aa89732 18-Aug-2009 Jonathan Cameron <jic23@cam.ac.uk> Staging: IIO: Periodic timer based trigger

The original posting of this driver led to a discussion in
which it was commented that a better system was needed
for dealing with the many possible periodic interrupt
sources available on some SoCs. Unfortunately that is
a big task and as far as I know, no-one has taken it
on as yet. So in the meantime this driver is still
in here.

Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>