• Adam Thomson's avatar
    mfd: da9063: Fix revision handling to correctly select reg tables · 091c6110
    Adam Thomson authored
    The current implementation performs checking in the i2c_probe()
    function of the variant_code but does this immediately after the
    containing struct has been initialised as all zero. This means the
    check for variant code will always default to using the BB tables
    and will never select AD. The variant code is subsequently set
    by device_init() and later used by the RTC so really it's a little
    fortunate this mismatch works.
    
    This update adds raw I2C read access functionality to read the chip
    and variant/revision information (common to all revisions) so that
    it can subsequently correctly choose the proper regmap tables for
    real initialisation.
    Signed-off-by: default avatarAdam Thomson <Adam.Thomson.Opensource@diasemi.com>
    Signed-off-by: default avatarLee Jones <lee.jones@linaro.org>
    091c6110
da9063-i2c.c 12.4 KB