utils: Add function to get the latest version

This repo does not know which PSU version is the latest, and it lets the
vendor tool to decide which one is the latest.

This commit defines PSU_VERSION_COMPARE_UTIL which is expected to be a
tool that accepts arguments of a list of versions, and returns the
latest version string.

Tested: Put and configure to use the example get_latest_version on
        Witherspoon, verify the versionId with a larger version string
        is returned.

Signed-off-by: Lei YU <mine260309@gmail.com>
Change-Id: Ic5a10d3724cf6a98b3979486c72d54f8deac7038
diff --git a/meson_options.txt b/meson_options.txt
index 4212459..f4e84b4 100644
--- a/meson_options.txt
+++ b/meson_options.txt
@@ -26,12 +26,22 @@
 # inventory path as input, and output the version string, e.g
 #   psutils get-version /xyz/openbmc_project/inventory/system/chassis/motherboard/powersupply0
 # or in vendor-example
-#   get-version <some-psu-path>
+#   get_version <some-psu-path>
 option('PSU_VERSION_UTIL',
        type: 'string',
        value: '/usr/bin/psutils --getversion',
        description: 'The command and arguments to get PSU version')
 
+# The PSU_VERSION_COMPARE_UTIL specifies an executable that accepts the PSU
+# versions as input, and outputs which version is the newest, e.g.
+#   psutils get-version 0001 0002 0003 # May output 0003
+# or in vendor-example
+#   get_latest_version 0001 0002 0003 # output 0003
+option('PSU_VERSION_COMPARE_UTIL',
+       type: 'string',
+       value: '/usr/bin/psutils --compare',
+       description: 'The command and arguments to compare PSU versions')
+
 # The PSU update service
 # It shall take a path containing the PSU image(s) as the input
 option('PSU_UPDATE_SERVICE',