51e93aea65
We already have code to parse Endo ID, lets use it to create modules at run time instead of creating them from a static array. Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org> Reviewed-by: Alex Elder <elder@linaro.org> Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
27 lines
630 B
C
27 lines
630 B
C
/*
|
|
* 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 */
|
|
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);
|
|
|
|
#endif /* __MODULE_H */
|