diff options
-rw-r--r-- | drivers/staging/comedi/comedi.h | 5 | ||||
-rw-r--r-- | drivers/staging/comedi/comedi_fops.c | 4 |
2 files changed, 8 insertions, 1 deletions
diff --git a/drivers/staging/comedi/comedi.h b/drivers/staging/comedi/comedi.h index bb961ac79b7e..cf7b2b970327 100644 --- a/drivers/staging/comedi/comedi.h +++ b/drivers/staging/comedi/comedi.h @@ -301,6 +301,8 @@ enum comedi_io_direction { * @INSN_CONFIG_PWM_SET_H_BRIDGE: Set PWM H bridge duty cycle and polarity for * a relay simultaneously. * @INSN_CONFIG_PWM_GET_H_BRIDGE: Get PWM H bridge duty cycle and polarity. + * @INSN_CONFIG_GET_CMD_TIMING_CONSTRAINTS: Get the hardware timing restraints, + * regardless of trigger sources. */ enum configuration_ids { INSN_CONFIG_DIO_INPUT = COMEDI_INPUT, @@ -344,7 +346,8 @@ enum configuration_ids { INSN_CONFIG_PWM_GET_PERIOD = 5001, INSN_CONFIG_GET_PWM_STATUS = 5002, INSN_CONFIG_PWM_SET_H_BRIDGE = 5003, - INSN_CONFIG_PWM_GET_H_BRIDGE = 5004 + INSN_CONFIG_PWM_GET_H_BRIDGE = 5004, + INSN_CONFIG_GET_CMD_TIMING_CONSTRAINTS = 5005, }; /** diff --git a/drivers/staging/comedi/comedi_fops.c b/drivers/staging/comedi/comedi_fops.c index e18b61cdbdeb..548baa790507 100644 --- a/drivers/staging/comedi/comedi_fops.c +++ b/drivers/staging/comedi/comedi_fops.c @@ -1216,6 +1216,10 @@ static int check_insn_config_length(struct comedi_insn *insn, if (insn->n == 6) return 0; break; + case INSN_CONFIG_GET_CMD_TIMING_CONSTRAINTS: + if (insn->n >= 4) + return 0; + break; /* * by default we allow the insn since we don't have checks for * all possible cases yet |