• Viresh Kumar's avatar
    clk: clk-gate: Create clk_gate_endisable() · fbc42aab
    Viresh Kumar authored
    This patch tries to remove duplicate code for clk_gate clocks. This creates
    another routine clk_gate_endisable() which will take care of enable/disable
    clock with knowledge of CLK_GATE_SET_TO_DISABLE flag.
    
    It works on following logic:
    
    For enabling clock, enable = 1
    	set2dis = 1	-> clear bit	-> set = 0
    	set2dis = 0	-> set bit	-> set = 1
    
    For disabling clock, enable = 0
    	set2dis = 1	-> set bit	-> set = 1
    	set2dis = 0	-> clear bit	-> set = 0
    
    So, result is always: enable xor set2dis.
    Signed-off-by: default avatarViresh Kumar <viresh.kumar@st.com>
    Signed-off-by: default avatarMike Turquette <mturquette@linaro.org>
    fbc42aab
Name
Last commit
Last update
Documentation Loading commit data...
arch Loading commit data...
block Loading commit data...
crypto Loading commit data...
drivers Loading commit data...
firmware Loading commit data...
fs Loading commit data...
include Loading commit data...
init Loading commit data...
ipc Loading commit data...
kernel Loading commit data...
lib Loading commit data...
mm Loading commit data...
net Loading commit data...
samples Loading commit data...
scripts Loading commit data...
security Loading commit data...
sound Loading commit data...
tools Loading commit data...
usr Loading commit data...
virt/kvm Loading commit data...
.gitignore Loading commit data...
.mailmap Loading commit data...
COPYING Loading commit data...
CREDITS Loading commit data...
Kbuild Loading commit data...
Kconfig Loading commit data...
MAINTAINERS Loading commit data...
Makefile Loading commit data...
README Loading commit data...
REPORTING-BUGS Loading commit data...