2014-12-21 15:10:26 -07:00
|
|
|
/*
|
|
|
|
* Greybus module code
|
|
|
|
*
|
|
|
|
* Copyright 2014 Google Inc.
|
|
|
|
*
|
|
|
|
* Released under the GPLv2 only.
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef __MODULE_H
|
|
|
|
#define __MODULE_H
|
|
|
|
|
|
|
|
/* Greybus "public" definitions" */
|
|
|
|
struct gb_module {
|
|
|
|
struct device dev;
|
|
|
|
u8 module_id; /* Physical location within the Endo */
|
|
|
|
};
|
|
|
|
#define to_gb_module(d) container_of(d, struct gb_module, dev)
|
|
|
|
|
|
|
|
struct greybus_host_device;
|
|
|
|
|
|
|
|
/* Greybus "private" definitions */
|
2015-04-07 12:27:15 -06:00
|
|
|
struct gb_module *gb_module_find(struct greybus_host_device *hd, u8 module_id);
|
|
|
|
struct gb_module *gb_module_create(struct device *parent, u8 module_id);
|
|
|
|
void gb_module_remove_all(struct gb_endo *endo);
|
2014-12-21 15:10:26 -07:00
|
|
|
|
|
|
|
#endif /* __MODULE_H */
|