• Petlozu Pravareshwar's avatar
    soc/tegra: pmc: Fix dual edge triggered wakes · 1ddb8f6d
    Petlozu Pravareshwar authored
    When a wake event is defined to be triggered on both positive and
    negative edge of the input wake signal, it is crucial to know the
    current state of the signal when going into suspend. The intended way to
    obtain the current state of the wake signals is to read the
    WAKE_AOWAKE_SW_STATUS register, which should contains the raw state of
    the wake signals.
    
    However, this register is edge triggered, an edge will not be generated
    for signals that are already asserted prior to the assertion of
    WAKE_LATCH_SW.
    
    To workaround this, change the polarity of the wake level from '0' to
    '1' while latching the signals, as this will generate an edge for
    signals that are set to '1'.
    Signed-off-by: default avatarStefan Kristiansson <stefank@nvidia.com>
    Signed-off-by: default avatarPetlozu Pravareshwar <petlozup@nvidia.com>
    Signed-off-by: default avatarThierry Reding <treding@nvidia.com>
    1ddb8f6d
pmc.c 116 KB