summaryrefslogtreecommitdiffstats
path: root/drivers/iio
Commit message (Collapse)AuthorAgeFilesLines
* Merge tag 'staging-3.16-rc1' of ↵Linus Torvalds2014-06-0351-240/+3249
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging into next Pull staging driver updates from Greg KH: "Here is the big staging driver pull request for 3.16-rc1. Lots of stuff here, tons of cleanup patches, a few new drivers, and some removed as well, but I think we are still adding a few thousand more lines than we remove, due to the new drivers being bigger than the ones deleted. One notible bit of work did stand out, Jes Sorensen has gone on a tear, fixing up a wireless driver to be "more sane" than it originally was from the vendor, with over 500 patches merged here. Good stuff, and a number of users laptops are better off for it. All of this has been in linux-next for a while" * tag 'staging-3.16-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging: (1703 commits) staging: skein: fix sparse warning for static declarations staging/mt29f_spinand: coding style fixes staging: silicom: fix sparse warning for static variable staging: lustre: Fix coding style staging: android: binder.c: Use more appropriate functions for euid retrieval staging: lustre: fix integer as NULL pointer warnings Revert "staging: dgap: remove unneeded kfree() in dgap_tty_register_ports()" Staging: rtl8192u: r8192U_wx.c Fixed a misplaced brace staging: ion: shrink highmem pages on kswapd staging: ion: use compound pages on high order pages for system heap staging: ion: remove struct ion_page_pool_item staging: ion: simplify ion_page_pool_total() staging: ion: tidy up a bit staging: rtl8723au: Remove redundant casting in usb_ops_linux.c staging: rtl8723au: Remove redundant casting in rtl8723a_hal_init.c staging: rtl8723au: Remove redundant casting in rtw_xmit.c staging: rtl8723au: Remove redundant casting in rtw_wlan_util.c staging: rtl8723au: Remove redundant casting in rtw_sta_mgt.c staging: rtl8723au: Remove redundant casting in rtw_recv.c staging: rtl8723au: Remove redundant casting in rtw_mlme.c ...
| * Merge tag 'iio-for-3.16c' of ↵Greg Kroah-Hartman2014-05-254-11/+26
| |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/jic23/iio into staging-next Jonathan writes: Third round of new stuff for IIO in the 3.16 cycle. This (rather late) set consists only of fixes to patches earlier in the cycle or minor fixes for other problems (such as randconfig build issues picked up by Arnd). I've included the general minor fixes here as it is very late in the current cycle and they can all wait for the merge window. * Recent change to hid-sensors introduced a possible infinite loop due to a typo. In the same series, a report interval unit read was added but in the case where the hardware doesn't support it a value of 0 would lead to some nasty issues. The patch sets it to the specified default of msecs. * Anon inodes were used by IIO without being explicitly selected. This has been true for a long time so it clearly only effects rather unusual configurations (rand configs) * at91 requires the input subsytem but this wasn't explicity in the Kconfig. * A couple of parts supported by the max1363 driver were using the wrong iio_chan_spec arrays and hence would missreport their bit depths. This has been there a long time and was never right so isn't a regression.
| | * iio:adc:max1363 incorrect resolutions for max11604, max11605, max11610 and ↵Jonathan Cameron2014-05-251-8/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | max11611. Cc: Stable@vger.kernel.org> Reported-by: Erik Habbinga <Erik.Habbinga@schneider-electric.com> Signed-off-by: Jonathan Cameron <jic23@kernel.org> Acked-by: Hartmut Knaack <knaack.h@gmx.de>
| | * iio: hid-sensors: Set default unit of measure for report intervalArchana Patni2014-05-101-2/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | For PROP_REPORT_INTERVAL, the spec does not mandate the presence of the report interval unit in the feature report and expects the default unit of measure to be used as milliseconds. Currently, when the unit is not present, it gets set as zero leading to issues in sampling frequency. This patch sets the unit of measure to the default unit if it is not defined by firmware. Signed-off-by: Archana Patni <archana.patni@intel.com> Signed-off-by: Subramony Sesha <subramony.sesha@intel.com> Reviewed-by: Srinivas Pandruvada <srinivas.pandruvada@intel.com> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
| | * iio:adc: at91 requires the input subsystemArnd Bergmann2014-05-101-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Building the at91 adc driver with CONFIG_INPUT disabled results in this build error: ERROR: "input_event" [drivers/iio/adc/at91_adc.ko] undefined! ERROR: "input_unregister_device" [drivers/iio/adc/at91_adc.ko] undefined! ERROR: "input_free_device" [drivers/iio/adc/at91_adc.ko] undefined! ERROR: "input_register_device" [drivers/iio/adc/at91_adc.ko] undefined! ERROR: "input_set_abs_params" [drivers/iio/adc/at91_adc.ko] undefined! ERROR: "input_allocate_device" [drivers/iio/adc/at91_adc.ko] undefined! To make sure we can build random configurations, this adds a Kconfig dependency on CONFIG_INPUT, as we do for other similar drivers. Signed-off-by: Arnd Bergmann <arnd@arndb.de> Cc: linux-iio@vger.kernel.org Cc: Josh Wu <josh.wu@atmel.com> Cc: Maxime Ripard <maxime.ripard@free-electrons.com> Acked-by: Nicolas Ferre <nicolas.ferre@atmel.com> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
| | * iio: always select ANON_INODESArnd Bergmann2014-05-101-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Without ANON_INODES, we get this build error: drivers/built-in.o: In function `iio_event_getfd': :(.text+0x14bf18): undefined reference to `anon_inode_getfd' All other users explicitly select this symbol, so we should do the same thing here. Signed-off-by: Arnd Bergmann <arnd@arndb.de> Cc: Jonathan Cameron <jic23@kernel.org> Cc: linux-iio@vger.kernel.org Signed-off-by: Jonathan Cameron <jic23@kernel.org>
| | * iio: hid-sensors: typo leads to potential forever loopDan Carpenter2014-05-101-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | The "i < " was missing in this condition. Fixes: 5d02edfc3957 ('iio: hid-sensors: Convert units and exponent') Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
| * | Merge 3.15-rc6 into staging-next.Greg Kroah-Hartman2014-05-223-7/+10
| |\ \ | | |/ | |/| | | | | | | | | | | | | | | | This resolves the conflicts in the files: drivers/iio/adc/Kconfig drivers/staging/rtl8723au/os_dep/usb_ops_linux.c Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
| * | iio: hid-sensors: Pressure: Raw read supportSrinivas Pandruvada2014-05-051-2/+15
| | | | | | | | | | | | | | | | | | | | | | | | Added support for raw reading of channel. If the sensor is powered off, it will turn on for reading value. Signed-off-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
| * | iio: hid-sensors: Inclinometer 3D: Raw read supportSrinivas Pandruvada2014-05-051-0/+13
| | | | | | | | | | | | | | | | | | | | | | | | Added support for raw reading of channel. If the sensor is powered off, it will turn on for reading value. Signed-off-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
| * | iio: hid-sensors: Compass 3D: Raw read supportSrinivas Pandruvada2014-05-051-0/+16
| | | | | | | | | | | | | | | | | | | | | | | | Added support for raw reading of channel. If the sensor is powered off, it will turn on for reading value Signed-off-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
| * | iio: hid-sensors: Proximity: Raw read supportSrinivas Pandruvada2014-05-051-2/+16
| | | | | | | | | | | | | | | | | | | | | | | | Added support for raw reading of channel. If the sensor is powered off, it will turn on for reading value. Signed-off-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
| * | iio: hid-sensors: ALS: Raw read supportSrinivas Pandruvada2014-05-051-5/+19
| | | | | | | | | | | | | | | | | | | | | | | | Added support for raw reading of channel. If the sensor is powered off, it will turn on for reading value. Signed-off-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
| * | iio: hid-sensors: Gyro 3D: Raw read supportSrinivas Pandruvada2014-05-051-3/+18
| | | | | | | | | | | | | | | | | | | | | | | | Added support for raw reading of channel. If the sensor is powered off, it will turn on for reading value. Signed-off-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
| * | iio: hid-sensors: Accelerometer 3D: Raw read supportSrinivas Pandruvada2014-05-051-3/+18
| | | | | | | | | | | | | | | | | | | | | | | | Added support for raw reading of channel. If the sensor is powered off, it will turn on for reading value. Signed-off-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
| * | iio: hid-sensors: Add API to power on/offSrinivas Pandruvada2014-05-0510-37/+38
| | | | | | | | | | | | | | | | | | | | | | | | | | | Added an API to allow client drivers to turn ON and OFF sensors for quick read. Added data_read as counting varaible instead of boolean, so that sensor is powered off only when last user released it. Signed-off-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
| * | iio: hid-sensors: Pressure: adjust scale and offsetSrinivas Pandruvada2014-05-051-4/+13
| | | | | | | | | | | | | | | | | | | | | | | | Using units and unit exponent to calculate scale which is compliant to IIO ABI. Signed-off-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
| * | iio: hid-sensors: Inclinometer 3D: adjust scale and offsetSrinivas Pandruvada2014-05-051-4/+13
| | | | | | | | | | | | | | | | | | | | | | | | Using units and unit exponent to calculate scale which is compliant to IIO ABI. Signed-off-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
| * | iio: hid-sensors: Compass 3D: adjust scale and offsetSrinivas Pandruvada2014-05-051-4/+13
| | | | | | | | | | | | | | | | | | | | | | | | Using units and unit exponent to calculate scale which is compliant to IIO ABI. Signed-off-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
| * | iio: hid-sensors: ALS: adjust scale and offsetSrinivas Pandruvada2014-05-051-4/+13
| | | | | | | | | | | | | | | | | | | | | | | | Using units and unit exponent to calculate scale which is compliant to IIO ABI. Signed-off-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
| * | iio: hid-sensors: Gyro 3D : adjust scale and offsetSrinivas Pandruvada2014-05-051-4/+13
| | | | | | | | | | | | | | | | | | | | | | | | Using units and unit exponent to calculate scale which is compliant to IIO ABI. Signed-off-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
| * | iio: hid-sensors: Accelerometer 3D: adjust scale and offsetSrinivas Pandruvada2014-05-051-4/+13
| | | | | | | | | | | | | | | | | | | | | | | | Using units and unit exponent to calculate scale which is compliant to IIO ABI. Signed-off-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
| * | iio: hid-sensors: Add api to get poll valueSrinivas Pandruvada2014-05-051-0/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | Added interface to get poll value in milli-seconds. This value is changed by changing sampling frequency. This API allows clients to wait for at least some poll milli seconds before reading a new sample. Signed-off-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
| * | iio: hid-sensors: Convert units and exponentSrinivas Pandruvada2014-05-051-0/+114
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | HID sensor hub specify a default unit and alternative units. This along with unit exponent can be used adjust scale. This change change HID sensor data units to IIO defined units for each sensor type. So in this way user space can use a simply use: "(data + offset) * scale" to get final result. Signed-off-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
| * | iio: Add Freescale MMA8452Q 3-axis accelerometer driverPeter Meerwald2014-05-033-0/+452
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 3-axis accelerometer sensor (2/4/8 g) with 12-bit resolution and I2C interface many extra features are unsupported (freefall detection, orientation change, autosleep) datasheet is here: http://cache.freescale.com/files/sensors/doc/data_sheet/MMA8452Q.pdf v2: (thanks to Jonathan Cameron) * use ARRAY_SIZE() Signed-off-by: Peter Meerwald <pmeerw@pmeerw.net> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
| * | iio: ak8975: Fix issue with the nameSrinivas Pandruvada2014-05-031-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fixing issue caused by clash of two patches, one adding a name with the acpi enumeration patch. 54ab3e24 Beomho Seo 2014-04-02 @572 indio_dev->name = id->name; d913971e Srinivas Pandruvada 2014-03-19 574 indio_dev->name = name; The name added by commit 54ab3e24 is not required as this is already added by taking care of case where id is NULL. Signed-off-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com> Reported-by: kbuild test robot <fengguang.wu@intel.com> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
| * | iio: Fix spelling of illuminance in gp2ap020a00f driverPeter Meerwald2014-05-031-4/+4
| | | | | | | | | | | | | | | | | | Cc: Jacek Anaszewski <j.anaszewski@samsung.com> Signed-off-by: Peter Meerwald <pmeerw@pmeerw.net> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
| * | iio: Add Melexis mlx90614 contact-less infrared temperature sensor driverPeter Meerwald2014-05-033-0/+161
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | I2C-controlled sensor measures ambient and object temperatuer see http://www.melexis.com/Infrared-Thermometer-Sensors/Infrared-Thermometer-Sensors/MLX90614-615.aspx Signed-off-by: Peter Meerwald <pmeerw@pmeerw.net> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
| * | iio: Add TEMP_AMBIENT and TEMP_OBJECT channel modifiersPeter Meerwald2014-05-031-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | useful for contactless temperature sensors to distinguish between the ambient temperature and the temperature of the object Signed-off-by: Peter Meerwald <pmeerw@pmeerw.net> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
| * | iio: Add Freescale MPL115A2 pressure / temperature sensor driverPeter Meerwald2014-05-033-0/+222
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | I2C-controlled sensor with 10-bit pressure and temperature measurement datasheet: http://cache.freescale.com/files/sensors/doc/data_sheet/MPL3115A2.pdf v2: * use devm_iio_device_register() Signed-off-by: Peter Meerwald <pmeerw@pmeerw.net> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
| * | iio:magnetometer:mag3110: Enable user offset calibrationPeter Meerwald2014-05-031-2/+15
| | | | | | | | | | | | | | | | | | | | | add IIO_CHAN_INFO_CALIBBIAS Signed-off-by: Peter Meerwald <pmeerw@pmeerw.net> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
| * | iio:magnetometer:mag3110: Fix initialization of ctrl_reg1Peter Meerwald2014-05-031-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | DR bits need to be shifted; since MAG3110_CTRL_DR_DEFAULT is zero, the change has no effect Signed-off-by: Peter Meerwald <pmeerw@pmeerw.net> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
| * | staging: iio: ad799x: remove some unneeded IS_ERR() checksDan Carpenter2014-05-031-9/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | My static checker is upset that we check IS_ERR(t->reg) when we know it is not an ERR_PTR. Checking for IS_ERR() twice is often a sign of confusion and buggy code. In this case, if the call to "ret = regulator_enable(st->vref);" fails, then we call "regulator_disable(st->vref);" and that's a mistake because "st->vref" is not enabled. I fixed these problems and Hartmut Knaack pointed out a couple unneeded IS_ERR() checks in ad799x_remove() so I have removed those as well. Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Acked-by: Hartmut Knaack <knaack.h@gmx.de> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
| * | iio: exynos_adc: do a reinit_completion before the conversionNaveen Krishna Chatradhi2014-04-301-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | Add reinit_completion() before the wait_for_completion_timeout in raw_read() call. Signed-off-by: Naveen Krishna Chatradhi <ch.naveen@samsung.com> Reviewed-by: Doug Anderson <dianders@chromium.org> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
| * | iio: exynos_adc: do a soft reset in case of timeoutNaveen Krishna Chatradhi2014-04-301-24/+26
| | | | | | | | | | | | | | | | | | | | | | | | | | | Do a soft reset software if a timeout happens. This is applicable only for ADC_V2. Signed-off-by: Naveen Krishna Chatradhi <ch.naveen@samsung.com> Reviewed-by: Doug Anderson <dianders@chromium.org> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
| * | iio: exynos_adc: reduce timeout and use wait_for_completion_timeoutNaveen Krishna Chatradhi2014-04-301-7/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ADC module on Exynos5 SoCs runs at 600KSPS. At this conversion rate, waiting for 1000 msecs is wasteful (incase of h/w failure). Hence, reduce the time out to 100msecs and use wait_for_completion_timeout() instead of wait_for_completion_interruptible_timeout() Signed-off-by: Naveen Krishna Chatradhi <ch.naveen@samsung.com> Reviewed-by: Doug Anderson <dianders@chromium.org> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
| * | iio: exynos_adc: rearrange clk and regulator enable/disable callsNaveen Krishna Ch2014-04-301-29/+33
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch maintains the following order in probe(), remove(), resume() and suspend() calls regulator enable, clk prepare enable ... clk disable unprepare, regulator disable While at it, 1. enable the regulator before the iio_device_register() 2. handle the return values for enable/disable calls Signed-off-by: Naveen Krishna Ch <ch.naveen@samsung.com> Reviewed-by: Doug Anderson <dianders@chromium.org> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
| * | iio: hid-sensors: Added device rotation supportSrinivas Pandruvada2014-04-293-0/+361
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Added usage id processing for device rotation. This uses IIO interfaces for triggered buffer to present data to user mode.This uses HID sensor framework for registering callback events from the sensor hub. Data is exported to user space in the form of quaternion rotation format. Signed-off-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
| * | IIO: core: Add quaternion modifierSrinivas Pandruvada2014-04-291-0/+1
| | | | | | | | | | | | | | | | | | | | | Added quaternion in the list of supported modifiers. Signed-off-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
| * | IIO: core: Modify scan element typeSrinivas Pandruvada2014-04-291-6/+35
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The current scan element type uses the following format: [be|le]:[s|u]bits/storagebits[>>shift]. To specify multiple elements in this type, added a repeat value. So new format is: [be|le]:[s|u]bits/storagebitsXr[>>shift]. Here r is specifying how may times, real/storage bits are repeating. When X is value is 0 or 1, then repeat value is not used in the format, and it will be same as existing format. Signed-off-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
| * | IIO: core: Introduce read_raw_multiSrinivas Pandruvada2014-04-294-27/+62
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This callback is introduced to overcome some limitations of existing read_raw callback. The functionality of both existing read_raw and read_raw_multi is similar, both are used to request values from the device. The current read_raw callback allows only two return values. The new read_raw_multi allows returning multiple values. Instead of passing just address of val and val2, it passes length and pointer to values. Depending on the type and length of passed buffer, iio client drivers can return multiple values. Signed-off-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
| * | Merge 3.15-rc3 into staging-nextGreg Kroah-Hartman2014-04-274-10/+52
| |\ \
| * \ \ Merge tag 'iio-for-3.16a' of ↵Greg Kroah-Hartman2014-04-2623-58/+1480
| |\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/jic23/iio into staging-next Jonathan writes: First round of IIO new driver, functionality and cleanups for the 3.16 cycle. New device support * AS3935 Lightning Sensor * MCP3426/7/8 support added to the existing MCP3422 ADC driver * AK8963 support in the AK8975 driver * MPU6500 support in the MPU6050 driver (the functionality that is different is mostly not supported yet in either part). Staging Graduations * AD799x ADC New functionality * ACPI enumeration for the ak8975 driver Cleanup / tweaks * Use snprintf as a matter of good practice in a few additional places. * Document *_mean_raw attributes. These have been there a while, but were undocumented. * Add an in kernel interface to get the mean values. * Bug in the length of the event info mask that by coincidence wasn't yet actually causing any problems. * itg3000 drop an unreachable return statement. * spear_adc cleanups (heading for a staging graduation but a few more issues showed up in the review of these patches). * Exynos ADC dependencies changed so it is only built when Exynos is present or COMPILE_TEST and OF are set. * tsl2583 cleanups. * Some cut and paste typos in the comments of various drivers still in staging. * Couple of minor improvements to the ST sensor drivers.
| | * | | iio: st_sensors: move regulator retrieveal to coreLinus Walleij2014-04-265-37/+51
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently the pressure sensor has code to retrieve and enable two regulators for Vdd and Vdd IO, but actually these voltage inputs are found on all of these ST sensors, so move the regulator handling to the core and make sure all the ST sensors call these functions on probe() and remove() to enable/disable power. Here also mover over to obtaining the regulator from the *parent* device of the IIO device, as the IIO device is created on-the-fly in this very subsystem it very unlikely evert have any regulators attached to it whatsoever. It is much more likely that the parent is a platform device, possibly instantiated from a device tree, which in turn have Vdd and Vdd IO supplied assigned to it. Cc: Lee Jones <lee.jones@linaro.org> Cc: Denis CIOCCA <denis.ciocca@st.com> Signed-off-by: Linus Walleij <linus.walleij@linaro.org> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
| | * | | iio: st_sensors: announce registered sensorsLinus Walleij2014-04-264-0/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It is pretty helpful to know already from dmesg that a certain device is successfully registered, instead of having to browse sysfs to see if it's actually there. Cc: Lee Jones <lee.jones@linaro.org> Cc: Denis CIOCCA <denis.ciocca@st.com> Signed-off-by: Linus Walleij <linus.walleij@linaro.org> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
| | * | | staging: iio: Fix typo in iioMasanari Iida2014-04-231-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Correct spelling typo in comment within staging/iio Signed-off-by: Masanari Iida <standby24x7@gmail.com> Acked-by: Randy Dunlap <rdunlap@infradead.org> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
| | * | | iio: adc: Fix exynos_adc dependenciesJean Delvare2014-04-111-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | EXYNOS_ADC shouldn't only depend on OF. It is useless on architectures other than Exynos so it should depend on ARCH_EXYNOS (which implies OF.) Signed-off-by: Jean Delvare <jdelvare@suse.de> Cc: Jonathan Cameron <jic23@kernel.org> Cc: Kukjin Kim <kgene.kim@samsung.com> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
| | * | | iio: imu: inv_mpu6050: Add compatibity with MPU6500Srinivas Pandruvada2014-03-293-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Adding MPU6500 in target list for this driver. Description: Source Document: MPU-6500 Register Map and Descriptions Revision 2.1 Section 3: Register Map This section describes difference in terms device programmability between MPU6050 and MPU6500. These are different registers, which differs between MPU6050 and MPU6500. Addr Name --------------------- 1E LP_ACCEL_ODR 6C PWR_MGMT_2 77 XA_OFFSET_H 78 XA_OFFSET_L 7A YA_OFFSET_H 7B YA_OFFSET_L 7D ZA_OFFSET_H 7E ZA_OFFSET_L But the current MPU6050 driver doesn't use registers which are different except PWR_MGMT_2. The difference is support of "LP_WAKE_CTRL" at bit6-7 in MPU6050 mode. In MPU6500 they are not defined. In current mpu6050 driver, only values used for this register are for standby mode for gyro and accelerometer. In both case frequency of wakeups is set to default and not using bit 6-7. So this driver van as well support MPU6500. In addition MPU6500 can run MPU6050 mode by changing device trim settings. So changing config comments to allow MPU6500 to use this driver. When the driver is enhanced to support more functions, i2c driver data INV_MPU6500 or "WHO_AM_I" register can be used to add additional functionality. Signed-off-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
| | * | | iio: ak8975: Added ACPI enumerationSrinivas Pandruvada2014-03-291-3/+37
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Added capability so that this device can be enumerated via ACPI. Signed-off-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
| | * | | iio: ak8975 : Add AK8963 compatibility mode supportSrinivas Pandruvada2014-03-222-6/+31
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | AK8963 and AK8975 use same register definitions, except the range of X,Y,Z values. Added support of 8963 based on i2c_device_id. Unfortunately there is no way to detect the type via registers, both device registers return 0x48 as id of chipset. Signed-off-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
OpenPOWER on IntegriCloud