• Luca Ceresoli's avatar
    watchdog: max77620: Add support for the max77714 variant · 254099d8
    Luca Ceresoli authored
    The MAX77714 is a MFD chip whose watchdog has the same programming
    procedures as the MAX77620 watchdog, but most register offsets and bit
    masks are different, as well as some features.
    
    Support the MAX77714 watchdog by adding a variant description table holding
    the differences.
    
    All the features implemented by this driver are available on the MAX77714
    except for the lack of a WDTOFFC bit. Instead of using a "HAS_*" flag we
    handle this by holding in the cnfg_glbl2_cfg_bits struct field the bits
    (i.e. the features) to enable in the CNFG_GLBL2 register. These bits differ
    among the two models. This implementation allows to avoid any conditional
    code, keeping the execution flow unchanged.
    Signed-off-by: default avatarLuca Ceresoli <luca@lucaceresoli.net>
    Reviewed-by: default avatarGuenter Roeck <linux@roeck-us.net>
    Signed-off-by: default avatarLee Jones <lee.jones@linaro.org>
    254099d8
max77620_wdt.c 6.94 KB