summaryrefslogtreecommitdiffstats
path: root/drivers/iio/temperature
Commit message (Collapse)AuthorAgeFilesLines
* iio: mlx90614: Define magic numbersCrt Mori2015-08-021-6/+14
| | | | | | | | | | | | Translates the magic constant numbers to named macros and add some additional comments about their meaning. The diff is made towards togreg branch as that branch seems to have the most recent updates of mlx90614 driver (many are yet to be merged). Signed-off-by: Crt Mori <cmo@melexis.com> Acked-by: Peter Meerwald <pmeerw@pmeerw.net> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
* iio: Drop owner assignment from i2c_driverKrzysztof Kozlowski2015-07-112-2/+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>
* 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:temp:mlx90614 trivial drop of unnecessary ret return from write_raw.Jonathan Cameron2015-05-131-3/+1
| | | | | | | | | | | | This is mostly part of an effort to clean out our current warnings and make the autobuilder build reports more useful. Still a worthwhile if trivial cleanup! Signed-off-by: Jonathan Cameron <jic23@kernel.org> Reported-by: kbuild test robot <fengguang.wu@intel.com> Cc: Vianney le Clément de Saint-Marcq <vianney.leclement@essensium.com> Cc: Peter Meerwald <pmeerw@pmeerw.net>
* iio:tmp006: Prefix #defines with TMP006_Peter Meerwald2015-04-181-3/+3
| | | | | | | just cleanup, no functional change Signed-off-by: Peter Meerwald <pmeerw@pmeerw.net> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
* iio: mlx90614: Fix duplicate const warningVianney le Clément de Saint-Marcq2015-04-181-1/+1
| | | | | | | | Fix a typo triggering a duplicate const warning on some compilers. Signed-off-by: Vianney le Clément de Saint-Marcq <vianney.leclement@essensium.com> Cc: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
* iio: mlx90614: Check for errors in read valuesVianney le Clément de Saint-Marcq2015-04-091-0/+5
| | | | | | | | | The device uses the MSB of the returned temperature value as an error flag. Return a read error when this bit is set. Signed-off-by: Vianney le Clément de Saint-Marcq <vianney.leclement@essensium.com> Cc: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
* iio: mlx90614: Add power managementVianney le Clément de Saint-Marcq2015-04-091-2/+244
| | | | | | | | | | | | | | | | | | | Add support for system sleep and runtime power management. To wake up the device, the SDA line should be held low for at least 33ms while SCL is high. As this is not possible using the i2c API (and not supported by all i2c adapters), a GPIO connected to the SDA line is needed. The GPIO is named "wakeup" and can be specified in a device tree with the "wakeup-gpios" binding. If the wake-up GPIO is not given, disable power management for the device. Entering sleep requires an SMBus byte access, hence power management is also disabled if byte access is not supported by the adapter. Signed-off-by: Vianney le Clément de Saint-Marcq <vianney.leclement@essensium.com> Cc: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
* iio: mlx90614: Add emissivity settingVianney le Clément de Saint-Marcq2015-04-091-3/+103
| | | | | | | | | | | | | | | | The mapping from the 16-bit EEPROM value to the decimal 0-1 range is approximate. A special case ensures 0xFFFF shows as 1.0 instead of 0.999998565. Writing to EEPROM requires an explicit erase by writing zero. In addition, it takes 20ms for the erase/write to complete. During this time no EEPROM register should be accessed. Therefore, two msleep()s are added to the write function and a mutex protects against concurrent access. Signed-off-by: Vianney le Clément de Saint-Marcq <vianney.leclement@essensium.com> Cc: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
* iio: mlx90614: Support devices with dual IR sensorVianney le Clément de Saint-Marcq2015-03-291-10/+57
| | | | | | | | | The model is detected by reading the EEPROM configuration during probing. Signed-off-by: Vianney le Clément de Saint-Marcq <vianney.leclement@essensium.com> Cc: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
* iio: mlx90614: Add symbols for accessible registersVianney le Clément de Saint-Marcq2015-03-291-1/+25
| | | | | | | | | Add symbols for all accessible RAM and EEPROM registers, as well as the sleep command and timings defined in the datasheet. Signed-off-by: Vianney le Clément de Saint-Marcq <vianney.leclement@essensium.com> Cc: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
* iio: mlx90614: Refactor register symbolsVianney le Clément de Saint-Marcq2015-03-091-4/+4
| | | | | | | | | | The defined registers only make sense when used for accessing RAM. Make MLX90614_OP_RAM part of the symbol definition to avoid accidental access to the wrong register. Signed-off-by: Vianney le Clément de Saint-Marcq <vianney.leclement@essensium.com> Cc: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be> 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>
* Merge 3.12-rc2 into staging-next.Greg Kroah-Hartman2013-09-251-2/+4
|\ | | | | | | | | | | | | | | This resolves the merge problem with two iio drivers that Stephen Rothwell pointed out. Reported-by: Stephen Rothwell <sfr@canb.auug.org.au> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
| * iio: Fix tmp006 dev-to-indio_dev conversion in suspend/resumePeter Meerwald2013-09-211-2/+4
| | | | | | | | | | | | | | dev_to_iio_dev() is a false friend Signed-off-by: Peter Meerwald <pmeerw@pmeerw.net> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
* | iio:temperature:tmp006 put sampling_frequency in info_mask_shared_by_allJonathan Cameron2013-09-151-30/+27
|/ | | | | | | | Doing this makes it possible to access this control from within the kernel. Signed-off-by: Jonathan Cameron <jic23@kernel.org> Acked-by: Peter Meerwald <pmeerw@pmeerw.net> Reviewed-by: Lars-Peter Clausen <lars@metafoo.de>
* iio: Add tmp006 IR temperature sensorPeter Meerwald2013-08-173-0/+312
the TI TMP006 is a non-contact temperature sensor with I2C interface; it measures the surface temperature of a distance object using a thermopile to absorb IR energy emitted from the object the sensor has two channels: IR sensor voltage (16-bit) and reference temperature of the chip (14-bit); datasheet is here: http://www.ti.com/lit/ds/symlink/tmp006.pdf v2 (thanks to Grygorii Strashko, Lars-Peter Clausen, Jonathan Cameron for review comments): * power down device on driver remove * use sign_extend32() * style cleanup * add comments what channel raw LSBs mean * spelling of thermopile Signed-off-by: Peter Meerwald <pmeerw@pmeerw.net> Cc: Grygorii Strashko <grygorii.strashko@ti.com> Cc: Lars-Peter Clausen <lars@metafoo.de> Cc: Jonathan Cameron <jic23@kernel.org> Cc: LM Sensors <lm-sensors@lm-sensors.org> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
OpenPOWER on IntegriCloud