aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--include/samsung-ipc.h1
-rw-r--r--samsung-ipc/ipc.c26
2 files changed, 26 insertions, 1 deletions
diff --git a/include/samsung-ipc.h b/include/samsung-ipc.h
index 9d638ec..d495ba2 100644
--- a/include/samsung-ipc.h
+++ b/include/samsung-ipc.h
@@ -30,6 +30,7 @@
#define IPC_CLIENT_TYPE_FMT 0x00
#define IPC_CLIENT_TYPE_RFS 0x01
+#define IPC_CLIENT_TYPE_DUMMY 0x02
/*
* Structures
diff --git a/samsung-ipc/ipc.c b/samsung-ipc/ipc.c
index f7e0379..5387611 100644
--- a/samsung-ipc/ipc.c
+++ b/samsung-ipc/ipc.c
@@ -153,7 +153,18 @@ complete:
return index;
}
-struct ipc_client *ipc_client_create(int type)
+
+static struct ipc_client *ipc_dummy_client_create(void)
+{
+ struct ipc_client *client = NULL;
+
+ client = (struct ipc_client *) calloc(1, sizeof(struct ipc_client));
+ client->type = IPC_CLIENT_TYPE_DUMMY;
+
+ return client;
+}
+
+static struct ipc_client *ipc_transport_client_create(int type)
{
struct ipc_client *client = NULL;
unsigned int device_index;
@@ -205,6 +216,19 @@ complete:
return client;
}
+struct ipc_client *ipc_client_create(int type)
+{
+ switch (type) {
+ case IPC_CLIENT_TYPE_RFS:
+ case IPC_CLIENT_TYPE_FMT:
+ return ipc_transport_client_create(type);
+ case IPC_CLIENT_TYPE_DUMMY:
+ return ipc_dummy_client_create();
+ default:
+ return NULL;
+ }
+}
+
int ipc_client_destroy(struct ipc_client *client)
{
if (client == NULL)