summaryrefslogtreecommitdiff
path: root/include/linux/soundwire/sdw_type.h
diff options
context:
space:
mode:
authorVinod Koul <vinod.koul@intel.com>2017-12-14 11:19:33 +0530
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2017-12-19 11:14:56 +0100
commit9251345dca24b62b14e4e53e6ee3387ae7d9c790 (patch)
tree6b56a307bbdc54110bcdd1f624cfe54c98ffa19b /include/linux/soundwire/sdw_type.h
parent8ecf4264efef64303d6b6c13d35f7c46024fb2ff (diff)
soundwire: Add SoundWire bus type
This adds the base SoundWire bus type, bus and driver registration. along with changes to module device table for new SoundWire device type. Signed-off-by: Sanyog Kale <sanyog.r.kale@intel.com> Reviewed-by: Philippe Ombredanne <pombredanne@nexb.com> Acked-By: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Reviewed-by: Takashi Iwai <tiwai@suse.de> Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Signed-off-by: Vinod Koul <vinod.koul@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'include/linux/soundwire/sdw_type.h')
-rw-r--r--include/linux/soundwire/sdw_type.h19
1 files changed, 19 insertions, 0 deletions
diff --git a/include/linux/soundwire/sdw_type.h b/include/linux/soundwire/sdw_type.h
new file mode 100644
index 000000000000..9fd553e553e9
--- /dev/null
+++ b/include/linux/soundwire/sdw_type.h
@@ -0,0 +1,19 @@
+// SPDX-License-Identifier: GPL-2.0
+// Copyright(c) 2015-17 Intel Corporation.
+
+#ifndef __SOUNDWIRE_TYPES_H
+#define __SOUNDWIRE_TYPES_H
+
+extern struct bus_type sdw_bus_type;
+
+#define drv_to_sdw_driver(_drv) container_of(_drv, struct sdw_driver, driver)
+
+#define sdw_register_driver(drv) \
+ __sdw_register_driver(drv, THIS_MODULE)
+
+int __sdw_register_driver(struct sdw_driver *drv, struct module *);
+void sdw_unregister_driver(struct sdw_driver *drv);
+
+int sdw_slave_modalias(const struct sdw_slave *slave, char *buf, size_t size);
+
+#endif /* __SOUNDWIRE_TYPES_H */