]> git.baikalelectronics.ru Git - kernel.git/commit
hwmon: (tmp102) Rework chip configuration
authorGuenter Roeck <linux@roeck-us.net>
Wed, 22 Jun 2016 17:01:57 +0000 (10:01 -0700)
committerGuenter Roeck <linux@roeck-us.net>
Tue, 12 Jul 2016 21:24:09 +0000 (14:24 -0700)
commitf29c27d2dfa865bf05eb2857ccfa1e1ec0bfb380
tree82ffa2c205613f863d97e0736b55422350d40395
parent8f3de200d3181fd272901b4e4ecaf649c613818e
hwmon: (tmp102) Rework chip configuration

So far the chip was forced into polarity 0, even if it was preconfigured
differently. Do not touch the polarity when configuring the chip.

Also, the configuration register was read beack to check if the
configuration 'sticks'. Ultimately, that is similar to checking if the
chip is a tmp102 in the first place. Checking if a write into the
configuration register was successful is really not the way to do it,
and quite risky if the chip is not a tmp102, so drop that check.
Instead, verify if the configuration register has unexpected bits set
before writing into it.

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