• Matt Ranostay's avatar
    iio: lidar: return -EINVAL on invalid signal · 45a6b821
    Matt Ranostay authored
    Returning zero from the measurment function has the side effect of
    corrupting the triggered buffer readings, better to use -EINVAL than
    a zero measurement reading.
    
    The INVALID status happens even it isn't out of range
    sometimes roughly once every second or two. This can be from an
    invalid second signal return path. Hence there are spurious zero
    readings from the triggered buffer, and warning messages in the kernel
    log.
    Signed-off-by: default avatarMatt Ranostay <mranostay@gmail.com>
    Signed-off-by: default avatarJonathan Cameron <jic23@kernel.org>
    45a6b821
pulsedlight-lidar-lite-v2.c 6.32 KB