hwmon: (tmp102) Convert to use regmap, and drop local cache
authorGuenter Roeck <linux@roeck-us.net>
Mon, 20 Jun 2016 16:55:46 +0000 (09:55 -0700)
committerGuenter Roeck <linux@roeck-us.net>
Tue, 12 Jul 2016 21:24:14 +0000 (14:24 -0700)
commit28a340db9043f11dfd092c1b8ea4043f59cc0ca1
tree01889c6f36fc6fa9537f7cc6bc4c4484ca983714
parenta9f92ccf334f7e15124193b1d7b89b7e6e6624e2
hwmon: (tmp102) Convert to use regmap, and drop local cache

By converting the driver to regmap, we can use regmap to cache non-volatile
registers. Stop caching the temperature register; while potentially reading
it more often can result in reading it more often than necessary, this is
offset by the gain due to not re-reading the limit registers.

A positive side effect of this change is that limit registers can now be
read and updated before the first temperature conversion is complete.

Acked-by: Nishanth Menon <nm@ti.com>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
drivers/hwmon/Kconfig
drivers/hwmon/tmp102.c