servo: allow keyboard handlers to be turned off

For the regular keyboard handlers this mostly doesn't matter, but for
the usb keyboard emulator, we don't want to add a usb HID device when
that's not required. This change now properly 'turns off' usb and
internal keyboard handlers. For the usb keyboard handler, it sets the
atmega chip on reset.

BUG=chromium:869335
TEST=manual testing

dut-control init_usb_keyboard:on
(on DUT)
lsusb | grep Atmel
Bus 001 Device 039: ID 03eb:2042 Atmel Corp. LUFA Keyboard Demo
Application
dut-control init_usb_keyboard:off
(on DUT)
lsusb | grep Atmel
// no output

Change-Id: I6f7ea0652470ec342fb8db05371bd3f4c64ebace
Signed-off-by: Ruben Rodriguez Buchillon <coconutruben@google.com>
Reviewed-on: https://chromium-review.googlesource.com/1566782
Commit-Ready: ChromeOS CL Exonerator Bot <chromiumos-cl-exonerator@appspot.gserviceaccount.com>
Tested-by: Ruben Rodriguez Buchillon <coconutruben@chromium.org>
Tested-by: Ravi Chandra Sadineni <ravisadineni@chromium.org>
Reviewed-by: Todd Broch <tbroch@chromium.org>
2 files changed