When one ISI channel is receiving data, if an other process
just open it at the same time and then close, it will lead
to this channel hang. The reason is soft reset in release
callback, so it make the channel stop work. Add an counter
for open isi channel and really soft reset the channel when
the counter equal to zero.
Signed-off-by: Guoniu.Zhou <guoniu.zhou@nxp.com>
Reviewed-by: Robby.Cai <robby.cai@nxp.com>
init_waitqueue_head(&mxc_isi->irq_queue);
spin_lock_init(&mxc_isi->slock);
mutex_init(&mxc_isi->lock);
+ atomic_set(&mxc_isi->open_count, 0);
mxc_isi->clk = devm_clk_get(dev, NULL);
if (IS_ERR(mxc_isi->clk)) {