1 // SPDX-License-Identifier: GPL-2.0
2 // Copyright(c) 2015-17 Intel Corporation.
3 
4 #ifndef __SOUNDWIRE_TYPES_H
5 #define __SOUNDWIRE_TYPES_H
6 
7 extern struct bus_type sdw_bus_type;
8 
9 #define drv_to_sdw_driver(_drv) container_of(_drv, struct sdw_driver, driver)
10 
11 #define sdw_register_driver(drv) \
12 	__sdw_register_driver(drv, THIS_MODULE)
13 
14 int __sdw_register_driver(struct sdw_driver *drv, struct module *);
15 void sdw_unregister_driver(struct sdw_driver *drv);
16 
17 int sdw_slave_modalias(const struct sdw_slave *slave, char *buf, size_t size);
18 
19 #endif /* __SOUNDWIRE_TYPES_H */
20