Greg Kroah-Hartman | df67155 | 2014-12-21 14:10:26 -0800 | [diff] [blame] | 1 | /* |
| 2 | * Greybus module code |
| 3 | * |
| 4 | * Copyright 2014 Google Inc. |
| 5 | * |
| 6 | * Released under the GPLv2 only. |
| 7 | */ |
| 8 | |
| 9 | #ifndef __MODULE_H |
| 10 | #define __MODULE_H |
| 11 | |
| 12 | /* Greybus "public" definitions" */ |
| 13 | struct gb_module { |
| 14 | struct device dev; |
Greg Kroah-Hartman | df67155 | 2014-12-21 14:10:26 -0800 | [diff] [blame] | 15 | u8 module_id; /* Physical location within the Endo */ |
| 16 | }; |
| 17 | #define to_gb_module(d) container_of(d, struct gb_module, dev) |
| 18 | |
| 19 | struct greybus_host_device; |
| 20 | |
| 21 | /* Greybus "private" definitions */ |
Greg Kroah-Hartman | a4d9150 | 2015-04-07 20:27:15 +0200 | [diff] [blame] | 22 | struct gb_module *gb_module_find(struct greybus_host_device *hd, u8 module_id); |
| 23 | struct gb_module *gb_module_create(struct device *parent, u8 module_id); |
| 24 | void gb_module_remove_all(struct gb_endo *endo); |
Greg Kroah-Hartman | df67155 | 2014-12-21 14:10:26 -0800 | [diff] [blame] | 25 | |
Greg Kroah-Hartman | df67155 | 2014-12-21 14:10:26 -0800 | [diff] [blame] | 26 | #endif /* __MODULE_H */ |