• H Hartley Sweeten's avatar
    staging: comedi: ni_stc.h: remove 'ao_unipolar' flag from ni_board_struct · fed3c23b
    H Hartley Sweeten authored
    This member of the boardinfo for the NI MIO drivers is used to indicate if
    the ranges for the analog output subdevice (ao_range_table in the boardinfo)
    includes any unipolar ranges. If it's not set, the ao_range_table only has
    bipolar ranges.
    
    The 'ao_unipolar' flag is checked when munging the ao data values from the
    user so that the values for bipolar ranges are converted to 2's complement
    values before they are written to the hardware.
    
    The flag is also used when programming the analog output configuration on
    non-M series boards for bipolar/unipolar and external reference operation.
    
    Simplify the driver a bit by removing this boardinfo flag and just using
    the comedi_range_is_bipolar() and comedi_range_is_external() helpers to
    check the range directly.
    Signed-off-by: default avatarH Hartley Sweeten <hsweeten@visionengravers.com>
    Reviewed-by: default avatarIan Abbott <abbotti@mev.co.uk>
    Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
    fed3c23b
ni_atmio.c 9.65 KB