slimbus: Support more than 1 clients to use a channel

There is a possibility that 2 or more clients can use the same
channel, one as producer and the other(s) as sink.
The slim_query_ch API gives the ability for a client to specify
channel number it needs to use.
Reference counting is used to make sure channel is not deallocated
until the last caller deallocates it.
Another counter (def) is used to keep track of channel definition and
removal. Channel definition is sent to hardware when the producer
and/or consumer(s) connects ports to the channel. Channel is only
removed when all clients indicate they want to remove channel.

Change-Id: Ic5084680419e16ee238d2e62c02e5430170b387d
Signed-off-by: Sagar Dharia <sdharia@codeaurora.org>
2 files changed