CHERRY-PICK: it8772: fan: Seperate PECI enable from fan control mode setting

Previously, whenever PECI was re-enabled, we would automatically set the
fan control mode to automatic control (ex. PWM control automated by EC,
not user space / kernel). This is not desirable for platforms where we
always expect automated control from the kernel thermal driver.

With this change, setting of the fan control mode is done as a separate
function call at the platform level. Kiev and Stumpy functionality is
left unchanged, while Beltino is modified to set software control in
response to a "set auto" command.

TEST=Manual on Monroe.
"mosys sensor set fantach system 100": set fan to full speed
"mosys sensor set fantach system auto": set fan to SW control
"echo 0 > /sys/class/thermal/cooling_device4/cur_state"
"mosys sensor print all", verify fan speed matches expectation based
upon temperature.
Stress system, verify that fan speed increases as temperature crosses
thermal zones.
BUG=chrome-os-partner:24363
BRANCH=panther,monroe

Original-Change-Id: Ic8fac0ef1aca2209533d7a4cfe065ced1fdef852
Reviewed-on: https://chromium-review.googlesource.com/180679
Reviewed-by: David Hendricks <dhendrix@chromium.org>
Commit-Queue: Shawn Nematbakhsh <shawnn@chromium.org>
Tested-by: Shawn Nematbakhsh <shawnn@chromium.org>
(cherry picked from commit 5f7e3baf3aea6f2620dd08ada10bd6e4c5e19da1)

Change-Id: I9186293f0276578dfeba3d2d0d2be580d594dbce
Reviewed-on: https://chromium-review.googlesource.com/182110
Commit-Queue: Bowgo Tsai <bowgotsai@chromium.org>
Tested-by: Bowgo Tsai <bowgotsai@chromium.org>
Reviewed-by: Mohammed Habibulla <moch@google.com>
5 files changed