- 27 Nov, 2011 40 commits
-
-
Lars-Peter Clausen authored
Quite a few iio drivers provide no MODULE_DEVICE_TABLE or MODULE_ALIAS or only provide a MODULE_ALIAS while they have support for multiple device ids. This prevents auto module loading from working correctly. This patch fixes it by adding the missing MODULE_DEVICE_TABLEs and MODULE_ALIAS'. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Acked-by: Jonathan Cameron <jic23@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
-
Lars-Peter Clausen authored
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>
-
Lars-Peter Clausen authored
Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
-
Lars-Peter Clausen authored
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>
-
Paul Bolle authored
Commit e6477000 ("staging:iio:dummy Add event support + fake event generator") added "select IIO_SIMPLE_DUMMY_EVGEN if [...]". But there is no Kconfig symbol named IIO_SIMPLE_DUMMY_EVGEN. The select statement for that symbol is a nop. Drop it. Signed-off-by: Paul Bolle <pebolle@tiscali.nl> Acked-by: Jonathan Cameron <jic23@camd.ac.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
-
Lars-Peter Clausen authored
The AD5662 is compatible to the AD5660, but uses an external reference instead of an internal. 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>
-
Lars-Peter Clausen authored
This patch adds support for the Analog Devices AD5421 Loop-Powered, 4mA to 20mA DAC. 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>
-
Lars-Peter Clausen authored
Make sure we only use the allotted space for channel numbers in the event mask and do not let them override other fields. Since negative values are valid channel number, cast the channel number to signed when extracting it from an event mask. 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>
-
Lars-Peter Clausen authored
Some devices have fixed thresholds which can not be modified so make the write_event_value callback optional, so the drivers for these devices do not have to implement a boilerplate no-op callback. 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>
-
Dan Carpenter authored
ad5360_get_channel_vref() returns an int and scale_uv should be the same. Making it unsigned here breaks the error handling. Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Acked-by: Lars-Peter Clausen <lars@metafoo.de> Acked-by: Jonathan Cameron <jic23@cam.ac.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
-
Dan Carpenter authored
regulator_get_voltage() returns an int so "scale_uv" should be an int. Making it unsigned here breaks the error handling. Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Acked-by: Lars-Peter Clausen <lars@metafoo.de> Acked-by: Jonathan Cameron <jic23@cam.ac.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
-
Jonathan Cameron authored
Internally the fact that say scale is shared across channels is actually of remarkably little interest. Hence lets not store it. Numerous devices have weird combinations of channels sharing scale anyway so it is not as though this was really telling us much. Note however that we do still use the shared sysfs attrs thus massively reducing the number of attrs in complex drivers. Side effect is that certain drivers that were abusing this (mostly my work) needed to do a few more checks on what the channel they are being queried on actually is. This is also helpful for in kernel interfaces where we just want to query the scale and don't care whether it is shared with other channels or not. Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk> Acked-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
-
Lars-Peter Clausen authored
Currently the iio framework uses bitmasks for the address field of channel info attributes. This is for historical reasons and no longer required since it will only ever query a single info attribute at once. This patch changes the code to use the non-shifted iio_chan_info_enum values for the info attribute address. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
-
Lars-Peter Clausen authored
Document the different parameters of the IIO_EVENT_CODE macro and friends. While we are at it standardise the name of channel type parameter. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
-
Lars-Peter Clausen authored
Since we want to export struct iio_event_data to userspace use the userspace integer types. Also add a include to linux/types.h. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
-
Jonathan Cameron authored
Issue brought up by Lars-Peter Clausen. This is a varient of what he suggested. io/iio.h for driver stuff (has to include types.h) Sub files for the bits drivers may or may not use iio/sysfs.h iio/buffer.h (contents of current buffer_generic.h) (obviously anything offering events will need events.h as well) iio/types.h for the enums that matter to both iio_chan_type, iio_modifier iio/events.h for the event code stuff IIO_EVENT_CODE and friends. + everything in chrdev.h So this is the stuff that userspace cares about. Also include iio_event_type, iio_event_direction Thus iio drivers include iio.h + as required events.h sysfs.h buffer.h in kernel users (once that interface is merged) will need inkern.h which will pull in types.h Userspace will need just events.h (which pulls in types.h) to get everything they need to know about. Buffer userspace access doesn't currently need any core defines. All information about the data format is passed through sysfs. Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
-
Greg Kroah-Hartman authored
This was introduced in commit b4641336 (iio: fix a leak due to improper use of anon_inode_getfd()) Cc: Al Viro <viro@zeniv.linux.org.uk> Cc: Jonathan Cameron <jic23@cam.ac.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
-
Jonathan Cameron authored
Logic bug meant the chrdev would fail to open if there was no buffer support in a driver or in the core. This meant the ioctl to get the event chrdev would fail and hence events were not available. V2: change error to -EINVAL to mark as unsuitable for reading rather than not there. Both are true depending on how you look at it. Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
-
Lars-Peter Clausen authored
iio_utils.h uses opendir and friends which need dirent.h Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
-
Lars-Peter Clausen authored
Make sure that the userspace buffer is large enough to hold a iio_event_data struct before writing to it. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
-
Jonathan Cameron authored
The logic building the name had a small bug where it did not verify if it was generic before applying the modifier. Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
-
Jonathan Cameron authored
Both of these are decidedly silly bugs show up whilst testing completely different code paths. Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
-
Jonathan Cameron authored
I really don't want to think about how this bit got in there. It allocates some storage - copies something into it then frees it without making use of it. Oops. Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
-
Jonathan Cameron authored
Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
-
Jonathan Cameron authored
Postenable and predisable are called via buffer->ops so don't need to check if buffer exists. The return value of iio_device_register_trigger_consumer is always zero and it isn't checked anyway so get rid of it. Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
-
Maxin B. John authored
Signed-off-by: Maxin B. John <maxin.john@gmail.com> Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
-
Jonathan Cameron authored
Bug has been fixed for some time in the outofstaging tree, but didn't propogate back to here. Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
-
Michael Hennerich authored
Free channels in case read fails with error. 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>
-
Michael Hennerich authored
This patch type casts the switch control variable to 32 bits in order to prevent a call __ucmpdi2 generated by some versions of gcc. This fixes an undefined reference to `__ucmpdi2' when compiled for arch/blackfin 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>
-
Greg Kroah-Hartman authored
It wasn't being used, and had a hacked-up export symbol table which wasn't very nice either. Reported-by: James Morris <jmorris@namei.org> Cc: Herbert Xu <herbert@gondor.hengli.com.au> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
-
Geert Uytterhoeven authored
The m68k core irq code stopped honoring these flags during the irq restructuring in 2006. Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
-
Mark Einon authored
Following the move to put the driver into one file, comments were added to identify which source file each set of functions originated from. These no longer made sense after functions were moved around to remove some forward declarations, so remove them. A function comment was previously not moved along with its function, now they are reunited. Signed-off-by: Mark Einon <mark.einon@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
-
Francois Romieu authored
FIXME: it should be possible to get rid of ET1310_PCI_L0L1LATENCY as well. Signed-off-by: Francois Romieu <romieu@fr.zoreil.com> Acked-by: Mark Einon <mark.einon@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
-
Francois Romieu authored
Signed-off-by: Francois Romieu <romieu@fr.zoreil.com> Acked-by: Mark Einon <mark.einon@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
-
Francois Romieu authored
pci_{save, restore}_state are balanced in .suspend and .resume. They are not used anywhere else in the driver. Signed-off-by: Francois Romieu <romieu@fr.zoreil.com> Acked-by: Mark Einon <mark.einon@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
-
Francois Romieu authored
Wrong status code and unbalanced phy_connect. Signed-off-by: Francois Romieu <romieu@fr.zoreil.com> Acked-by: Mark Einon <mark.einon@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
-
Francois Romieu authored
Signed-off-by: Francois Romieu <romieu@fr.zoreil.com> Acked-by: Mark Einon <mark.einon@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
-
Francois Romieu authored
Signed-off-by: Francois Romieu <romieu@fr.zoreil.com> Acked-by: Mark Einon <mark.einon@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
-
Thomas Meyer authored
Use kmemdup rather than duplicating its implementation The semantic patch that makes this change is available in scripts/coccinelle/api/memdup.cocci. More information about semantic patching is available at http://coccinelle.lip6.fr/Signed-off-by: Thomas Meyer <thomas@m3y3r.de> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
-
Stefan Hajnoczi authored
It is unsafe to free buffers in line6_pcm_stop(), which is not allowed to sleep, since urbs cannot be killed completely there and only unlinked. This means I/O may still be in progress and the URB completion function still gets invoked. This may result in memory corruption when buffer_in is freed but I/O is still pending. Additionally, line6_pcm_start() is not supposed to sleep so it should not use kmalloc(GFP_KERNEL). These issues can be resolved by performing buffer allocation/freeing in the .hw_params/.hw_free callbacks instead. The ALSA documentation also recommends doing buffer allocation/freeing in these callbacks. Signed-off-by: Stefan Hajnoczi <stefanha@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
-