diff options
author | Deepak Kodihalli <dkodihal@in.ibm.com> | 2017-02-23 02:42:15 -0600 |
---|---|---|
committer | Patrick Williams <patrick@stwcx.xyz> | 2017-02-24 16:14:30 +0000 |
commit | 8f5dec5ce43975926732f8044a57201db5edd80a (patch) | |
tree | 3a736237457e945310678af896c5f16ab1375f36 /Util.pm | |
parent | fd2fc5a988c6f68d701993afe8800632eac44a55 (diff) | |
download | phosphor-mrw-tools-8f5dec5ce43975926732f8044a57201db5edd80a.tar.gz phosphor-mrw-tools-8f5dec5ce43975926732f8044a57201db5edd80a.zip |
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>
Diffstat (limited to 'Util.pm')
-rw-r--r-- | Util.pm | 13 |
1 files changed, 13 insertions, 0 deletions
@@ -122,6 +122,15 @@ sub getEnclosingFru 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 @@ format. 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 |