]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
greybus: add test_sink driver
authorGreg Kroah-Hartman <greg@kroah.com>
Sun, 14 Sep 2014 19:27:19 +0000 (12:27 -0700)
committerGreg Kroah-Hartman <greg@kroah.com>
Sun, 14 Sep 2014 19:27:19 +0000 (12:27 -0700)
drivers/staging/greybus/Makefile
drivers/staging/greybus/test_sink.c [new file with mode: 0644]

index 0550e219af3dc02994fe9540e91e79b6b5986832..2e048a010a2361933ff360b384cfd17e15e95523 100644 (file)
@@ -11,6 +11,7 @@ greybus-y :=  core.o          \
 
 obj-m += greybus.o
 obj-m += es1-ap-usb.o
+obj-m += test_sink.o
 
 KERNELVER              ?= $(shell uname -r)
 KERNELDIR              ?= /lib/modules/$(KERNELVER)/build
diff --git a/drivers/staging/greybus/test_sink.c b/drivers/staging/greybus/test_sink.c
new file mode 100644 (file)
index 0000000..932c169
--- /dev/null
@@ -0,0 +1,38 @@
+/*
+ * Test "sink" Greybus driver.
+ *
+ * Copyright 2014 Google Inc.
+ *
+ * Released under the GPLv2 only.
+ */
+
+#include <linux/kernel.h>
+#include <linux/module.h>
+#include <linux/slab.h>
+#include "greybus.h"
+
+struct test_device {
+       struct greybus_device *gdev;
+};
+
+int gb_register_cport_complete(struct greybus_device *gdev,
+                              gbuf_complete_t handler, int cport,
+                              void *context);
+void gb_deregister_cport_complete(int cport);
+
+
+
+static int test_init(void)
+{
+       return 0;
+}
+
+static void test_exit(void)
+{
+}
+
+module_init(test_init);
+module_exit(test_exit);
+
+MODULE_LICENSE("GPL");
+MODULE_AUTHOR("Greg Kroah-Hartman <gregkh@linuxfoundation.org>");