• Jeff LaBundy's avatar
    mfd: iqs62x: Do not poll during ATI · 02e550d5
    Jeff LaBundy authored
    After loading firmware, the driver triggers ATI (calibration) with
    the newly loaded register configuration in place. Next, the driver
    polls a register field to ensure ATI completed in a timely fashion
    and that the device is ready to sense.
    
    However, communicating with the device over I2C while ATI is under-
    way may induce noise in the device and cause ATI to fail. As such,
    the vendor recommends not to poll the device during ATI.
    
    To solve this problem, let the device naturally signal to the host
    that ATI is complete by way of an interrupt. A completion prevents
    the sub-devices from being registered until this happens.
    
    The former logic that scaled ATI timeout and filter settling delay
    is not carried forward with the new implementation, as it produces
    overly conservative delays at lower clock rates. Instead, a single
    pair of delays that covers all cases is used.
    Signed-off-by: default avatarJeff LaBundy <jeff@labundy.com>
    Signed-off-by: default avatarLee Jones <lee.jones@linaro.org>
    02e550d5
iqs62x.c 26.1 KB