diff options
author | Johan Hovold <johan@hovoldconsulting.com> | 2016-04-23 18:47:24 +0200 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@google.com> | 2016-04-25 11:08:30 -0700 |
commit | b15d97d77017dc168c74c5e9aacfe14ff74dcbe9 (patch) | |
tree | 4fe55aad777a3d5614cb4e61e0bf54a7fe63b5aa /drivers/staging/greybus/hd.c | |
parent | 844fcbfeb6491d95b7e19b4705f9eb576a210536 (diff) | |
download | op-kernel-dev-b15d97d77017dc168c74c5e9aacfe14ff74dcbe9.zip op-kernel-dev-b15d97d77017dc168c74c5e9aacfe14ff74dcbe9.tar.gz |
greybus: core: add module abstraction
Add Greybus module abstraction that will be used to implement controlled
module removal (eject) and represent module geometry.
Greybus module devices correspond to physical modules and have one or
more interfaces. Modules have an id that is identical to the id of their
primary interface, which in turn is the interface with lowest numbered
id. The module name is constructed from the bus and module id:
<bus_id>-<module_id>
Interfaces, bundles, and control devices are consequently renamed as
<bus_id>-<module_id>.<interface_id>
<bus_id>-<module_id>.<interface_id>.<bundle_id>
<bus_id>-<module_id>.<interface_id>.ctrl
As before, interface ids (and therefore in a sense now also module ids)
correspond to physical interface positions on the frame.
Modules have the following attributes:
module_id
num_interfaces
where module_id is the id of the module and num_interface the number of
interfaces the module has.
Note that until SVC module-size detection has been implemented, all
interfaces are considered to be part of 1x2 modules. Specifically, the
two interfaces of a 2x2 module will be presented as two 1x2 modules for
now.
Signed-off-by: Johan Hovold <johan@hovoldconsulting.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Diffstat (limited to 'drivers/staging/greybus/hd.c')
-rw-r--r-- | drivers/staging/greybus/hd.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/staging/greybus/hd.c b/drivers/staging/greybus/hd.c index 2c13860..762cc03 100644 --- a/drivers/staging/greybus/hd.c +++ b/drivers/staging/greybus/hd.c @@ -89,7 +89,7 @@ struct gb_host_device *gb_hd_create(struct gb_hd_driver *driver, hd->bus_id = ret; hd->driver = driver; - INIT_LIST_HEAD(&hd->interfaces); + INIT_LIST_HEAD(&hd->modules); INIT_LIST_HEAD(&hd->connections); ida_init(&hd->cport_id_map); hd->buffer_size_max = buffer_size_max; |