greybus: endo: hook up endos into the device tree
authorGreg Kroah-Hartman <gregkh@google.com>
Tue, 7 Apr 2015 18:27:15 +0000 (20:27 +0200)
committerGreg Kroah-Hartman <gregkh@google.com>
Thu, 9 Apr 2015 20:50:09 +0000 (22:50 +0200)
commita4d9150cbaafd0d58eff54ea928d155ae582aa9c
tree4c112329ee575fd360419f1f30c1179c4fe93019
parent0f035acdedcb4f016c2b7cc23758d9191713d951
greybus: endo: hook up endos into the device tree

This hooks up the endo, and modules, into the device tree.  All modules
for a specific endo are created when the host device is initialized.
When an interface is registered, the correct module for it is found and
that module is used for the sysfs tree.  When the interface is removed,
the reference on the module is dropped.

When the host device goes away, the whole endo and modules are removed
at once.

Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Reviewed-by: Alex Elder <elder@linaro.org>
drivers/staging/greybus/core.c
drivers/staging/greybus/endo.c
drivers/staging/greybus/greybus.h
drivers/staging/greybus/interface.c
drivers/staging/greybus/module.c
drivers/staging/greybus/module.h