summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* iio: accel: bma180: use iio helper function to guarantee direct modeAlison Schofield2016-08-151-4/+5
| | | | | | | | | Replace the code that guarantees the device stays in direct mode with iio_device_claim_direct_mode() which does same. Signed-off-by: Alison Schofield <amsfield22@gmail.com> Cc: Daniel Baluta <daniel.baluta@gmail.com> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
* iio: humidity: hdc100x: add HDC1000 and HDC1008 to KconfigAlison Schofield2016-08-151-4/+4
| | | | | | | | | | hdc100x supports Texas Instruments HDC1000 and HDC1008 relative humidity and temperature sensors. Add these product names to Kconfig. Signed-off-by: Alison Schofield <amsfield22@gmail.com> Cc: Daniel Baluta <daniel.baluta@gmail.com> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
* iio: light: us5182d: Add missing error code assignment before testChristophe JAILLET2016-08-151-1/+1
| | | | | | | | | | It is likely that checking the result of 'pm_runtime_set_active' is expected here. Fixes: f0e5f57d3ac2 ("iio: light: us8152d: Add power management support") Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
* iio: magn: add a driver for AK8974Linus Walleij2016-08-154-1/+886
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This adds a driver for the Asahi Kasei AK8974 and its sibling AMI305 magnetometers. It was deployed on scale in 2009 on a multitude of devices. It is distincly different from AK8973 and AK8975 and needs its own driver. This patch is based on the long lost work of Samu Onkalo at Nokia, who made a misc character device driver for the Maemo/MeeGo Nokia devices, before the time of the IIO subsystem. It was mounted in e.g. the Nokia N950, N8, N86, N97 etc. It is also mounted on the ST-Ericsson HREF reference designs. It works nicely in sysfs: $ cat in_magn_x_raw && cat in_magn_y_raw && cat in_magn_z_raw -55 -101 161 And with buffered reads using a simple HRTimer trigger: $ generic_buffer -c10 -a -n ak8974 -t foo iio device number being used is 3 iio trigger number being used is 2 No channels are enabled, enabling all channels Enabling: in_magn_x_en Enabling: in_magn_y_en Enabling: in_magn_z_en Enabling: in_timestamp_en /sys/bus/iio/devices/iio:device3 foo -58.000000 -102.000000 157.000000 946684970985321044 -60.000000 -98.000000 159.000000 946684971012237548 -60.000000 -106.000000 163.000000 946684971032257080 -62.000000 -94.000000 169.000000 946684971052185058 -58.000000 -98.000000 163.000000 946684971072204589 -54.000000 -100.000000 163.000000 946684971092224121 -53.000000 -103.000000 164.000000 946684971112731933 -50.000000 -102.000000 165.000000 946684971132232666 -61.000000 -101.000000 164.000000 946684971152191162 -57.000000 -99.000000 168.000000 946684971172210693 Disabling: in_magn_x_en Disabling: in_magn_y_en Disabling: in_magn_z_en Disabling: in_timestamp_en I cannot currently scale these raw values to gauss. This is because of lack of documentation. I have sent a request for a datasheet to Asahi Kasei. The driver can optionally use a DRDY line IRQ to capture data, else it will sleep and poll. Cc: Samu Onkalo <samu.onkalo@intel.com> Cc: Sebastian Reichel <sre@kernel.org> Cc: Peter Meerwald-Stadler <pmeerw@pmeerw.net> Tested-By: Sebastian Reichel <sre@kernel.org> Signed-off-by: Linus Walleij <linus.walleij@linaro.org> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
* iio: magn: DT bindings for AK8974Linus Walleij2016-08-151-0/+29
| | | | | | | | | | | | | This adds device tree bindings for the AK8974 magnetometer, similar to those for the AK8975. Cc: devicetree@vger.kernel.org Cc: Samu Onkalo <samu.onkalo@intel.com> Cc: Sebastian Reichel <sre@kernel.org> Cc: Peter Meerwald-Stadler <pmeerw@pmeerw.net> Acked-by: Rob Herring <robh@kernel.org> Signed-off-by: Linus Walleij <linus.walleij@linaro.org> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
* iio: Add IIO support for the Measurement Computing CIO-DAC familyWilliam Breathitt Gray2016-07-244-0/+160
| | | | | | | | | | | | | | | | | The Measurement Computing CIO-DAC is a family of 16-bit and 12-bit analog output devices. The analog outputs are from AD660BN/AD7237 converters with each output buffered by an OP-27. Voltage ranges are configured via physical jumpers on the device. This driver does not support the devices' simulataneous update mode; the XFER jumper option should be deselected for all analog output channels. This driver provides IIO support for the Measurement Computing CIO-DAC family: CIO-DAC16, CIO-DAC08, and PC104-DAC06. The base port addresses for the devices may be configured via the base array module parameter. Signed-off-by: William Breathitt Gray <vilhelm.gray@gmail.com> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
* iio: adc: ad7298: use iio helper function to guarantee direct modeAlison Schofield2016-07-241-10/+10
| | | | | | | | | Replace the code that guarantees the device stays in direct mode with iio_device_claim_direct_mode() which does same. Signed-off-by: Alison Schofield <amsfield22@gmail.com> Cc: Daniel Baluta <daniel.baluta@gmail.com> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
* iio: adc: ad7793: use iio helper function to guarantee direct modeAlison Schofield2016-07-241-6/+4
| | | | | | | | | Replace the code that guarantees the device stays in direct mode with iio_device_claim_direct_mode() which does same. Signed-off-by: Alison Schofield <amsfield22@gmail.com> Cc: Daniel Baluta <daniel.baluta@gmail.com> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
* iio: accel: kxcjk-1013: add the "KIOX000A" ACPI idChristophe Chapuis2016-07-241-0/+1
| | | | | | | | | | On the Cube i9 tablet, the ACPI id for the Kionix kxcj9 accelerometer is "KIOX000A" (as can be seen in the DSDT of the Cube i9 tablet). It is the same accelerometer, so only adding the ACPI id is needed. Signed-off-by: Christophe Chapuis <chris.chapuis@gmail.com> Reviewed-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
* staging: iio: light: isl29018/28: remove I2C_CLASS_HWMON .class settingAlison Schofield2016-07-242-2/+0
| | | | | | | | | | | | I2C_CLASS_HWMON is for a hardware monitoring chip wanting auto-detection. IIO drivers don't typically use .class. Remove it. Signed-off-by: Alison Schofield <amsfield22@gmail.com> Cc: Daniel Baluta <daniel.baluta@gmail.com> Acked-by: Laxman Dewangan <ldewangan@nvidia.com> Acked-by: Wolfram Sang <wsa@the-dreams.de> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
* staging: iio: isl29028: Prefix functionsPeter Meerwald-Stadler2016-07-101-2/+2
| | | | | Signed-off-by: Peter Meerwald-Stadler <pmeerw@pmeerw.net> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
* staging: iio: isl29028: Expose scale and sample frequency available without ↵Peter Meerwald-Stadler2016-07-101-2/+2
| | | | | | | comma Signed-off-by: Peter Meerwald-Stadler <pmeerw@pmeerw.net> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
* staging: iio: isl29028: Prefix stuffPeter Meerwald-Stadler2016-07-101-16/+16
| | | | | Signed-off-by: Peter Meerwald-Stadler <pmeerw@pmeerw.net> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
* staging: iio: isl29028: Prefix #definesPeter Meerwald-Stadler2016-07-101-31/+31
| | | | | | | and drop unused PROX_DRIVE Signed-off-by: Peter Meerwald-Stadler <pmeerw@pmeerw.net> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
* staging: iio: isl29018: Prefix remaining functionsPeter Meerwald-Stadler2016-07-101-17/+17
| | | | | Signed-off-by: Peter Meerwald-Stadler <pmeerw@pmeerw.net> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
* staging: iio: isl29018: Cleanup of commentsPeter Meerwald-Stadler2016-07-101-13/+6
| | | | | Signed-off-by: Peter Meerwald-Stadler <pmeerw@pmeerw.net> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
* staging: iio: isl29018: Drop newlinesPeter Meerwald-Stadler2016-07-101-3/+0
| | | | | Signed-off-by: Peter Meerwald-Stadler <pmeerw@pmeerw.net> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
* staging: iio: isl29018: Remove excessive output messagesPeter Meerwald-Stadler2016-07-101-13/+3
| | | | | Signed-off-by: Peter Meerwald-Stadler <pmeerw@pmeerw.net> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
* staging: iio: isl29018: Prefix #definesPeter Meerwald-Stadler2016-07-101-29/+32
| | | | | Signed-off-by: Peter Meerwald-Stadler <pmeerw@pmeerw.net> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
* iio: light: vcnl4000: Add missing lockingPeter Meerwald-Stadler2016-07-101-4/+14
| | | | | Signed-off-by: Peter Meerwald-Stadler <pmeerw@pmeerw.net> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
* iio: light: vcnl4000: Cleanup read_raw() returnsPeter Meerwald-Stadler2016-07-101-16/+11
| | | | | Signed-off-by: Peter Meerwald-Stadler <pmeerw@pmeerw.net> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
* iio: light: vcnl4000: Use BIT() macroPeter Meerwald-Stadler2016-07-101-4/+4
| | | | | Signed-off-by: Peter Meerwald-Stadler <pmeerw@pmeerw.net> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
* iio: light: vcnl4000: Mention and check support for VCNL4010 and VCNL4020Peter Meerwald-Stadler2016-07-102-8/+17
| | | | | | | | | | | VCNL4000, VCNL4010 and VCNL4020 chips are fairly compatible from a software point of view, added features are not yet supported by the driver patch adds a check for the product ID and demotes the corresponding dev_info() to dev_dbg() Signed-off-by: Peter Meerwald-Stadler <pmeerw@pmeerw.net> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
* iio: temperature: add support for Maxim thermocouple chipsMatt Ranostay2016-07-104-0/+317
| | | | | | | | | Add initial driver support for MAX6675, and MAX31855 thermocouple chips. Cc: Marek Vasut <marex@denx.de> Cc: Matt Porter <mporter@konsulko.com> Signed-off-by: Matt Ranostay <mranostay@gmail.com> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
* drivers:iio:accel:mma8452: removed unwanted return statementsBijosh Thykkoottathil2016-07-051-5/+1
| | | | | | | | | Removed unwanted return statements from the function mma8452_set_freefall_mode. Signed-off-by: Bijosh Thykkoottathil <bijosh.t@hotmail.com> Acked-by: Martin Kepplinger <martink@posteo.de> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
* drivers:iio:accel:mma8452: added cleanup provision in case of failure.Bijosh Thykkoottathil2016-07-051-2/+2
| | | | | | | | | | | mma8452_set_freefall_mode can return -ve value in case if i2c_smbus_read_byte_data fails. This function is called from mma8452_probe, and returning -ve value from probe indicates probe failure. Need to call iio_triggered_buffer_cleanup & iio_trigger_cleanup in this case. Signed-off-by: Bijosh Thykkoottathil <bijosh.t@hotmail.com> Acked-by: Martin Kepplinger <martink@posteo.de> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
* iio: Add iio.git tree to MAINTAINERSJonathan Cameron2016-07-041-0/+1
| | | | | | | | | | | The tree has been in the same location for a long time. Putting it in MAINTAINERS makes it easy for those new to, or less familiar with IIO to find the correct tree to base patches on. Mostly basing on staging-next is fine as well unless working on a very active driver. Signed-off-by: Jonathan Cameron <jic23@kernel.org>
* iio:st_pressure: clean useless static channel initializersGregor Boirie2016-07-041-10/+0
| | | | | | | | | Some static channels are explicitly initialized with default values. Remove them to enhance readability. Signed-off-by: Gregor Boirie <gregor.boirie@parrot.com> Tested-by: Linus Walleij <linus.walleij@linaro.org> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
* iio:st_pressure:lps22hb: temperature supportGregor Boirie2016-07-041-3/+23
| | | | | | | | Implement lps22hb temperature sampling channel. Signed-off-by: Gregor Boirie <gregor.boirie@parrot.com> Tested-by: Linus Walleij <linus.walleij@linaro.org> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
* iio:st_pressure:lps22hb: open drain supportGregor Boirie2016-07-041-0/+5
| | | | | | | Add support for open drain interrupt line. Signed-off-by: Gregor Boirie <gregor.boirie@parrot.com> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
* iio:st_pressure: temperature triggered bufferingGregor Boirie2016-07-041-9/+13
| | | | | | | | Enable support for triggered buffering of temperature samples. Signed-off-by: Gregor Boirie <gregor.boirie@parrot.com> Tested-by: Linus Walleij <linus.walleij@linaro.org> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
* iio:st_pressure: document sampling gainsGregor Boirie2016-07-041-4/+88
| | | | | | | | | Details scaling factors and offsets applied to raw temperature and pressure samples. Signed-off-by: Gregor Boirie <gregor.boirie@parrot.com> Tested-by: Linus Walleij <linus.walleij@linaro.org> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
* iio:st_pressure: align storagebits on power of 2Gregor Boirie2016-07-041-2/+2
| | | | | | | | | Sampled pressure data are 24 bits long and should be stored in a 32 bits word. Signed-off-by: Gregor Boirie <gregor.boirie@parrot.com> Tested-by: Linus Walleij <linus.walleij@linaro.org> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
* iio:st_sensors: align on storagebits boundariesGregor Boirie2016-07-042-20/+19
| | | | | | | | | Ensure triggered buffering memory accesses are properly aligned on per channel storagebits boundaries. Signed-off-by: Gregor Boirie <gregor.boirie@parrot.com> Tested-by: Linus Walleij <linus.walleij@linaro.org> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
* staging:iio:lis3l02dq drop separate driverJonathan Cameron2016-07-045-1477/+0
| | | | | | | | | | | | | | | | Retire this venerable driver as the basic support is now in the generic st-sensors accelerometer driver. There are a few missing features in the new driver: * Threshold events. * Access to the calibration adjustment registers (patch shortly) In exchange it brings a cleaner and more maintainable code base that actually gets tested more than once every few years. I'll actually be suprised if anyone other than me has a board with one of these on that is running an up to date kernel. Signed-off-by: Jonathan Cameron <jic23@kernel.org>
* iio: accel: st_accel: Add lis3l02dq supportJonathan Cameron2016-07-045-11/+86
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Time to finally kill off the venerable (it was one of my first drivers) lis3l02dq driver in favour of adding support in the st sensors framework. This does loose us the event support that driver always had, but I think that will reappear at some point and in the meantime the maintenance advantages of dropping the 'special' driver for this one part outweigh the issues. It's worth noting this part is ancient and I may well be the only person who still has any on hardware running recent kernels. It has a few 'quirks'. - No WAI register so that just became optional. - A BDU option that really does block updates. Completely. Whatever you do, you don't get any more data with it set. It is documented the same as more modern parts but I presume they are actually clearing for updates after a read of both bytes! - Fixed scale. - It's too quick. Even at slowest rate (280Hz) I can't read out fast enough on my board (stargate 2) to beat new data coming in. Linus' repeat read patch doesn't help in this case. It just means I get 10 readings before dying... So in reality this will get used with software triggers only unless someone has this long out of production device on a quick board. Signed-off-by: Jonathan Cameron <jic23@kernel.org> Reviewed-by: Linus Walleij <linus.walleij@linaro.org> Cc: Denis CIOCCA <denis.ciocca@st.com> Cc: Crestez Dan Leonard <leonard.crestez@intel.com> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
* iio: adc: add missing of_node references to iio_devMatt Ranostay2016-07-0320-0/+20
| | | | | | | | Adding missing indio_dev->dev.of_node references to allow iio consumers to access the device channels. Signed-off-by: Matt Ranostay <mranostay@gmail.com> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
* iio: adc: ti-ads1015: add indio_dev->dev.of_node referenceMatt Ranostay2016-07-031-0/+1
| | | | | | | | | Add the pointer to the device tree node of the ADC so that iio consumers can reference the respective channels. Signed-off-by: Matt Ranostay <mranostay@gmail.com> Acked-by: Daniel Baluta <daniel.baluta@intel.com> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
* iio: potentiometer: Fix typo in KconfigFlorian Vaussard2016-07-031-3/+3
| | | | | | | | Fix s/potentiomenter/potentiometer/. Suggested-by: Peter Meerwald-Stadler <pmeerw@pmeerw.net> Signed-off-by: Florian Vaussard <florian.vaussard@heig-vd.ch> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
* iio: potentiometer: mcp4531: Add device tree bindingFlorian Vaussard2016-07-031-1/+86
| | | | | | | | | This patch adds the necessary device tree binding to allow DT probing of currently supported parts. Signed-off-by: Florian Vaussard <florian.vaussard@heig-vd.ch> Acked-by: Peter Rosin <peda@axentia.se> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
* iio: potentiometer: mcp4531: Add device tree binding documentationFlorian Vaussard2016-07-031-0/+64
| | | | | | | | | | Add the device tree documentation for all the supported parts. Apart the compatible string and standard I2C binding, no other binding is currently needed. Signed-off-by: Florian Vaussard <florian.vaussard@heig-vd.ch> Acked-by: Rob Herring <robh@kernel.org> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
* iio: potentiometer: mcp4531: Add support for MCP454x, MCP456x, MCP464x and ↵Florian Vaussard2016-07-032-2/+76
| | | | | | | | | | | | | | MCP466x This patch adds support for MCP454x, MCP456x, MCP464x and MCP466x parts. The main difference with currently supported parts (MCP453x and alike) is the addition of a non-volatile memory in order to recall the wiper setting at power-on. This feature is currently not supported and only the volatile memory is used to set the wiper. Signed-off-by: Florian Vaussard <florian.vaussard@heig-vd.ch> Acked-by: Peter Rosin <peda@axentia.se> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
* iio:imu:mpu6050: icm20608 initial supportGregor Boirie2016-07-035-4/+14
| | | | | | | | | Introduce support for Invense ICM20608 IMU, a 6-axis motion tracking device that combines a 3-axis gyroscope and a 3-axis accelerometer: http://www.invensense.com/products/motion-tracking/6-axis/icm-20608-2 Signed-off-by: Gregor Boirie <gregor.boirie@parrot.com> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
* iio: adc: max1363: Add device tree bindingFlorian Vaussard2016-07-031-1/+60
| | | | | | | | This patch adds the necessary device tree binding to allow DT probing of currently supported parts. Signed-off-by: Florian Vaussard <florian.vaussard@heig-vd.ch> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
* iio: adc: max1363: Add device tree binding documentationFlorian Vaussard2016-07-031-0/+63
| | | | | | | | | | | | Add the device tree documentation for all the supported parts. Mandatory binding is the compatible string and the slave I2C address. Optional properties can be used to specify the Vcc / Vref regulators, as well as the IRQ line if available. Acked-by: Rob Herring <robh@kernel.org> Signed-off-by: Florian Vaussard <florian.vaussard@heig-vd.ch> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
* iio: bmg160: add callbacks for the filter frequencySteffen Trumtrar2016-07-031-12/+96
| | | | | | | | | | | | | The filter frequency and sample rate have a fixed relationship. Only the filter frequency is unique, however. Currently the driver ignores the filter settings for 32 Hz and 64 Hz. This patch adds the necessary callbacks to be able to configure and read the filter setting from sysfs. Signed-off-by: Steffen Trumtrar <s.trumtrar@pengutronix.de> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
* iio: Add driver for Broadcom iproc-static-adcRaveendra Padasalagi2016-07-033-0/+657
| | | | | | | | | | This patch adds basic driver implementation for Broadcom's static adc controller used in iProc SoC's family. Signed-off-by: Raveendra Padasalagi <raveendra.padasalagi@broadcom.com> Reviewed-by: Ray Jui <ray.jui@broadcom.com> Reviewed-by: Scott Branden <scott.branden@broadcom.com> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
* Documentation: DT: Add iproc-static-adc bindingRaveendra Padasalagi2016-07-031-0/+41
| | | | | | | | | | | The patch adds devicetree binding document for broadcom's iproc-static-adc controller driver. Signed-off-by: Raveendra Padasalagi <raveendra.padasalagi@broadcom.com> Reviewed-by: Ray Jui <ray.jui@broadcom.com> Reviewed-by: Scott Branden <scott.branden@broadcom.com> Acked-by: Rob Herring <robh@kernel.org> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
* iio: pressure: bmp280: read calibration data onceLinus Walleij2016-07-031-46/+48
| | | | | | | | | | | The calibration data is described as coming from an E2PROM and that means it does not change. Just read it once at probe time and store it in the device state container. Also toss the calibration data into the entropy pool since it is device unique. Reviewed-by: Vlad Dogaru <vlad.dogaru@intel.com> Signed-off-by: Linus Walleij <linus.walleij@linaro.org> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
* iio: pressure: bmp280: add power managementLinus Walleij2016-07-034-1/+69
| | | | | | | | | | | | | The PM280 has an internal standby-mode, but to really save power we should shut the sensor down and disconnect the power. With the proper .pm hooks we can enable both runtime and system power management of the sensor. We use the *force callbacks from the system PM hooks. When the sensor comes back we always reconfigure it to make sure it is ready to roll as expected. Cc: Ulf Hansson <ulf.hansson@linaro.org> Signed-off-by: Linus Walleij <linus.walleij@linaro.org> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
OpenPOWER on IntegriCloud