Skip to content
  • Ian Abbott's avatar
    staging: comedi: ni_6527: support INSN_CONFIG_DIGITAL_TRIG · 110f9e68
    Ian Abbott authored
    
    
    The "edge detection interrupt" subdevice supports the
    `INSN_CONFIG_CHANGE_NOTIFY` comedi instruction which is only supported
    by one other driver.  The `INSN_CONFIG_DIGITAL_TRIG` comedi instruction
    is more flexible as it supports both edge and level detection, but is
    not currently supported by this driver.
    
    Add partial support for `INSN_CONFIG_DIGITAL_TRIG`, but only for edge
    detection.  Make use of the `ni6527_set_edge_detection()` used for
    `INSN_CONFIG_CHANGE_NOTIFY`, but add a parameter holding a mask of the
    rising and falling edges to be updated and preserve the unmasked edges
    when updating.
    
    Signed-off-by: default avatarIan Abbott <abbotti@mev.co.uk>
    Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
    110f9e68