• Dave Martin's avatar
    ARM: bL_switcher: Add synchronous enable/disable interface · c0f43751
    Dave Martin authored
    Some subsystems will need to know for sure whether the switcher is
    enabled or disabled during certain critical regions.
    
    This patch provides a simple mutex-based mechanism to discover
    whether the switcher is enabled and temporarily lock out further
    enable/disable:
    
      * bL_switcher_get_enabled() returns true iff the switcher is
        enabled and temporarily inhibits enable/disable.
    
      * bL_switcher_put_enabled() permits enable/disable of the switcher
        again after a previous call to bL_switcher_get_enabled().
    Signed-off-by: default avatarDave Martin <dave.martin@linaro.org>
    Signed-off-by: default avatarNicolas Pitre <nico@linaro.org>
    c0f43751
bL_switcher.c 16 KB