summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* iio: Drop owner assignment from i2c_driverKrzysztof Kozlowski2015-07-1130-30/+0
| | | | | | | | i2c_driver does not need to set an owner because i2c_register_driver() will set it. Signed-off-by: Krzysztof Kozlowski <k.kozlowski@samsung.com> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
* staging: iio: Drop owner assignment from i2c_driverKrzysztof Kozlowski2015-07-113-3/+0
| | | | | | | | i2c_driver does not need to set an owner because i2c_register_driver() will set it. Signed-off-by: Krzysztof Kozlowski <k.kozlowski@samsung.com> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
* Staging: iio: dummy: Fix blank line warningsCristina Opriceana2015-07-114-3/+3
| | | | | | | | Multiple blank lines should not be used as indicated by checkpatch.pl. Also, a line should be used after a function/structure declaration. Signed-off-by: Cristina Opriceana <cristina.opriceana@gmail.com> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
* iio: frequency: adf4350: Delete blank lineAna Calinov2015-07-111-1/+0
| | | | | | | | | This patch removes an unnecessary blank line found by checkpatch.pl --strict: Blank lines aren't necessary after an open brace '{'. Signed-off-by: Ana Calinov <ana.calinov@gmail.com> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
* iio: accel: kxcjk-1013: Remove blank linesAna Calinov2015-07-111-3/+0
| | | | | | | | | | | This patch fixes the the following errors given by checkpatch.pl with --strict: Please don't use multiple blank lines. Blank lines aren't necessary after an open brace '{'. Signed-off-by: Ana Calinov <ana.calinov@gmail.com> Reviewed-by: Daniel Baluta <daniel.baluta@intel.com> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
* iio: Fix parameters in iio_triggered_buffer_setupCristina Opriceana2015-07-052-8/+8
| | | | | | | | | | | This patch renames the top half handler and the bottom half handler of iio_triggered_buffer_setup() in accordance with their usage. The bottom half has been renamed to reflect the fact that it is a thread based call, compliant with iio_alloc_pollfunc(). The names of the parameters were swapped, thus creating confusion. Signed-off-by: Cristina Opriceana <cristina.opriceana@gmail.com> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
* iio: accel: Add sampling rate support for STK8312Tiberiu Breana2015-07-051-14/+82
| | | | | | | | Added support for setting the STK8312 accelerometer's sampling rate. Signed-off-by: Tiberiu Breana <tiberiu.a.breana@intel.com> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
* iio: accel: Add buffer mode for Sensortek STK8312Tiberiu Breana2015-07-051-35/+265
| | | | | | | | | | | | | | Added triggered buffer mode support for the STK8312 accelerometer. Additional changes: - set_mode now sets operation mode directly, no longer masking the register's previous value - read_accel now returns raw acceleration data instead of the sign_extend32 value - read_raw will now enable/disable the sensor with each reading Signed-off-by: Tiberiu Breana <tiberiu.a.breana@intel.com> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
* iio: accel: Add trigger support for STK8BA50Tiberiu Breana2015-07-051-25/+271
| | | | | | | | | | | | | Add data-ready interrupts and trigger support for STK8BA50. Additional changes: - read_accel now returns raw acceleration data instead of the sign_extend32 value - read_raw will now enable/disable the sensor with each reading Change-Id: I9c2d7be4256b2dcc5546e4432308ea54f8004333 Signed-off-by: Tiberiu Breana <tiberiu.a.breana@intel.com> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
* iio: pressure: ms5611: add support for MS5607 temperature and pressure sensorTomasz Duszynski2015-07-055-17/+88
| | | | | | | | | MS5607 is temperature and pressure sensor which hardware is similar to MS5611. Both sensors share command protocol and support both I2C and SPI serial protocols. They only differ in compensation algorithms. Signed-off-by: Tomasz Duszynski <tduszyns@gmail.com> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
* iio: pressure: ms5611: remove IIO_CHAN_INFO_SCALE from maskTomasz Duszynski2015-07-051-4/+2
| | | | | | | | | IIO_CHAN_INFO_SCALE is useful whenever conversion to standard units is done in userspace. In this case conversion is handled by driver so this bit is unnecessary. Signed-off-by: Tomasz Duszynski <tduszyns@gmail.com> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
* iio: tmp006: Use GENMASKPeter Meerwald2015-07-051-2/+2
| | | | | Signed-off-by: Peter Meerwald <pmeerw@pmeerw.net> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
* iio: ssp_sensors: Remove redundant spi driver bus initializationAntonio Borneo2015-07-051-1/+0
| | | | | | | | | | | | | | | In ancient times it was necessary to manually initialize the bus field of an spi_driver to spi_bus_type. These days this is done in spi_register_driver(), so we can drop the manual assignment. Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com> To: Jonathan Cameron <jic23@kernel.org> To: Lars-Peter Clausen <lars@metafoo.de> To: Karol Wrona <k.wrona@samsung.com> To: linux-iio@vger.kernel.org Cc: linux-kernel@vger.kernel.org Acked-by: Karol Wrona <k.wrona@samsung.com> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
* tools: iio: Add single-byte case for generic_bufferTiberiu Breana2015-07-051-0/+21
| | | | | | | | | | Some sensors export data in an 8-bit format. Add a single-byte case for the generic_buffer tool so that these sensors' buffer data can be visualized. Signed-off-by: Tiberiu Breana <tiberiu.a.breana@intel.com> Reviewed-by: Hartmut Knaack <knaack.h@gmx.de> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
* iio:adc:Kconfig: rework help descriptionsHartmut Knaack2015-06-281-10/+38
| | | | | | | | | | | Rework the help text of several ADCs to make sure that: - the module name is mentioned, if the driver can be built as a module - "If unsure, say N" messages are dropped - right indentation is maintained Signed-off-by: Hartmut Knaack <knaack.h@gmx.de> Acked-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
* tools:iio:iio_event_monitor: check if event is fully readHartmut Knaack2015-06-211-0/+6
| | | | | | | Check that the read event is of the expected size. Signed-off-by: Hartmut Knaack <knaack.h@gmx.de> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
* iio: light: Add support for ROHM RPR0521 sensorDaniel Baluta2015-06-213-0/+627
| | | | | | | | This patch adds support for ROHM RPR0521 ambient light and proximity sensor. It offers raw readings for intensity and proximity. Signed-off-by: Daniel Baluta <daniel.baluta@intel.com> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
* iio: magn: bmc150: add support for bmc156Vlad Dogaru2015-06-211-0/+2
| | | | | | | | | | | | The BMC156 is a slightly less capable version of BMC150 which lacks support for magnetometer thresholds. Since this driver does not support those anyway, adding support is trivial. Datasheet is available at https://ae-bst.resource.bosch.com/media/products/dokumente/bmc156_1/BST-BMC156-DS000-01.pdf Signed-off-by: Vlad Dogaru <vlad.dogaru@intel.com> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
* iio: magn: bmc150: decouple buffer and triggerVlad Dogaru2015-06-211-31/+38
| | | | | Signed-off-by: Vlad Dogaru <vlad.dogaru@intel.com> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
* iio: allow userspace to flush the hwfifo with non-blocking readsOctavian Purdila2015-06-211-9/+9
| | | | | | | | | | | | | | This patch changes the semantics of non-blocking reads so that a hardware fifo flush is triggered if the available data in the device buffer is less then the requested size. This allows userspace to accurately generate hardware fifo flushes, by doing a non-blocking read with a size greater then the sum of the device buffer and hardware fifo size. Signed-off-by: Octavian Purdila <octavian.purdila@intel.com> Reviewed-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
* iio:accel:bmc150-accel: code style cleanupHartmut Knaack2015-06-211-42/+49
| | | | | | | | | | | | | | | | | | | Apply the following coding style changes as indicated by checkpatch.pl in strict mode: - Please don't use multiple blank lines - braces {} should be used on all arms of this statement (if/else) - Alignment should match open parenthesis - Please don't use multiple blank lines - Blank lines aren't necessary after an open brace '{' - Missing a blank line after declarations - No space is necessary after a cast Also wrap/consolidate error messages to fit 80 characters per line and rework a comment. Signed-off-by: Hartmut Knaack <knaack.h@gmx.de> Reviewed-by: Octavian Purdila <octavian.purdila@intel.com> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
* iio:accel:bmc150-accel: make use of mask definitionHartmut Knaack2015-06-211-1/+1
| | | | | | | | | | BMC150_ACCEL_SLOPE_THRES_MASK was defined some time ago, but its 'magic' value got used instead in bmc150_accel_write_event(). Make use of it for improved readability. Signed-off-by: Hartmut Knaack <knaack.h@gmx.de> Reviewed-by: Octavian Purdila <octavian.purdila@intel.com> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
* iio: pressure: Fix Measurement Specialties vendor namePeter Meerwald2015-06-211-2/+2
| | | | | Signed-off-by: Peter Meerwald <pmeerw@pmeerw.net> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
* iio:light:cm3323: add empty lines for code structureHartmut Knaack2015-06-211-0/+5
| | | | | | | | | Add some empty lines to visually separate logical structure blocks, as after if-blocks or before regular returns. Signed-off-by: Hartmut Knaack <knaack.h@gmx.de> Reviewed-by: Daniel Baluta <daniel.baluta@intel.com> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
* iio:light:cm3323: make use of GENMASKHartmut Knaack2015-06-211-1/+1
| | | | | | | Use GENMASK to define the integration time bitmask. Signed-off-by: Hartmut Knaack <knaack.h@gmx.de> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
* iio:light:cm3323: replace unneeded variableHartmut Knaack2015-06-211-6/+6
| | | | | | | | | | In cm3323_read_raw() i is used as return variable for the integration time index. The also existing return variable ret however is unused in this case, although appropriate. Replace i with ret and drop it. Signed-off-by: Hartmut Knaack <knaack.h@gmx.de> Reviewed-by: Daniel Baluta <daniel.baluta@intel.com> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
* iio:light:cm3323: pass up error valueHartmut Knaack2015-06-211-1/+1
| | | | | | | | | cm3323_get_it_bits() returns a valid error code, so pass it up in cm3323_read_raw(). Signed-off-by: Hartmut Knaack <knaack.h@gmx.de> Reviewed-by: Daniel Baluta <daniel.baluta@intel.com> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
* iio:light:Kconfig: fix typo in descriptionHartmut Knaack2015-06-211-1/+1
| | | | | | | | Fix the typo in the module description for the CM3323. Signed-off-by: Hartmut Knaack <knaack.h@gmx.de> Reviewed-by: Daniel Baluta <daniel.baluta@intel.com> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
* iio: accel: STK8BA50: suspend sensor on init errorsTiberiu Breana2015-06-211-2/+6
| | | | | | | | Put chip in 'suspend' mode in case something goes wrong during probe. Signed-off-by: Tiberiu Breana <tiberiu.a.breana@intel.com> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
* iio: light: isl29125: Add scale_available informationPeter Meerwald2015-06-211-0/+12
| | | | | Signed-off-by: Peter Meerwald <pmeerw@pmeerw.net> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
* tools: iio: Add missing names to iio_event_monitorPeter Meerwald2015-06-211-0/+8
| | | | | Signed-off-by: Peter Meerwald <pmeerw@pmeerw.net> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
* iio: Add missing modifier names to corePeter Meerwald2015-06-211-0/+8
| | | | | | | | some are documented, others are in iio_event_monitor.c which was recently moved from staging Signed-off-by: Peter Meerwald <pmeerw@pmeerw.net> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
* iio: accel: mma9553: document use of mutexIrina Tirdea2015-06-141-0/+4
| | | | | | | | | Fix checkpatch.pl --strict check: CHECK: struct mutex definition without comment + struct mutex mutex; Signed-off-by: Irina Tirdea <irina.tirdea@intel.com> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
* iio: accel: mma9553: fix alignment issuesIrina Tirdea2015-06-143-47/+43
| | | | | | | | | Fix code alignment and wrap parameters. Fix issues reported by checkpatch.pl --strict. Signed-off-by: Irina Tirdea <irina.tirdea@intel.com> Suggested-by: Hartmut Knaack <knaack.h@gmx.de> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
* iio: accel: mma9551_core: use size in words for word buffersIrina Tirdea2015-06-142-18/+18
| | | | | | | | | | Change the prototype for the mma9551_read/write_*_words functions to receive the length of the buffer in words (instead of bytes) since we are using a word buffer. This will prevent users from sending an odd number of bytes for a word array. Signed-off-by: Irina Tirdea <irina.tirdea@intel.com> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
* iio: light: hid-sensor-prox: Fit assignment in one lineFabio Estevam2015-06-141-2/+1
| | | | | | | | | | There is no need to do the assignment to indio_dev->num_channels in two lines code. Put it in one line. Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
* iio: adc: cc10001: Power-up the ADC at probe time when used remotelyNaidu Tellapati2015-06-141-5/+21
| | | | | | | | | | | | | | | | | The ADC is typically shared with remote CPUs not running Linux. However, there is only one register to power-up/power-down. Remote CPUs aren't able to power-up the ADC, and rely in Linux doing it instead. This commit uses the adc-reserved-channels devicetree property to distinguish shared usage. In this case, the ADC is powered up at probe time. If the ADC is used only by the CPU running Linux, power-up/down at runtime, only when neeeded. Signed-off-by: Naidu Tellapati <naidu.tellapati@imgtec.com> Signed-off-by: Ezequiel Garcia <ezequiel.garcia@imgtec.com> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
* iio: accel: Add sampling rate support for STK8BA50Tiberiu Breana2015-06-141-7/+50
| | | | | | | | Added support for setting the STK8BA50 accelerometer's sampling rate. Signed-off-by: Tiberiu Breana <tiberiu.a.breana@intel.com> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
* iio: accel: STK8BA50: replace scale table with a structTiberiu Breana2015-06-141-4/+7
| | | | | | | | Replaced the stk8ba50_scale_table with an identically named struct in order to make the code a bit more readable. Signed-off-by: Tiberiu Breana <tiberiu.a.breana@intel.com> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
* iio: inv-mpu: Export scale_available attributesAdriana Reus2015-06-131-0/+6
| | | | | | | | Export the available scales for accel and gyro in order to hint the user-space as to what are the available valid values. Signed-off-by: Adriana Reus <adriana.reus@intel.com> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
* iio: Documentation: Add additional *scale_available attributesAdriana Reus2015-06-131-0/+5
| | | | | | | | Added some more *scale_available attributes to the list that are used in various drivers but were missiong from Documentation. Signed-off-by: Adriana Reus <adriana.reus@intel.com> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
* tools:iio: rename variablesHartmut Knaack2015-06-132-19/+19
| | | | | | | | | Use more appropriate/common variable names: * namepf instead of nameFile in iio_utils.c * ret instead of retval in lsiio.c Signed-off-by: Hartmut Knaack <knaack.h@gmx.de> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
* tools:iio: adjust coding styleHartmut Knaack2015-06-135-82/+118
| | | | | | | | | | | | | | | | Fix various coding style issues, including: * have spaces around operators * indentation * consolidate parameters in same line * required braces * adjust/drop comments * multiline comment style * delete unnecessary empty lines * add empty lines to visualize logial code blocks * typos Signed-off-by: Hartmut Knaack <knaack.h@gmx.de> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
* staging:lustre: Update license and copyright for the LNET headersJames Simmons2015-06-118-55/+28
| | | | | | | Point to the right place for GNU license. Update Intel copyright. Signed-off-by: James Simmons <jsimmons@infradead.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging:lustre: LNet header code cleanup - indentation etcJames Simmons2015-06-116-538/+595
| | | | | | | | | Handle all the style issues reported by checkpatch.pl. Remove general white spaces, spaces in function calls, alignments etc. Signed-off-by: James Simmons <jsimmons@infradead.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging:lustre: fix camel case for LNetInit and LNetFiniJames Simmons2015-06-115-15/+15
| | | | | | | | For the functions LNetInit and LNetFini move away from camel case to lnet_init and lnet_fini. Signed-off-by: James Simmons <jsimmons@infradead.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging:lustre: separate kernel and user land defines in the LNet headersJames Simmons2015-06-117-179/+180
| | | | | | | | | | Currently the lnet headers used by user land contain various internal LNet structures that are only used by kernel space. Move the user land structures to headers used by user land. The kernel structures are relocated to headers that are never exposed to user land. Signed-off-by: James Simmons <jsimmons@infradead.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging:lustre: move LNet NID macros to LNet layerJames Simmons2015-06-117-61/+114
| | | | | | | | | | | | Currently several special macros LNet NID macros exist in libcfs.h and libcfs_private.h. Move those macros out to the lnet header types.h. The new lnet header nidstr.h contains LNet NID string data that can be used by user land LNet utilities and the LNet kernel drivers. Signed-off-by: James Simmons <jsimmons@infradead.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging:lustre: merge socklnd_lib-linux.h into socklnd.hJohn L. Hammond2015-06-113-89/+40
| | | | | | | | | | | | | | | | | | Originally socklnd_lib-linux.h contained linux specific wrappers and defines but since the linux kernel is the only supported platform now we can merge what little remains in the header into socklnd.h. This is broken out of the original patch 12932 that was merged to the Intel/OpenSFS branch. Signed-off-by: John L. Hammond <john.hammond@intel.com> Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-2675 Reviewed-on: http://review.whamcloud.com/12932 Reviewed-by: Isaac Huang <he.huang@intel.com> Reviewed-by: James Simmons <uja.ornl@gmail.com> Reviewed-by: Oleg Drokin <oleg.drokin@intel.com> Signed-off-by: James Simmons <jsimmons@infradead.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging:lustre: rename socklnd_lib-linux.cJohn L. Hammond2015-06-112-1/+1
| | | | | | | | | | | | | | | | With the move to support only the linux kernel their is no need to keep "linux" in the socklnd source file names. This is broken out of the original patch 12932 that was merged to the Intel/OpenSFS branch. Signed-off-by: John L. Hammond <john.hammond@intel.com> Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-2675 Reviewed-on: http://review.whamcloud.com/12932 Reviewed-by: Isaac Huang <he.huang@intel.com> Reviewed-by: James Simmons <uja.ornl@gmail.com> Reviewed-by: Oleg Drokin <oleg.drokin@intel.com> Signed-off-by: James Simmons <jsimmons@infradead.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>