Skip to content
Commit e2f75e6b authored by Roy van Doormaal's avatar Roy van Doormaal Committed by Guenter Roeck
Browse files

hwmon: (adc128d818) Fix advanced configuration register init



If the operation mode is non-zero and an external reference voltage is set,
first the operation mode is written to the advanced configuration register,
followed by the externel reference enable bit,
resetting the configuration mode to 0.

To fix this, first compose the value of the advanced configuration register
based on the configuration mode and the external reference voltage.
The advanced configuration register is then written to the device,
if it is different from the default register value (0x0).

Signed-off-by: default avatarRoy van Doormaal <roy.van.doormaal@prodrive-technologies.com>
Link: https://lore.kernel.org/r/20200728151846.231785-1-roy.van.doormaal@prodrive-technologies.com


Signed-off-by: default avatarGuenter Roeck <linux@roeck-us.net>
parent dfddc57c
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment