CHROMIUM: mfd: max77686: don't read when updating if mask is 0xff
If an update is going to set all of the bits of a register, there is no
reason to read its value first.
Signed-off-by: Daniel Kurtz <djkurtz@chromium.org>
BUG=chrome-os-partner:10891
TEST=builds clean and snow boots;
TEST=ftrace shows that most update_reg calls, when mask is 0xff, only
cause a single i2c write
Change-Id: I14270ba5f3ef6d060401a7c6c69b6f493a9f6588
Reviewed-on: https://gerrit.chromium.org/gerrit/30551
Reviewed-by: Doug Anderson <dianders@chromium.org>
Reviewed-by: Sonny Rao <sonnyrao@chromium.org>
Reviewed-by: Olof Johansson <olofj@chromium.org>
Commit-Ready: Daniel Kurtz <djkurtz@chromium.org>
Reviewed-by: Daniel Kurtz <djkurtz@chromium.org>
Tested-by: Daniel Kurtz <djkurtz@chromium.org>