diff options
Diffstat (limited to 'drivers/thunderbolt/tb.h')
-rw-r--r-- | drivers/thunderbolt/tb.h | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/drivers/thunderbolt/tb.h b/drivers/thunderbolt/tb.h new file mode 100644 index 000000000000..6055dfd713fc --- /dev/null +++ b/drivers/thunderbolt/tb.h | |||
@@ -0,0 +1,35 @@ | |||
1 | /* | ||
2 | * Thunderbolt Cactus Ridge driver - bus logic (NHI independent) | ||
3 | * | ||
4 | * Copyright (c) 2014 Andreas Noever <andreas.noever@gmail.com> | ||
5 | */ | ||
6 | |||
7 | #ifndef TB_H_ | ||
8 | #define TB_H_ | ||
9 | |||
10 | #include "ctl.h" | ||
11 | |||
12 | /** | ||
13 | * struct tb - main thunderbolt bus structure | ||
14 | */ | ||
15 | struct tb { | ||
16 | struct mutex lock; /* | ||
17 | * Big lock. Must be held when accessing cfg or | ||
18 | * any struct tb_switch / struct tb_port. | ||
19 | */ | ||
20 | struct tb_nhi *nhi; | ||
21 | struct tb_ctl *ctl; | ||
22 | struct workqueue_struct *wq; /* ordered workqueue for plug events */ | ||
23 | bool hotplug_active; /* | ||
24 | * tb_handle_hotplug will stop progressing plug | ||
25 | * events and exit if this is not set (it needs to | ||
26 | * acquire the lock one more time). Used to drain | ||
27 | * wq after cfg has been paused. | ||
28 | */ | ||
29 | |||
30 | }; | ||
31 | |||
32 | struct tb *thunderbolt_alloc_and_start(struct tb_nhi *nhi); | ||
33 | void thunderbolt_shutdown_and_free(struct tb *tb); | ||
34 | |||
35 | #endif | ||