blob: 3b3f421b244f4739011a4b29731393acd44f4d2c [file] [log] [blame]
Greg Kroah-Hartmandf671552014-12-21 14:10:26 -08001/*
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" */
13struct gb_module {
14 struct device dev;
Greg Kroah-Hartmandf671552014-12-21 14:10:26 -080015 u8 module_id; /* Physical location within the Endo */
16};
17#define to_gb_module(d) container_of(d, struct gb_module, dev)
18
19struct greybus_host_device;
20
21/* Greybus "private" definitions */
Greg Kroah-Hartmana4d91502015-04-07 20:27:15 +020022struct gb_module *gb_module_find(struct greybus_host_device *hd, u8 module_id);
23struct gb_module *gb_module_create(struct device *parent, u8 module_id);
24void gb_module_remove_all(struct gb_endo *endo);
Greg Kroah-Hartmandf671552014-12-21 14:10:26 -080025
Greg Kroah-Hartmandf671552014-12-21 14:10:26 -080026#endif /* __MODULE_H */