Commits
Guenter Roeck committed b2905bb8e1f
hwmon: (max6650) Introduce pwm_to_dac and dac_to_pwm Consolidate conversion from pwm value to dac value and from dac value to pwm value into helper functions. While doing this, only update the cached dac value if writing it to the chip was successful after an update. Also, put macro argument of DIV_FROM_REG() into (), and simplify return statement of max6650_set_cur_state(). Cc: Jean-Francois Dagenais <jeff.dagenais@gmail.com> Signed-off-by: Guenter Roeck <linux@roeck-us.net>