• Samu Onkalo's avatar
    lis3: selftest support · 2db4a76d
    Samu Onkalo authored
    Implement selftest feature as specified by chip manufacturer.  Control:
    read selftest sysfs entry
    
    Response: "OK x y z" or "FAIL x y z"
    
    where x, y, and z are difference between selftest mode and normal mode.
    Test is passed when values are within acceptance limit values.
    
    Acceptance limits are provided via platform data.  See chip spesifications
    for acceptance limits.  If limits are not properly set, OK / FAIL decision
    is meaningless.  However, userspace application can still make decision
    based on the numeric x, y, z values.
    
    Selftest is meant for HW diagnostic purposes.  It is not meant to be
    called during normal use of the chip.  It may cause false interrupt
    events.  Selftest mode delays polling of the normal results but it doesn't
    cause wrong values.  Chip must be in static state during selftest.  Any
    acceration during the test causes most probably failure.
    Signed-off-by: default avatarSamu Onkalo <samu.p.onkalo@nokia.com>
    Acked-by: default avatarÉric Piel <Eric.Piel@tremplin-utc.net>
    Cc: Pavel Machek <pavel@ucw.cz>
    Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
    Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
    2db4a76d
lis3lv02d.h 5.81 KB