diff options
author | Guenter Roeck <linux@roeck-us.net> | 2019-06-07 10:23:17 -0700 |
---|---|---|
committer | Guenter Roeck <linux@roeck-us.net> | 2019-06-23 18:33:01 -0700 |
commit | b2905bb8e1f3764c21e449931f3fb75405f7d41e (patch) | |
tree | d880eee8fda6e9b52f252c002a5e17209785a2b3 /drivers/ras/cec.c | |
parent | 8e5e7ddd38b69ef48a2104cd663fab0e3dd03e14 (diff) | |
download | linux-b2905bb8e1f3764c21e449931f3fb75405f7d41e.tar.bz2 |
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>
Diffstat (limited to 'drivers/ras/cec.c')
0 files changed, 0 insertions, 0 deletions