Add servo_serial property in servo module.

Also propagate servo serial number to flashrom programmer.

BUG=none
TEST=manually tested on my DUT

Change-Id: I1106221913ffd7adeb8d1f4118699ecc18bcf4ef
Reviewed-on: https://chromium-review.googlesource.com/196419
Reviewed-by: Vic Yang <victoryang@chromium.org>
Commit-Queue: Ricky Liang <jcliang@chromium.org>
Tested-by: Ricky Liang <jcliang@chromium.org>
diff --git a/server/cros/servo/servo.py b/server/cros/servo/servo.py
index b592834..22d8d7b 100644
--- a/server/cros/servo/servo.py
+++ b/server/cros/servo/servo.py
@@ -62,16 +62,18 @@
     INIT_TIMEOUT_SECS = 10
 
 
-    def __init__(self, servo_host):
+    def __init__(self, servo_host, servo_serial=None):
         """Sets up the servo communication infrastructure.
 
         @param servo_host: A ServoHost object representing
                            the host running servod.
+        @param servo_serial: Serial number of the servo board.
         """
         # TODO(fdeng): crbug.com/298379
         # We should move servo_host object out of servo object
         # to minimize the dependencies on the rest of Autotest.
         self._servo_host = servo_host
+        self._servo_serial = servo_serial
         self._server = servo_host.get_servod_server_proxy()
         board = self._server.get_board()
         self._power_state = (
@@ -92,6 +94,12 @@
                          self.get_version())
 
 
+    @property
+    def servo_serial(self):
+        """Returns the serial number of the servo board."""
+        return self._servo_serial
+
+
     def get_power_state_controller(self):
         """Return the power state controller for this Servo.