Util: add adjustI2CPort

adjustI2CPort converts the I2C port number from the MRW numbering scheme
to the Linux numbering scheme.

Change-Id: I22fc00eb8eab9c62b190f1c5c45af775f351c8b4
Signed-off-by: Deepak Kodihalli <dkodihal@in.ibm.com>
diff --git a/Util.pm b/Util.pm
index 3f3df15..396f056 100644
--- a/Util.pm
+++ b/Util.pm
@@ -122,6 +122,15 @@
     return getEnclosingFru($targets, $parent);
 }
 
+#Convert I2C port number from MRW scheme to Linux numbering scheme
+# $port = the I2C port number
+sub adjustI2CPort
+{
+    my $port = shift;
+
+    return $port - 1;
+}
+
 1;
 
 =head1 NAME
@@ -164,6 +173,10 @@
 
 Finds the nearest FRU enclosing the input Target.
 
+=item adjustI2CPort(C<I2CPort>)
+
+Returns C<I2CPort> converted from MRW numering scheme to Linux numbering scheme.
+
 =back
 
 =cut