ec: Move the common configs to ec_common.xml

There were many common configs between x86_ec_common.xml and
arm_ec_common.xml. This CL moves them to their parent ec_common.xml.

BUG=None
TEST=Started servod with a x86 board and an ARM board

Change-Id: I3ee266e33f6170000e231ba169fc12a576fb00e3
Reviewed-on: https://chromium-review.googlesource.com/443128
Commit-Ready: Wai-Hong Tam <waihong@google.com>
Tested-by: Wai-Hong Tam <waihong@google.com>
Reviewed-by: Aseda Aboagye <aaboagye@chromium.org>
Reviewed-by: Todd Broch <tbroch@chromium.org>
diff --git a/servo/data/arm_ec_common.xml b/servo/data/arm_ec_common.xml
index 9590750..f96c221 100644
--- a/servo/data/arm_ec_common.xml
+++ b/servo/data/arm_ec_common.xml
@@ -4,95 +4,6 @@
   </include>
   <!-- ******** Controls ******** -->
   <control>
-    <name>ec_uart_capture</name>
-    <doc>ec_uart_capture</doc>
-    <params subtype="uart_capture" interface="10" drv="uart"
-    map="onoff"></params>
-  </control>
-  <control>
-    <name>ec_uart_cmd</name>
-    <doc>Set to send command to EC UART. Get to obtain the matched
-    results with the regular expression of ec_uart_regexp.</doc>
-    <params subtype="uart_cmd" interface="10" drv="ec"
-    input_type="str"></params>
-  </control>
-  <control>
-    <name>ec_uart_multicmd</name>
-    <doc>Set to send multiple commands to EC UART.</doc>
-    <params subtype="uart_multicmd" interface="10" drv="ec"
-    input_type="str" cmd="set"></params>
-  </control>
-  <control>
-    <name>ec_uart_regexp</name>
-    <doc>List of regular expressions which matches the response of
-    ec_uart_cmd.</doc>
-    <params subtype="uart_regexp" interface="10" drv="ec"
-    input_type="str"></params>
-  </control>
-  <control>
-    <name>ec_uart_stream</name>
-    <doc>Ec uart stream collected while ec_uart_capture is set to 'on'</doc>
-    <params cmd="get" subtype="uart_stream" interface="10" drv="uart"></params>
-  </control>
-  <control>
-    <name>ec_uart_timeout</name>
-    <doc>Timeout value for waiting EC UART response of issuing an
-    EC command.</doc>
-    <params subtype="uart_timeout" interface="10" drv="ec"
-    input_type="float"></params>
-  </control>
-  <control>
-    <name>kbd_en</name>
-    <doc>Enable servo to assert certain keypresses via kbd_m1 and
-    kbd_m2</doc>
-    <params subtype="kbd_en" interface="10" drv="ec" map="onoff"
-    clobber_ok=""></params>
-  </control>
-  <control>
-    <name>kbd_m1_a0</name>
-    <doc>kbd_m1_a0</doc>
-    <params subtype="kbd_m1_a0" interface="10" drv="ec" map="onoff"
-    clobber_ok=""></params>
-  </control>
-  <control>
-    <name>kbd_m1_a1</name>
-    <doc>kbd_m1_a1</doc>
-    <params subtype="kbd_m1_a1" interface="10" drv="ec" map="onoff"
-    clobber_ok=""></params>
-  </control>
-  <control>
-    <name>kbd_m2_a0</name>
-    <doc>kbd_m2_a0</doc>
-    <params subtype="kbd_m2_a0" interface="10" drv="ec" map="onoff"
-    clobber_ok=""></params>
-  </control>
-  <control>
-    <name>kbd_m2_a1</name>
-    <doc>kbd_m2_a1</doc>
-    <params subtype="kbd_m2_a1" interface="10" drv="ec" map="onoff"
-    clobber_ok=""></params>
-  </control>
-  <control>
-    <name>ppvar_vbat_ma</name>
-    <doc>milliamps being consumed (discharging/positive) or
-    supplied (charging/negative) to the battery</doc>
-    <params cmd="get" subtype="milliamps" interface="10" drv="ec">
-    </params>
-  </control>
-  <control>
-    <name>ppvar_vbat_mv</name>
-    <doc>millivolts of the battery</doc>
-    <params cmd="get" subtype="millivolts" interface="10" drv="ec">
-    </params>
-  </control>
-  <control>
-    <name>ppvar_vbat_mw</name>
-    <doc>milliwatts being consumed (discharging) or supplied
-    (charging) to the battery</doc>
-    <params cmd="get" subtype="milliwatts" interface="10" drv="ec">
-    </params>
-  </control>
-  <control>
     <name>rec_mode</name>
     <doc>Google recovery mode</doc>
     <params subtype="rec_mode" interface="10" drv="arm_ec" map="onoff"
