f64c3052b62ca6684f43f923dcc19fefcc8606c2 |
|
07-Jan-2014 |
Himangi Saraogi <himangi774@gmail.com> |
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>
|
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>
|
85528e881dc35662b53d79fc1b56526c8c794d26 |
|
27-Sep-2013 |
Lars-Peter Clausen <lars@metafoo.de> |
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>
|
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>
|
587a51241c5d74a1e262d34e990f85dc4e5318c5 |
|
17-Sep-2012 |
Lars-Peter Clausen <lars@metafoo.de> |
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>
|
2aecc5b95cdb17d7b80463e9c1a542f389403cbb |
|
17-Sep-2012 |
Lars-Peter Clausen <lars@metafoo.de> |
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>
|
37812d2e10e5790f3cc3319055aac0647080c4af |
|
17-Sep-2012 |
Lars-Peter Clausen <lars@metafoo.de> |
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>
|
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>
|
dafb7d1bd07f61cbaf963345d4ed1c89923e6782 |
|
20-Oct-2011 |
Lars-Peter Clausen <lars@metafoo.de> |
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>
|
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>
|
ea5dbf96dbbfa4cf29925e82af3a0a613079b1bd |
|
23-Feb-2011 |
Michael Hennerich <michael.hennerich@analog.com> |
staging: IIO: trigger: New Blackfin specific trigger driver iio-trig-bfin-timer This driver allows any Blackfin system timer to be used as IIO trigger. It supports trigger rates from 0 to 100kHz in Hz resolution. Changes since V1: IIO: trigger: Apply review feedback Add comment explaining Blackfin hardware timer configurations Fix frequency_store, don't return -EINVAL for frequency set to 0 Signed-off-by: Michael Hennerich <michael.hennerich@analog.com> Acked-by: Jonathan Cameron <jic23@cam.ac.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
|