Allow PGOOD polling interval of 500ms
The code has an explicit check for a minimum allowed
PGOOD polling interval. Decrease that from 1s to 500ms
as there are new requirements on a specific system
to poll at the 500ms.
Change-Id: If42ecc9244b5e0d8d5b5c17275241f820537d34a
Signed-off-by: Matt Spinler <spinler@us.ibm.com>
diff --git a/op-pwrctl/power_control_obj.c b/op-pwrctl/power_control_obj.c
index 84bbdd2..3a4729f 100644
--- a/op-pwrctl/power_control_obj.c
+++ b/op-pwrctl/power_control_obj.c
@@ -479,8 +479,8 @@
pgood_timeout_start = 0;
int poll_interval = atoi(cmd->argv[1]);
int pgood_timeout = atoi(cmd->argv[2]);
- if(poll_interval < 1000 || pgood_timeout <5) {
- g_print("ERROR PowerControl: poll_interval < 1000 or pgood_timeout < 5\n");
+ if(poll_interval < 500 || pgood_timeout <5) {
+ g_print("ERROR PowerControl: poll_interval < 500 or pgood_timeout < 5\n");
} else {
control_set_poll_interval(control,poll_interval);
control_power_set_pgood_timeout(control_power,pgood_timeout);