diff --git a/servo/data/ec_common.xml b/servo/data/ec_common.xml
index cd973ef..0a0d5db 100644
--- a/servo/data/ec_common.xml
+++ b/servo/data/ec_common.xml
@@ -1,6 +1,95 @@
 <root>
   <!-- ******** Controls ******** -->
   <control>
+    <name>ec_uart_capture</name>
+    <doc>ec_uart_capture</doc>
+    <params subtype="uart_capture" interface="10" drv="uart"
+    map="onoff"></params>
+  </control>
+  <control>
+    <name>ec_uart_cmd</name>
+    <doc>Set to send command to EC UART. Get to obtain the matched
+    results with the regular expression of ec_uart_regexp.</doc>
+    <params subtype="uart_cmd" interface="10" drv="ec"
+    input_type="str"></params>
+  </control>
+  <control>
+    <name>ec_uart_multicmd</name>
+    <doc>Set to send multiple commands to EC UART.</doc>
+    <params subtype="uart_multicmd" interface="10" drv="ec"
+    input_type="str" cmd="set"></params>
+  </control>
+  <control>
+    <name>ec_uart_regexp</name>
+    <doc>List of regular expressions which matches the response of
+    ec_uart_cmd.</doc>
+    <params subtype="uart_regexp" interface="10" drv="ec"
+    input_type="str"></params>
+  </control>
+  <control>
+    <name>ec_uart_stream</name>
+    <doc>Ec uart stream collected while ec_uart_capture is set to 'on'</doc>
+    <params cmd="get" subtype="uart_stream" interface="10" drv="uart"></params>
+  </control>
+  <control>
+    <name>ec_uart_timeout</name>
+    <doc>Timeout value for waiting EC UART response of issuing an
+    EC command.</doc>
+    <params subtype="uart_timeout" interface="10" drv="ec"
+    input_type="float"></params>
+  </control>
+  <control>
+    <name>kbd_en</name>
+    <doc>Enable servo to assert certain keypresses via kbd_m1 and
+    kbd_m2</doc>
+    <params subtype="kbd_en" interface="10" drv="ec" map="onoff"
+    clobber_ok=""></params>
+  </control>
+  <control>
+    <name>kbd_m1_a0</name>
+    <doc>kbd_m1_a0</doc>
+    <params subtype="kbd_m1_a0" interface="10" drv="ec" map="onoff"
+    clobber_ok=""></params>
+  </control>
+  <control>
+    <name>kbd_m1_a1</name>
+    <doc>kbd_m1_a1</doc>
+    <params subtype="kbd_m1_a1" interface="10" drv="ec" map="onoff"
+    clobber_ok=""></params>
+  </control>
+  <control>
+    <name>kbd_m2_a0</name>
+    <doc>kbd_m2_a0</doc>
+    <params subtype="kbd_m2_a0" interface="10" drv="ec" map="onoff"
+    clobber_ok=""></params>
+  </control>
+  <control>
+    <name>kbd_m2_a1</name>
+    <doc>kbd_m2_a1</doc>
+    <params subtype="kbd_m2_a1" interface="10" drv="ec" map="onoff"
+    clobber_ok=""></params>
+  </control>
+  <control>
+    <name>ppvar_vbat_ma</name>
+    <doc>milliamps being consumed (discharging/positive) or
+    supplied (charging/negative) to the battery</doc>
+    <params cmd="get" subtype="milliamps" interface="10" drv="ec">
+    </params>
+  </control>
+  <control>
+    <name>ppvar_vbat_mv</name>
+    <doc>millivolts of the battery</doc>
+    <params cmd="get" subtype="millivolts" interface="10" drv="ec">
+    </params>
+  </control>
+  <control>
+    <name>ppvar_vbat_mw</name>
+    <doc>milliwatts being consumed (discharging) or supplied
+    (charging) to the battery</doc>
+    <params cmd="get" subtype="milliwatts" interface="10" drv="ec">
+    </params>
+  </control>
+  <control>
     <name>pwr_button_hold</name>
     <doc>milliseconds to hold the power button</doc>
     <params cmd="set" subtype='pwr_button_hold' interface="10" drv="ec"
