ec: Use EC command to toggle power button if pwr_button not available

Usually, we use the power button line in the servo debug header to
control the state of power button. On CCD, this way is not feasible.
We switch to use EC command to toogle the power button. It is done
by setting the new control pwr_button_hold which accepts a hold
interval.

We remove the pwr_button control from Cr50 CCD config. Because on
some boards, it doesn't work. Safe to not use it.

BUG=chrome-os-partner:62904
TEST=Started servod and calls the servod RPC calls:
>>> import xmlrpclib
>>> c = xmlrpclib.ServerProxy('http://localhost:9999')
>>> c.power_normal_press()
True
>>> c.power_short_press()
True
>>> c.power_long_press()
True
>>> c.power_short_press()
True
>>> c.power_key(0.2)
True
>>> c.power_key(1.5)
True

Change-Id: I4c3581f7c491729d012e1db275a96a52b6715dd5
Reviewed-on: https://chromium-review.googlesource.com/443130
Commit-Ready: Wai-Hong Tam <waihong@google.com>
Tested-by: Wai-Hong Tam <waihong@google.com>
Reviewed-by: Mary Ruthven <mruthven@chromium.org>
3 files changed