From: Vianney le Clément de Saint-Marcq Date: Mon, 30 Mar 2015 08:35:00 +0000 (+0200) Subject: iio: mlx90614: Add emissivity setting X-Git-Tag: omap-for-v4.3/legacy-v2-signed~121^2~761^2~43 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=fad65a8fe5b85b5039b316258c2790e773cc3502;p=pandora-kernel.git iio: mlx90614: Add emissivity setting 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 Cc: Arnout Vandecappelle (Essensium/Mind) Signed-off-by: Jonathan Cameron --- Reading git-diff-tree failed