+27
−28
Loading
Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more
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>