diag: dci: Remove Event Code from DCI Event

Events received on the DCI channel are appended with an event code
and are sent to the DCI clients. This is not required and this change
removes the Event code from the DCI events. Also simplified log mask
search for DCI clients.

Change-Id: I00da0885c58819e150cf8c1c689dfe942b719669
Signed-off-by: Ravi Aravamudhan <aravamud@codeaurora.org>
diag: dci: Clear DCI Client Event/Log mask on Exit

If DCI client exits then log and event masks set
by that particular client should be cleared
and send to peripherals. Diag smd constructor
should be based on number of smd dci channels.
Finding of valid client index move into a
function.

Change-Id: I1dcc896c5648d9869c5f33d4534c6d605f322a9c
Signed-off-by: Mohit Aggarwal <maggarwa@codeaurora.org>
diag: dci: Process DCI packet during USB disconnect

Diag driver drops the packet from the user space when the logging
mode is USB and the USB is disconnected. As a result the DCI
packet coming from the user space is dropped when USB is disconnected.
This change adds a condition to allow DCI data to be processed in this
condition. Also, reset the smd write retry count for every log
equipment ID.

Change-Id: I814d06bc0d2fd755d3c7223ff415b6f38dea8613
Signed-off-by: Ravi Aravamudhan <aravamud@codeaurora.org>
diag: dci: Add new Logs and Events API for DCI

Diag Consumer Interface now has new APIs for disabling all logs and
events and also to query the log codes and event IDs for a
particular client. Fixed issues in Diag Driver where memory was not
freed up in error conditions and a mutex was released incorrectly.
Also added mutexes at places where DCI Health Statistics members
are modified.

Change-Id: I6da13487782b77c72edc93106165cd9c3d9682d9
Signed-off-by: Mohit Aggarwal <maggarwa@codeaurora.org>