- 23 8月, 2015 8 次提交
-
-
由 Javier Martinez Canillas 提交于
The driver has an OF id table but the .of_match_table is not set so the SPI core can't do an OF style match and the table was unused. Signed-off-by: NJavier Martinez Canillas <javier@osg.samsung.com> Acked-by: NMichael Welling <mwelling@ieee.org> Signed-off-by: NJonathan Cameron <jic23@kernel.org>
-
由 Javier Martinez Canillas 提交于
The SPI core always reports the MODALIAS uevent as "spi:<modalias>" regardless of the mechanism that was used to register the device (i.e: OF or board code) and the table that is used later to match the driver with the device (i.e: SPI id table or OF match table). So drivers needs to export the SPI id table and this be built into the module or udev won't have the necessary information to autoload the needed driver module when the device is added. Signed-off-by: NJavier Martinez Canillas <javier@osg.samsung.com> Acked-by: NLars-Peter Clausen <lars@metafoo.de> Signed-off-by: NJonathan Cameron <jic23@kernel.org>
-
由 Javier Martinez Canillas 提交于
The Documentation/devicetree/bindings/iio/dac/ad7303.txt DT binding doc lists "adi,ad7303" as a compatible string but the corresponding driver does not have an OF match table. Add the table to the driver so the SPI core can do an OF style match. Signed-off-by: NJavier Martinez Canillas <javier@osg.samsung.com> Acked-by: NLars-Peter Clausen <lars@metafoo.de> Signed-off-by: NJonathan Cameron <jic23@kernel.org>
-
由 Javier Martinez Canillas 提交于
The Documentation/devicetree/bindings/iio/frequency/adf4350.txt DT binding doc lists "adi,adf4350" or "adi,adf4351" as compatible strings but the corresponding driver does not have an OF match table. Add the table to the driver so the SPI core can do an OF style match. Signed-off-by: NJavier Martinez Canillas <javier@osg.samsung.com> Acked-by: NLars-Peter Clausen <lars@metafoo.de> Signed-off-by: NJonathan Cameron <jic23@kernel.org>
-
由 Javier Martinez Canillas 提交于
The Documentation/devicetree/bindings/iio/adc/ti-adc128s052.txt DT binding doc lists "ti,adc128s052" or "ti,adc122s021" as compatible strings but the corresponding driver does not have an OF match table. Add the table to the driver so the SPI core can do an OF style match. Signed-off-by: NJavier Martinez Canillas <javier@osg.samsung.com> Signed-off-by: NJonathan Cameron <jic23@kernel.org>
-
由 Javier Martinez Canillas 提交于
The Documentation/devicetree/bindings/iio/proximity/as3935.txt DT binding doc lists "ams,as3935" as a compatible string but the corresponding driver does not have an OF match table. Add the table to the driver so the SPI core can do an OF style match. Signed-off-by: NJavier Martinez Canillas <javier@osg.samsung.com> Signed-off-by: NJonathan Cameron <jic23@kernel.org>
-
由 Javier Martinez Canillas 提交于
The driver has an OF id table but the .of_match_table is not set so the SPI core can't do an OF style match and the table was unused. Signed-off-by: NJavier Martinez Canillas <javier@osg.samsung.com> Signed-off-by: NJonathan Cameron <jic23@kernel.org>
-
由 Javier Martinez Canillas 提交于
The SPI core always reports the MODALIAS uevent as "spi:<modalias>" regardless of the mechanism that was used to register the device (i.e: OF or board code) and the table that is used later to match the driver with the device (i.e: SPI id table or OF match table). So drivers needs to export the SPI id table and this be built into the module or udev won't have the necessary information to autoload the needed driver module when the device is added. Signed-off-by: NJavier Martinez Canillas <javier@osg.samsung.com> Signed-off-by: NJonathan Cameron <jic23@kernel.org>
-
- 16 8月, 2015 15 次提交
-
-
由 Cristina Opriceana 提交于
Fix style issue related to missing braces, detected by checkpatch.pl. Signed-off-by: NCristina Opriceana <cristina.opriceana@gmail.com> Signed-off-by: NJonathan Cameron <jic23@kernel.org>
-
由 Cristina Opriceana 提交于
Fix alignment for function parameters as suggested by checkpatch.pl. Signed-off-by: NCristina Opriceana <cristina.opriceana@gmail.com> Signed-off-by: NJonathan Cameron <jic23@kernel.org>
-
由 Xander Huff 提交于
The driver currently registers a pair of irq handlers using request_threaded_irq(), however the synchronization mechanism between the hardirq and the threadedirq handler is a regular spinlock. Unfortunately, this breaks PREEMPT_RT builds, where a spinlock can sleep, and is thus not able to be acquired from a hardirq handler. This patch gets rid of the threaded handler and pushes all interrupt handling into the hardirq context, and uses request_irq(). To validate that this change has no impact on RT performance, here are cyclictest values with no processes running: $ sudo cyclictest -S -m -p 98 policy: fifo: loadavg: 0.00 0.01 0.05 1/174 2539 T: 0 ( 1405) P:98 I:1000 C:167010520 Min: 9 Act: 12 Avg: 12 Max: 75 T: 1 ( 1862) P:98 I:1500 C:111340339 Min: 9 Act: 12 Avg: 12 Max: 73 Then, all xadc raw handles were accessed in a continuous loop via /sys/bus/iio/devices/iio:device0: $ sudo cyclictest -S -m -p 98 policy: fifo: loadavg: 7.84 7.70 7.63 3/182 4260 T: 0 ( 2559) P:98 I:1000 C:241557018 Min: 11 Act: 18 Avg: 21 Max: 74 T: 1 ( 2560) P:98 I:1500 C:161038006 Min: 10 Act: 21 Avg: 20 Max: 73 Signed-off-by: NXander Huff <xander.huff@ni.com> Acked-by: NLars-Peter Clausen <lars@metafoo.de> Signed-off-by: NJonathan Cameron <jic23@kernel.org>
-
由 Yong Li 提交于
Load the driver using the below command: echo hmc5983 0x1e > /sys/bus/i2c/devices/i2c-?/new_device In sysfs, the iio name is hmc5843, however the i2c name is hmc5983, they are inconsistent. With this patch, the iio name will be the same as the i2c device name Signed-off-by: NYong Li <sdliyong@gmail.com> Reviewed-by: NLars-Peter Clausen <lars@metafoo.de> Signed-off-by: NJonathan Cameron <jic23@kernel.org>
-
由 Linus Walleij 提交于
This makes the error from iio_event_getfd() percolate up to userspace properly so we can know for sure there is no events on this device (-ENODEV returned). Before this patch we would bail out looking for the unsupported events on the erroneous (negative) file descriptor. Signed-off-by: NLinus Walleij <linus.walleij@linaro.org> Acked-by: NDaniel Baluta <daniel.baluta@intel.com> Signed-off-by: NJonathan Cameron <jic23@kernel.org>
-
由 Linus Walleij 提交于
Currently if generic_buffer is invoked without first enabling any channels in scan_elements/*_en, it will fail unable to enable the buffer because bytes_per_datum inside the kernel will be zero if no channels are available. It is implied that the user of the program should enable channels manually or with a script before executing generic_buffer. Be more helpful by stopping execution if no enabled channels can be found, and print a helptext that will tell you what is wrong and what needs to be done. Signed-off-by: NLinus Walleij <linus.walleij@linaro.org> Acked-by: NHartmut Knaack <knaack.h@gmx.de> Signed-off-by: NJonathan Cameron <jic23@kernel.org>
-
由 Linus Walleij 提交于
This makes the event monitor bail out with a helpful error message if a device does not support events, as a related fix to iio core now makes it return -ENODEV properly. Signed-off-by: NLinus Walleij <linus.walleij@linaro.org> Acked-by: NHartmut Knaack <knaack.h@gmx.de> Signed-off-by: NJonathan Cameron <jic23@kernel.org>
-
由 Linus Walleij 提交于
This adds a debugfs hook to read/write registers in the ST sensors using debugfs. Proved to be awesome help when trying to debug why IRQs do not arrive. Signed-off-by: NLinus Walleij <linus.walleij@linaro.org> Acked-by: NDenis Ciocca <denis.ciocca@st.com> Signed-off-by: NJonathan Cameron <jic23@kernel.org>
-
由 Cristina Opriceana 提交于
This patch adds the documentation ABI for the remove_trigger attribute, provided by the iio-trig-sysfs stand-alone driver. Signed-off-by: NCristina Opriceana <cristina.opriceana@gmail.com> Signed-off-by: NJonathan Cameron <jic23@kernel.org>
-
由 Cristina Opriceana 提交于
This patch adds the ABI documentation for the add_trigger attribute, which is provided by the iio-trig-sysfs stand-alone driver. Signed-off-by: NCristina Opriceana <cristina.opriceana@gmail.com> Signed-off-by: NJonathan Cameron <jic23@kernel.org>
-
由 Markus Pargmann 提交于
Signed-off-by: NMarkus Pargmann <mpa@pengutronix.de> Signed-off-by: NJonathan Cameron <jic23@kernel.org>
-
由 Markus Pargmann 提交于
i2c_get_clientdata() is specifically for i2c. Replace it with the generic dev_get/set_drvdata() to support different protocols. Signed-off-by: NMarkus Pargmann <mpa@pengutronix.de> Reviewed-by: NSrinivas Pandruvada <srinivas.pandruvada@linux.intel.com> Signed-off-by: NJonathan Cameron <jic23@kernel.org>
-
由 Markus Pargmann 提交于
i2c_client variable is not really used anymore in the core driver. It is only used to get the device to make proper outputs. This patch replaces all i2c_client usage through direct usage of the device pointer. Signed-off-by: NMarkus Pargmann <mpa@pengutronix.de> Reviewed-by: NSrinivas Pandruvada <srinivas.pandruvada@linux.intel.com> Signed-off-by: NJonathan Cameron <jic23@kernel.org>
-
由 Markus Pargmann 提交于
This patch introduces regmap usage into the driver. This is done to later easily support the SPI interface of this chip. Signed-off-by: NMarkus Pargmann <mpa@pengutronix.de> Reviewed-by: NSrinivas Pandruvada <srinivas.pandruvada@linux.intel.com> Signed-off-by: NJonathan Cameron <jic23@kernel.org>
-
由 Lars-Peter Clausen 提交于
For generic IIO trigger implementations we already have a sub-directory, but the generic buffer implementations currently reside in the IIO top-level directory. The main reason is that things have historically grown into this form. With more generic buffer implementations on its way now is the perfect time to clean this up and introduce a sub-directory for generic buffer implementations to avoid too much clutter in the top-level directory. Signed-off-by: NLars-Peter Clausen <lars@metafoo.de> Signed-off-by: NJonathan Cameron <jic23@kernel.org>
-
- 15 8月, 2015 1 次提交
-
-
由 Lars-Peter Clausen 提交于
Currently the IIO callback buffer implementation is directly built into the IIO core module when enabled. Given that the callback buffer module is standalone functionallity there is really no reason to do this. So move it to its own module. Also rename the source to follow the standard IIO module naming convention as well as add a license notice to the file. Signed-off-by: NLars-Peter Clausen <lars@metafoo.de> Signed-off-by: NJonathan Cameron <jic23@kernel.org>
-
- 13 8月, 2015 14 次提交
-
-
由 Hartmut Knaack 提交于
Move the entry for the CC 10001 ADC driver in Kconfig and Makefile up to maintain alphabetic order. Signed-off-by: NHartmut Knaack <knaack.h@gmx.de> Signed-off-by: NJonathan Cameron <jic23@kernel.org>
-
由 Hartmut Knaack 提交于
Sort the entry for bmc105_magn in Kconfig and Makefile to its correct position. Also add the minor module information for completeness. Fixes: c91746a2 ("iio: magn: Add support for BMC150 magnetometer") Signed-off-by: NHartmut Knaack <knaack.h@gmx.de> Signed-off-by: NJonathan Cameron <jic23@kernel.org>
-
由 Hartmut Knaack 提交于
Adjust some indentation issues as spotted by checkpatch.pl --strict Signed-off-by: NHartmut Knaack <knaack.h@gmx.de> Reviewed-by: NTiberiu Breana <tiberiu.a.breana@intel.com> Signed-off-by: NJonathan Cameron <jic23@kernel.org>
-
由 Hartmut Knaack 提交于
Indicate the bit number of predefined states, make use of these names and change the state type in _resume to u8 to avoid type casting. Signed-off-by: NHartmut Knaack <knaack.h@gmx.de> Reviewed-by: NTiberiu Breana <tiberiu.a.breana@intel.com> Signed-off-by: NJonathan Cameron <jic23@kernel.org>
-
由 Hartmut Knaack 提交于
Check for the following error cases: * lower boundary for val in _write_event * return value of regmap_(field_)read * possible values for chan->type * return value of stk3310_gpio_probe Also add an error path in _probe to put the sensor back into stand-by mode in case of serious errors. Signed-off-by: NHartmut Knaack <knaack.h@gmx.de> Signed-off-by: NJonathan Cameron <jic23@kernel.org>
-
由 Hartmut Knaack 提交于
Some adjustment of indentation to make checkpatch.pl happy in strict mode. Signed-off-by: NHartmut Knaack <knaack.h@gmx.de> Acked-by: NAntoine Tenart <antoine.tenart@free-electrons.com> Signed-off-by: NJonathan Cameron <jic23@kernel.org>
-
由 Hartmut Knaack 提交于
Move the call to enable channel interrupts into its _read() function to have it protected by a mutex. This ensures that only one channel is sampled at a time. Signed-off-by: NHartmut Knaack <knaack.h@gmx.de> Signed-off-by: NJonathan Cameron <jic23@kernel.org>
-
由 Hartmut Knaack 提交于
Make use of GENMASK for consecutive bitmasks and BIT for single bitmasks. Signed-off-by: NHartmut Knaack <knaack.h@gmx.de> Acked-by: NAntoine Tenart <antoine.tenart@free-electrons.com> Signed-off-by: NJonathan Cameron <jic23@kernel.org>
-
由 Greg Kroah-Hartman 提交于
Merge tag 'iio-for-4.3b-2' of git://git.kernel.org/pub/scm/linux/kernel/git/jic23/iio into staging-next Jonathan writes: Second set of new device support, features and cleanup for the 4.3 cycle. Take 2 also includes a fix set that was too late for the 4.2 cycle. As we had a lot of tools and docs work in this set, I have broken those out into their own categories in this description. Fixes from the pull request '4th set of IIO fixes for the 4.2 cycle'. * Poll functions for both event chardev and the buffer one were returning negative error codes (via a positive value). * A recent change to lsiio adding some error handling that was wrong and stopped the tool working. * bmg160 was missing some dependencies in Kconfig * berlin2-adc had a misshandled register (wrote a value rather than a bitmap) New device support * TI opt3001 light sensor * TXC PA12 ALS and proximity sensor. * mcp3301 ADC support (in mcp320x driver) * ST lsm303agr accelerometer and magnetometer drivers (plus some st-sensors common support to allow different WHOAMI register addresses, devices with fixed scale and allow interrupt equiped magnetometers). * ADIS16305, ADIS16367, ADIS16445IMUs (in the adis16400 driver) * ADIS16266 gyro (in the adis16260 driver) * ADIS16137 gyro (in the adis16136 driver) New functionality * mmc35240 DT bindings. * Inverse unit conversion macros to aid handing of values written to sysfs attributes. Core cleanup * Forward declaration of struct iio_trigger to avoid a compile warning. Driver cleanup / fixes * mxs-lradc - Clarify which parts are supported. - Fix spelling erorrs. - Missing/extra includes - reorder includes - add datasheet name listings for all usable channels (to allow them to be bound by name from consumer drivers) * acpi-als - add some function prefixes as per general iio style. * bmc150_magn - replace a magic value with the existing define. * vf610 - determine possible sample frequencies taking into account the electrical characteristics (defining a minimum sample time) * dht11 - whitespace - additional docs - avoid mulitple assignments in one line - Use the new funciton ktime_get_resolution_ns to cleanup a nasty trick previously used for timing. * Fix all drivers that consider 0 a valid IRQ for historical reasons. * Export I2C module alias info where previously missing (to allow autoprobing) * Export OF module alias info where previously missing. * mmc35240 - switch some variables into arrays to improve readability. * mlx90614 - define some magic numbers for readability. * bmc150_magn - expand area locked by a mutex to cover all the use of the data->buffer. - use descriptive naming for a mask instead of a magic value. * berin2-adc - pass up an error code rather that a generic error - constify the iio_chan_spec - some other little tidy ups. * stk8312 - fix a dependency on triggered buffers in kconfig - add a check for invalid attribute values - improve error handling by returning error codes where possible and return immediately where relevant - rework macro defs to use GENMASK etc - change some variable types to reduce unnecessary casting - clean up code style - drop a local buffer copy for bulk reads and use the one in data->buffer instead. * adis16400 - the adis16448 gyroscope scale was wrong. * adis16480 - some more wrong scales for various parts. * adis16300 - has an undocumented product id and serial number registers so use them. * iio_simple_dummy - fix some wrong code indentation. * bmc150-accel - use the chip ID to detect the chip present rather than verifying the expected part was there. This was in response to a wrong ACPI entry on the WinBook TW100. * mma8452 - fix _get_hp_filter_index - drop a double include - pass up an error code rather than rewriting it - range check input values to attribute writes - register defs tidy up using GENMASK and reordering them to be easier to follow. - various coding style cleanups - put the Kconfig entry in the write place (alphabetically). Tools related * Tools cleanup - drop an explicity NULL comparison, some unnecessary braces, use the ARRAY_SIZE macro, send error messages to stderr instead of dropping them in the middle of normal output. * Fix tools to allow that scale and offset attributes are optional. * More tools fixes including allowing true 32bit data (previously an overflow prevented more than 31bits) * Drop a stray header guard that ended up in a c file. * Make calc_digits static as it isn't exported or in the header. * Set ci_array pointer to NULL after free as a protection against non safe usage of the tools core code. Also convert a double pointer to a single one as the extra level of indirection was unnecessary. Docs * DocBook introduction by Daniel Baluta. Glad we are beginning to draw together some more introductory docs to suplement the various tools / examples. * Drop bytes_per_datum sysfs attribute docs as it no longer exists. * A whole load of missing / fixing of kernel-doc for the core of IIO. * Document the trigger name sysfs attribute in the ABI docs. * Minor typos in the ABI docs related to power down modes.
-
由 Cristina Opriceana 提交于
Negative return values are not supported by iio_event_poll since its return type is unsigned int. Fixes: f18e7a06 ("iio: Return -ENODEV for file operations if the device has been unregistered") Signed-off-by: NCristina Opriceana <cristina.opriceana@gmail.com> Cc: <Stable@vger.kernel.org> Signed-off-by: NJonathan Cameron <jic23@kernel.org>
-
由 Cristina Opriceana 提交于
Change return value to 0 if no device is bound since unsigned int cannot support negative error codes. Fixes: f18e7a06 ("iio: Return -ENODEV for file operations if the device has been unregistered") Signed-off-by: NCristina Opriceana <cristina.opriceana@gmail.com> Cc: <Stable@vger.kernel.org> Signed-off-by: NJonathan Cameron <jic23@kernel.org>
-
由 Linus Walleij 提交于
commit acf50b35 "tools:iio:lsiio: add error handling" introduced error handling of errors returned from read_sysfs_string(), but with a simple if (retval), missing the fact that these functions return a positive value if the read was successful. As a result lsiio regresses and does not show any devices on my filesystem. Fix this by checking for only negative error codes. Cc: Hartmut Knaack <knaack.h@gmx.de> Signed-off-by: NLinus Walleij <linus.walleij@linaro.org> Acked-by: NHartmut Knaack <knaack.h@gmx.de> Signed-off-by: NJonathan Cameron <jic23@kernel.org>
-
由 Markus Pargmann 提交于
This patch adds selects for IIO_BUFFER and IIO_TRIGGERED_BUFFER. Without IIO_BUFFER, the driver does not compile. Signed-off-by: NMarkus Pargmann <mpa@pengutronix.de> Reviewed-by: NSrinivas Pandruvada <srinivas.pandruvada@linux.intel.com> Cc: <Stable@vger.kernel.org> Signed-off-by: NJonathan Cameron <jic23@kernel.org>
-
由 Hartmut Knaack 提交于
Active channel number is stored in BERLIN2_SM_CTRL as value, instead of a bit map. The masks for channel interrupts and data ready are a 16 bits wide bit map each, instead of just 4 bits. Also correct the data mask for the temperature sensor, which was Reported-by: NAntoine Tenart <antoine.tenart@free-electrons.com> Signed-off-by: NHartmut Knaack <knaack.h@gmx.de> Acked-by: NAntoine Tenart <antoine.tenart@free-electrons.com> Signed-off-by: NJonathan Cameron <jic23@kernel.org>
-
- 11 8月, 2015 2 次提交
-
-
由 Jason A. Donenfeld 提交于
Ozwpan is completely unmaintained and potentially a security problem. As this is a staging driver, it should be removed, since it has been abandoned. Cc: Shigekatsu Tateno <shigekatsu.tateno@atmel.com> Signed-off-by: NJason A. Donenfeld <Jason@zx2c4.com> Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
由 Greg Kroah-Hartman 提交于
We want the IIO and staging fixes in here as well. Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-