diff --git a/servo/data/x86_ec_common.xml b/servo/data/x86_ec_common.xml
index 7e13f6c..246d362 100644
--- a/servo/data/x86_ec_common.xml
+++ b/servo/data/x86_ec_common.xml
@@ -10,37 +10,6 @@
   </map>
   <!-- ******** Controls ******** -->
   <control>
-    <name>kbd_en</name>
-    <doc>Enable servo to assert certain keypresses via kbd_m1 and
-    kbd_m2</doc>
-    <params subtype="kbd_en" interface="10" drv="ec" map="onoff"
-    clobber_ok=""></params>
-  </control>
-  <control>
-    <name>kbd_m1_a0</name>
-    <doc>kbd_m1_a0</doc>
-    <params subtype="kbd_m1_a0" interface="10" drv="ec" map="onoff"
-    clobber_ok=""></params>
-  </control>
-  <control>
-    <name>kbd_m1_a1</name>
-    <doc>kbd_m1_a1</doc>
-    <params subtype="kbd_m1_a1" interface="10" drv="ec" map="onoff"
-    clobber_ok=""></params>
-  </control>
-  <control>
-    <name>kbd_m2_a0</name>
-    <doc>kbd_m2_a0</doc>
-    <params subtype="kbd_m2_a0" interface="10" drv="ec" map="onoff"
-    clobber_ok=""></params>
-  </control>
-  <control>
-    <name>kbd_m2_a1</name>
-    <doc>kbd_m2_a1</doc>
-    <params subtype="kbd_m2_a1" interface="10" drv="ec" map="onoff"
-    clobber_ok=""></params>
-  </control>
-  <control>
     <name>cpu_temp</name>
     <doc>CPU temperature reading in degC. Only works when device is
     powered on.</doc>
@@ -48,26 +17,6 @@
     </params>
   </control>
   <control>
-    <name>ppvar_vbat_ma</name>
-    <doc>milliamps being consumed (discharging/positive) or
-    supplied (charging/negative) to the battery</doc>
-    <params cmd="get" subtype="milliamps" interface="10" drv="ec">
-    </params>
-  </control>
-  <control>
-    <name>ppvar_vbat_mv</name>
-    <doc>millivolts of the battery</doc>
-    <params cmd="get" subtype="millivolts" interface="10" drv="ec">
-    </params>
-  </control>
-  <control>
-    <name>ppvar_vbat_mw</name>
-    <doc>milliwatts being consumed (discharging) or supplied
-    (charging) to the battery</doc>
-    <params cmd="get" subtype="milliwatts" interface="10" drv="ec">
-    </params>
-  </control>
-  <control>
     <name>fan_actual_rpm</name>
     <doc>Actual fan RPM.</doc>
     <params cmd="get" subtype="fan_actual_rpm" interface="10"
@@ -87,44 +36,6 @@
     </params>
   </control>
   <control>
-    <name>ec_uart_cmd</name>
-    <doc>Set to send command to EC UART. Get to obtain the matched
-    results with the regular expression of ec_uart_regexp.</doc>
-    <params subtype="uart_cmd" interface="10" drv="ec"
-    input_type="str"></params>
-  </control>
-  <control>
-    <name>ec_uart_multicmd</name>
-    <doc>Set to send multiple commands to EC UART.</doc>
-    <params subtype="uart_multicmd" interface="10" drv="ec"
-    input_type="str" cmd="set"></params>
-  </control>
-  <control>
-    <name>ec_uart_regexp</name>
-    <doc>List of regular expressions which matches the response of
-    ec_uart_cmd.</doc>
-    <params subtype="uart_regexp" interface="10" drv="ec"
-    input_type="str"></params>
-  </control>
-  <control>
-    <name>ec_uart_timeout</name>
-    <doc>Timeout value for waiting EC UART response of issuing an
-    EC command.</doc>
-    <params subtype="uart_timeout" interface="10" drv="ec"
-    input_type="float"></params>
-  </control>
-  <control>
-    <name>ec_uart_capture</name>
-    <doc>ec_uart_capture</doc>
-    <params subtype="uart_capture" interface="10" drv="uart"
-    map="onoff"></params>
-  </control>
-  <control>
-    <name>ec_uart_stream</name>
-    <doc>Ec uart stream collected while ec_uart_capture is set to 'on'</doc>
-    <params cmd="get" subtype="uart_stream" interface="10" drv="uart"></params>
-  </control>
-  <control>
     <name>power_state</name>
     <doc>Used to turn the DUT off and on</doc>
     <params clobber_ok="" cmd="set" drv="cros_ec_hardrec_power"/>