scripts: Dynamically add driver subsystems to subsystems list

This change extends the parse_syscalls.py script to scan for a
__subsystem sentinal added to driver api declarations. It thens
generates a list that is passed into gen_kobject_list.py to extend
the subsystems list. This allows subsystems to be declared in the
code instead of a separate python list and provides a mechanism for
defining out-of-tree subsystems.

Signed-off-by: Corey Wharton <coreyw7@fb.com>
This commit is contained in:
Corey Wharton 2020-02-29 14:51:42 -08:00 committed by Andrew Boie
commit ccd15df510
5 changed files with 90 additions and 33 deletions

View file

@ -132,6 +132,11 @@
#define __syscall
#endif /* #ifndef ZTEST_UNITTEST */
/* Used as a sentinel by parse_syscalls.py to identify what API structs
* define driver subsystems.
*/
#define __subsystem
#ifndef BUILD_ASSERT
/* compile-time assertion that makes the build fail */
#define BUILD_ASSERT(EXPR) \