• MyungJoo Ham's avatar
    mfd: Support LP3974 RTC · 337ce5d1
    MyungJoo Ham authored
    The first releases of LP3974 have a large delay in RTC registers,
    which requires 2 seconds of delay after writing to a rtc register
    (recommended by National Semiconductor's engineers)
    before reading it.
    
    If "rtc_delay" field of the platform data is true, the rtc driver
    assumes that such delays are required. Although we have not seen
    LP3974s without requiring such delays, we assume that such LP3974s
    will be released soon (or they have done so already) and they are
    supported by "lp3974" without setting "rtc_delay" at the platform
    data.
    
    This patch adds delays with msleep when writing values to RTC registers
    if the platform data has rtc_delay set.
    Signed-off-by: default avatarMyungJoo Ham <myungjoo.ham@samsung.com>
    Signed-off-by: default avatarKyungmin Park <kyungmin.park@samsung.com>
    Reviewed-by: default avatarMark Brown <broonie@opensource.wolfsonmicro.com>
    Signed-off-by: default avatarSamuel Ortiz <sameo@linux.intel.com>
    337ce5d1
max8998.c 8.26 KB