summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2016-07-24iio: Add IIO support for the Measurement Computing CIO-DAC familyWilliam Breathitt Gray
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>
2016-07-24iio: adc: ad7298: use iio helper function to guarantee direct modeAlison Schofield
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>
2016-07-24iio: adc: ad7793: use iio helper function to guarantee direct modeAlison Schofield
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>
2016-07-24iio: accel: kxcjk-1013: add the "KIOX000A" ACPI idChristophe Chapuis
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>
2016-07-24staging: iio: light: isl29018/28: remove I2C_CLASS_HWMON .class settingAlison Schofield
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>
2016-07-10staging: iio: isl29028: Prefix functionsPeter Meerwald-Stadler
Signed-off-by: Peter Meerwald-Stadler <pmeerw@pmeerw.net> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2016-07-10staging: iio: isl29028: Expose scale and sample frequency available without ↵Peter Meerwald-Stadler
comma Signed-off-by: Peter Meerwald-Stadler <pmeerw@pmeerw.net> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2016-07-10staging: iio: isl29028: Prefix stuffPeter Meerwald-Stadler
Signed-off-by: Peter Meerwald-Stadler <pmeerw@pmeerw.net> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2016-07-10staging: iio: isl29028: Prefix #definesPeter Meerwald-Stadler
and drop unused PROX_DRIVE Signed-off-by: Peter Meerwald-Stadler <pmeerw@pmeerw.net> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2016-07-10staging: iio: isl29018: Prefix remaining functionsPeter Meerwald-Stadler
Signed-off-by: Peter Meerwald-Stadler <pmeerw@pmeerw.net> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2016-07-10staging: iio: isl29018: Cleanup of commentsPeter Meerwald-Stadler
Signed-off-by: Peter Meerwald-Stadler <pmeerw@pmeerw.net> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2016-07-10staging: iio: isl29018: Drop newlinesPeter Meerwald-Stadler
Signed-off-by: Peter Meerwald-Stadler <pmeerw@pmeerw.net> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2016-07-10staging: iio: isl29018: Remove excessive output messagesPeter Meerwald-Stadler
Signed-off-by: Peter Meerwald-Stadler <pmeerw@pmeerw.net> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2016-07-10staging: iio: isl29018: Prefix #definesPeter Meerwald-Stadler
Signed-off-by: Peter Meerwald-Stadler <pmeerw@pmeerw.net> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2016-07-10iio: light: vcnl4000: Add missing lockingPeter Meerwald-Stadler
Signed-off-by: Peter Meerwald-Stadler <pmeerw@pmeerw.net> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2016-07-10iio: light: vcnl4000: Cleanup read_raw() returnsPeter Meerwald-Stadler
Signed-off-by: Peter Meerwald-Stadler <pmeerw@pmeerw.net> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2016-07-10iio: light: vcnl4000: Use BIT() macroPeter Meerwald-Stadler
Signed-off-by: Peter Meerwald-Stadler <pmeerw@pmeerw.net> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2016-07-10iio: light: vcnl4000: Mention and check support for VCNL4010 and VCNL4020Peter Meerwald-Stadler
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>
2016-07-10iio: temperature: add support for Maxim thermocouple chipsMatt Ranostay
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>
2016-07-05drivers:iio:accel:mma8452: removed unwanted return statementsBijosh Thykkoottathil
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>
2016-07-05drivers:iio:accel:mma8452: added cleanup provision in case of failure.Bijosh Thykkoottathil
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>
2016-07-04iio: Add iio.git tree to MAINTAINERSJonathan Cameron
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>
2016-07-04iio:st_pressure: clean useless static channel initializersGregor Boirie
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>
2016-07-04iio:st_pressure:lps22hb: temperature supportGregor Boirie
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>
2016-07-04iio:st_pressure:lps22hb: open drain supportGregor Boirie
Add support for open drain interrupt line. Signed-off-by: Gregor Boirie <gregor.boirie@parrot.com> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2016-07-04iio:st_pressure: temperature triggered bufferingGregor Boirie
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>
2016-07-04iio:st_pressure: document sampling gainsGregor Boirie
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>
2016-07-04iio:st_pressure: align storagebits on power of 2Gregor Boirie
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>
2016-07-04iio:st_sensors: align on storagebits boundariesGregor Boirie
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>
2016-07-04staging:iio:lis3l02dq drop separate driverJonathan Cameron
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>
2016-07-04iio: accel: st_accel: Add lis3l02dq supportJonathan Cameron
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>
2016-07-03iio: adc: add missing of_node references to iio_devMatt Ranostay
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>
2016-07-03iio: adc: ti-ads1015: add indio_dev->dev.of_node referenceMatt Ranostay
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>
2016-07-03iio: potentiometer: Fix typo in KconfigFlorian Vaussard
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>
2016-07-03iio: potentiometer: mcp4531: Add device tree bindingFlorian Vaussard
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>
2016-07-03iio: potentiometer: mcp4531: Add device tree binding documentationFlorian Vaussard
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>
2016-07-03iio: potentiometer: mcp4531: Add support for MCP454x, MCP456x, MCP464x and ↵Florian Vaussard
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>
2016-07-03iio:imu:mpu6050: icm20608 initial supportGregor Boirie
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>
2016-07-03iio: adc: max1363: Add device tree bindingFlorian Vaussard
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>
2016-07-03iio: adc: max1363: Add device tree binding documentationFlorian Vaussard
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>
2016-07-03iio: bmg160: add callbacks for the filter frequencySteffen Trumtrar
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>
2016-07-03iio: Add driver for Broadcom iproc-static-adcRaveendra Padasalagi
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>
2016-07-03Documentation: DT: Add iproc-static-adc bindingRaveendra Padasalagi
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>
2016-07-03iio: pressure: bmp280: read calibration data onceLinus Walleij
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>
2016-07-03iio: pressure: bmp280: add power managementLinus Walleij
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>
2016-07-03iio: pressure: bmp280: add support for BMP085 EOC interruptLinus Walleij
The first version of this sensor, BMP085, supports sending an End-of-Conversion (EOC) interrupt. Add code to support this using a completion, in a similar vein as drivers/misc/bmp085.c does. Make sure to check that we are given a rising edge, because the EOC line goes from low-to-high when the conversion is ready. Signed-off-by: Linus Walleij <linus.walleij@linaro.org> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2016-07-03iio: pressure: bmp280: add SPI interface driverLinus Walleij
This patch mimics the SPI functionality found in the misc driver in drivers/misc/bh085-spi.c to make it possible to reuse the existing BMP280/BMP180/BMP085 driver with all clients of the other driver. The adoption is straight-forward since like the other driver, it is a simple matter of using regmap. This driver is also so obviously inspired/copied from the old misc driver in drivers/misc/bmp085.c that I just took the liberty to add in the authors of the other drivers + self in the core driver file. The MISC driver also supports a variant named "BMP181" so include that here to be complete in comparison to the old driver. The bus mapping code for SPI was written by Akinobu Mita. Signed-off-by: Akinobu Mita <akinobu.mita@gmail.com> Tested-by: Akinobu Mita <akinobu.mita@gmail.com> Signed-off-by: Linus Walleij <linus.walleij@linaro.org> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2016-07-03iio: pressure: bmp280: split off an I2C Kconfig entryLinus Walleij
This creates a separate BMP280_I2C Kconfig entry that gets selected by BMP280 for I2C transport. As we currently only support I2C transport there is not much practical change other than getting a separate object file (or module) for the I2C driver part. The old Kconfig symbol BMP280 will still select the stuff we need so that oldconfig and old defconfigs works fine. Tested-by: Akinobu Mita <akinobu.mita@gmail.com> Signed-off-by: Linus Walleij <linus.walleij@linaro.org> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2016-07-03iio: pressure: bmp280: split driver in logical partsLinus Walleij
This splits the BMP280 driver in three logical parts: the core driver bmp280-core that only operated on a struct device * and a struct regmap *, the regmap driver bmp280-regmap that can be shared between I2C and other transports and the I2C module driver bmp280-i2c. Cleverly bake all functionality into a single object bmp280.o so that we still get the same module binary built for the device in the end, without any fuzz exporting symbols to the left and right. Signed-off-by: Linus Walleij <linus.walleij@linaro.org> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2016-07-03iio: pressure: bmp280: support supply regulatorsLinus Walleij
The BMP085/BMP180/BMP280 is supplied with two power sources: VDDA (analog power) and VDDD (digital power). As these may come from regulators (as on the APQ8060 Dragonboard) we need the driver to attempt to fetch and enable these regulators. We FAIL if we cannot: boards should either define: - Proper regulators if present - Define fixed regulators if power is hardwired to the component - Rely on dummy regulators (will be present on all DT systems and any boardfile system that calls regulator_has_full_constraints(). Cc: Mark Brown <broonie@kernel.org> Signed-off-by: Linus Walleij <linus.walleij@linaro.org> Signed-off-by: Jonathan Cameron <jic23@kernel.org>