clk: imx: gate2: Allow single bit gating clock
authorAbel Vesa <abel.vesa@nxp.com>
Wed, 15 Apr 2020 08:02:45 +0000 (11:02 +0300)
committerShawn Guo <shawnguo@kernel.org>
Wed, 29 Apr 2020 02:00:05 +0000 (10:00 +0800)
commit1e54afe9fcfe99cf913526cbcb0128e4a91d0621
treeba1c648c0bde40d28729c4b7bbbeea975f70e0c7
parent9558b51ab739920aaf3c400d2df29e5ca4f19ec5
clk: imx: gate2: Allow single bit gating clock

Audiomix on i.MX8MP registers two gates that share the same enable count
but use the same bit to control the gate instead of two bits. By adding
the flag IMX_CLK_GATE2_SINGLE_BIT we allow the gate2 to use the generic
gate ops for enable, disable and is_enabled.
For the disable_unused, nothing happens if this flag is specified.

Signed-off-by: Abel Vesa <abel.vesa@nxp.com>
Reviewed-by: Stephen Boyd <sboyd@kernel.org>
Signed-off-by: Shawn Guo <shawnguo@kernel.org>
drivers/clk/imx/clk-gate2.c
drivers/clk/imx/clk.h