Add power supply derating factor to meson options
Add the option to specify the power supply derating factor.
Signed-off-by: Eddie James <eajames@linux.ibm.com>
Change-Id: Ibfbb52f64c5b9133fbbc8cbb267aa9618c079cc6
diff --git a/meson.build b/meson.build
index 0bb8aee..daf1c15 100644
--- a/meson.build
+++ b/meson.build
@@ -23,7 +23,7 @@
conf_data.set('MAX_CPUS', get_option('max-cpus'))
conf_data.set('OCC_CPU_TEMP_SENSOR_TYPE', 0xC0)
conf_data.set('OCC_DIMM_TEMP_SENSOR_TYPE', 0xD0)
-conf_data.set('PS_DERATING_FACTOR', 90)
+conf_data.set('PS_DERATING_FACTOR', get_option('ps-derating-factor'))
if get_option('i2c-occ').enabled()
conf_data.set_quoted('OCC_HWMON_PATH', '/sys/bus/i2c/drivers/occ-hwmon/')
diff --git a/meson_options.txt b/meson_options.txt
index a948e46..7aad4ba 100644
--- a/meson_options.txt
+++ b/meson_options.txt
@@ -34,6 +34,14 @@
)
option(
+ 'ps-derating-factor',
+ type : 'integer',
+ min:0, max:100,
+ description : 'Power supply derating factor',
+ value: 90
+)
+
+option(
'with-host-communication-protocol',
type : 'string',
description : 'To specify the host communication protocol'