1
0
Fork 0
Commit Graph

1397 Commits (2f3db927cdf7627aa5359ff46c80ab72f7971980)

Author SHA1 Message Date
Viresh Kumar 2f3db927cd greybus: don't use %h and %hh for printing short and char variables
Because the width of our fields is already known, we can use %0Nx (for
hex) to print N bytes and %u (for unsigned decimal), instead of using %h
and %hh, which isn't that readable.

This patch makes following changes:
- s/%hx/%04x
- s/%04hx/%04x
- s/%hhx/%02x
- s/%02hhx/%02x
- s/%hhu/%u
- s/%hu/%u
- s/%x/%02x for u8 value (only at a single place)

Suggested-by: Johan Hovold <johan@hovoldconsulting.com>
Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
Reviewed-by: Johan Hovold <johan@hovoldconsulting.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
2015-12-04 16:23:36 -08:00
Viresh Kumar 4aac6c5a14 greybus: svc: Use -EIO instead of -EINVAL for unipro errors
-EIO fits better here, rather than -EINVAL as the arguments to the
routine itself are valid, just that we failed while doing unipro
transfers.

Suggested-by: Johan Hovold <johan@hovoldconsulting.com>
Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
Reviewed-by: Johan Hovold <johan@hovoldconsulting.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
2015-12-04 16:23:36 -08:00
Viresh Kumar c5b6df9c8d greybus: Documentation: Arrange entries in alphabetical order
The order of entries in sysfs-bus-greybus file doesn't match the order
files/directories in sysfs on a real board. More specifically, N-svc
comes at last and ap_interface_id comes before endo_id within the svc.

Fix that.

Reviewed-by: Johan Hovold <johan@hovoldconsulting.com>
Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
2015-12-04 16:22:40 -08:00
Johan Hovold c29c016f7e greybus: core: add bundle id to bundle uevents
Add the bundle id to bundle uevents.

This is needed to identify bundles that are being removed (e.g. at
hot-unplug).

Signed-off-by: Johan Hovold <johan@hovoldconsulting.com>
Reviewed-by: Viresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
2015-12-04 15:37:59 -08:00
Johan Hovold c5e6b05ce4 greybus: core: add interface id to interface and bundle uevents
Add the interface id to interface and bundle uevents.

This is needed to identify interfaces that are being removed (e.g. at
hot-unplug).

Signed-off-by: Johan Hovold <johan@hovoldconsulting.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
2015-12-03 17:25:28 -08:00
Johan Hovold f0960d05f5 greybus: core: add bus id to uevents
Add the bus id to all greybus uevents.

This is needed to identify devices that are being removed (e.g. at
hot-unplug).

Signed-off-by: Johan Hovold <johan@hovoldconsulting.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
2015-12-03 17:25:28 -08:00
Johan Hovold 1cacb456fd greybus: svc: flush workqueue at connection exit
Make sure to flush the workqueue from hotplug and hotunplug events when
the svc connection is tore down.

Signed-off-by: Johan Hovold <johan@hovoldconsulting.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
2015-12-03 15:38:54 -08:00
Bryan O'Donoghue 8e1d6c336d greybus: loopback: drop bus aggregate calculation
At some point we had a statement in a Jira work item to pull out 'bus
level' data from greybus and to have messages to different interfaces be
synchronized with respect to each other. Synchronizing threads with respect
to each other is slow and it turns out we can get the same 'bus level'
stastics by making the user-space test application smarter.

That's great news for the in-kernel code since it means we can cut out a
whole lot of code to-do with calculating 'bus level' aggregate data and we
can stop forcing threads to hit a rendezvous before sending out another
loopback operation.

So this patch drops bus level aggregates in favour of doing that in
user-space. It subtracts a lot of code and cycles that in practice nobody
cares about anyway.

Signed-off-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
2015-12-03 15:37:24 -08:00
Bryan O'Donoghue 9673dcebe4 greybus: loopback: Drop unused timeval variables
start and end aren't used and should be dropped.

Signed-off-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
2015-12-03 15:37:24 -08:00
Bryan O'Donoghue d6a1a3b5ea greybus: loopback: Move latency_ts initialization to transfer routine
Initializing the bridge specific latency variables is only relevant to the
transfer operation, so make it loopback-transfer specific.

Signed-off-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
2015-12-03 15:37:24 -08:00
Bryan O'Donoghue d9fb3754ec greybus: loopback: Relax locking during loopback operations
Currently a per-connection mutex is held during calls to
gb_operation_send_sync. It is not necessary to hold this lock and later
patches supporting multiple-outstanding bi-directional operations need to
take the per-connection lock and the gb_dev level lock. Since gb_dev must
always be taken before per-connection locks, it is both desirable and safe
to drop the lock now.

Signed-off-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
2015-12-03 15:37:24 -08:00
Rui Miguel Silva 1700507d8c greybus: lights: default value for v4l2 flash controls
V4l2 flash will return erro ERANGE if val(which is the default value)
is not defined. Just set it to the max value reported by the module.

Signed-off-by: Rui Miguel Silva <rui.silva@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
2015-12-03 15:33:34 -08:00
Rui Miguel Silva d644181fe6 greybus: lights: avoid channel torch double free
When attaching torch to a flash we release the channel torch resources,
but afterwards we do it again when releasing all the channels.
Just free all the resource at channel release.

Signed-off-by: Rui Miguel Silva <rui.silva@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
2015-12-03 15:33:34 -08:00
Rui Miguel Silva 3f85c787b7 greybus: lights: add v4l2 flash operations
We do not implement any of the v4l2 flash operations, as the default
ones are ok for now, however the init needs anything define, if not it
will return an error. So, just define it and have an error free v4l2
flash init.

Signed-off-by: Rui Miguel Silva <rui.silva@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
2015-12-03 15:33:34 -08:00
Viresh Kumar e6420dac3d greybus: Documentation: Fix N-svc directory name
endo_id was present in place of the directory N-svc, fix it.

Fixes: 4f7b1833e78f ("Documentation/sysfs-bus-greybus: update the bus ABI documentation")
Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
Reviewed-by: Johan Hovold <johan@hovoldconsulting.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
2015-12-03 14:20:49 -08:00
Rui Miguel Silva 31bc2c9bcd greybus: spi: fix transfers bigger than greybus payload
Add helper functions calculate the tx and rx size possible that fit a
greybus payload size and change the operation creation to adjust to that.

Signed-off-by: Rui Miguel Silva <rui.silva@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
2015-12-03 14:20:49 -08:00
Michael Scott 11aa7121ed greybus: build: remove Android makefile
There is no standard way of building a kernel from source in
Android.  Each device/SoC can (and do) implement it in their own way.
To that end, let's remove this makefile and let each device define
how they want to build the modules.

Signed-off-by: Michael Scott <michael.scott@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
2015-12-03 13:47:49 -08:00
Rui Miguel Silva b343f6afd7 greybus: spi: add master and device config operations
Add master and device config operations, one is to merge all the master
operations and the device config will allow to fetch and add devices for
each chip select.

Signed-off-by: Rui Miguel Silva <rui.silva@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
2015-12-02 17:04:58 -08:00
Rui Miguel Silva b455c84655 greybus: spi: add rdwr field to transfer descriptor
Add read and/or write field to transfer descriptor to make it possible
to identify the type of transfer.

Signed-off-by: Rui Miguel Silva <rui.silva@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
2015-12-02 17:04:58 -08:00
Johan Hovold 3e48acac26 greybus: svc: fix racy hotplug handling
Fix racy hotplug handling by serialising all processing of hot-plug and
unplug requests using a single-threaded dedicated workqueue.

This fixes a reported crash during enumeration when processing multiple
events.

The current svc implementation does not handle concurrency at all (e.g.
no interface list lock or refcounting) so we need to use the big hammer
for now.

Note that we will eventually want to process events for different
interfaces in parallel, but that we'd still need a workqueue in order
not to starve other svc requests (e.g. for timesync).

Reported-by: Vaibhav Hiremath <vaibhav.hiremath@linaro.org>
Signed-off-by: Johan Hovold <johan@hovoldconsulting.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
2015-12-02 16:55:45 -08:00
Johan Hovold 57ccd4b087 greybus: svc: defer processing of hot-unplug requests
Defer processing also of hot-unplug events.

This is a step towards serialising hot-plug and unplug event processing.

Signed-off-by: Johan Hovold <johan@hovoldconsulting.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
2015-12-02 16:55:45 -08:00
Johan Hovold 9ae4109e5d greybus: svc: generalise deferred request handling
Clean up and generalise deferred request handling by simply storing a
reference-counted pointer to the operation itself in the work context.

Signed-off-by: Johan Hovold <johan@hovoldconsulting.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
2015-12-02 16:55:45 -08:00
Johan Hovold b4ee82ece8 greybus: svc: clean up interface-remove helper
Pass the svc rather than its connection to the interface remove helper.

Signed-off-by: Johan Hovold <johan@hovoldconsulting.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
2015-12-02 16:55:45 -08:00
Johan Hovold 24456a09a8 greybus: svc: clean up deferred hotplug handler
Rename the hotplug request message, and clarify that the message size
has already been verified by the primary handler.

Also add a debug message that includes the interface id.

Signed-off-by: Johan Hovold <johan@hovoldconsulting.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
2015-12-02 16:55:45 -08:00
Johan Hovold d34a3643fe greybus: svc: clean up hotplug/unplug request handlers
Clean up hotplug/unplug request handlers somewhat.

Also add a debug message to both handlers that includes the interface id.

Signed-off-by: Johan Hovold <johan@hovoldconsulting.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
2015-12-02 16:55:45 -08:00
Viresh Kumar f1e941a6e4 greybus: firmware: Fetch es2 VID/PID to distinguish module vendors
The es2 chip doesn't have VID/PID programmed into the hardware and we
need to hack that up to distinguish different modules and their firmware
packages.

This fetches VID/PID (over firmware protocol) for es2 chip only, when
VID/PID already sent during hotplug are 0.

Since only the bootrom contains a firmware protocol cport, this only
affects bootrom's working and not nuttx.

Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
Reviewed-by: Johan Hovold <johan@hovoldconsulting.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
2015-11-30 08:19:12 -08:00
Johan Hovold 32945d6ecc greybus: Documentation/sysfs: rename interface and bundle attributes
Update the example sysfs-tree layout under Documentation due renamed
interface and bundle attributes.

The interface and bundle "id" attributes have been renamed
"interface_id" and "bundle_id" respectively to make them self
describing. For consistency reasons the bundle class attribute is
renamed as "bundle_class".

.
├── greybus1
│   ├── 1-2
│   │   ├── 1-2.1
│   │   │   ├── bundle_class
│   │   │   ├── bundle_id
│   │   │   └── state
│   │   ├── 1-2.2
│   │   │   ├── bundle_class
│   │   │   ├── bundle_id
│   │   │   └── state
│   │   ├── interface_id
│   │   ├── product_id
│   │   ├── unique_id
│   │   └── vendor_id
│   ├── 1-4
│   │   ├── 1-4.2
│   │   │   ├── bundle_class
│   │   │   ├── bundle_id
│   │   │   ├── gpbridge0
│   │   │   │   ├── gpio
│   │   │   │   │   └── gpiochip490
│   │   │   │   └── i2c-4
│   │   │   └── state
│   │   ├── interface_id
│   │   ├── product_id
│   │   ├── unique_id
│   │   └── vendor_id
│   └── 1-svc
│       ├── ap_intf_id
│       ├── eject
│       ├── endo_id
│       └── unique_id
└── greybus2
    ├── 2-3
    │   ├── 2-3.1
    │   │   ├── bundle_class
    │   │   ├── bundle_id
    │   │   └── state
    │   ├── interface_id
    │   ├── product_id
    │   ├── unique_id
    │   └── vendor_id
    └── 2-svc
        ├── ap_intf_id
        ├── eject
        ├── endo_id
        └── unique_id

Signed-off-by: Johan Hovold <johan@hovoldconsulting.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
2015-11-25 15:46:00 -08:00
Johan Hovold 47091af91e greybus: interface: drop the control bundle
Drop the control bundle and ignore control descriptors when parsing
manifests.

Every interface has a control connection with a well defined remote
CPort 0 and there's no longer any need to create a bundle for it.

As the control connection is setup and enabled before parsing the
manifest, ignore any legacy descriptors for control cports and bundles
in a manifest.

Signed-off-by: Johan Hovold <johan@hovoldconsulting.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
2015-11-25 15:41:44 -08:00
Johan Hovold f2152eb33d greybus: manifest: refactor cport-descriptor release
Add helper function to release cport-descriptors with a given bundle id.

Signed-off-by: Johan Hovold <johan@hovoldconsulting.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
2015-11-25 15:39:16 -08:00
Johan Hovold e1442f6910 greybus: connection: unconditionally enable connections
Remove conditional enabling of connections when binding protocols that
served no purpose as a connection either has no bundle or it has an
interface with a valid device id.

Also remove the now unused GB_PROTOCOL_NO_BUNDLE protocol flag.

This is an intermediate step in moving the protocol binding to
connection_init, but is also needed as the control bundle is going away.

Signed-off-by: Johan Hovold <johan@hovoldconsulting.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
2015-11-25 15:39:16 -08:00
Johan Hovold 7fa530ad1b greybus: control: do not assume a control bundle
The control bundle is going away so update the code.

Also remove defensive WARN_ON which would not just warn if our
implementation is broken, but also leak further memory unnecessarily.

Signed-off-by: Johan Hovold <johan@hovoldconsulting.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
2015-11-25 15:39:16 -08:00
Johan Hovold 35822c04a5 greybus: connection: handle bundle-less connections in svc helpers
The svc connection helper functions should not assume that all dynamic
connections will have a bundle.

This is needed as the control bundle is going away.

Signed-off-by: Johan Hovold <johan@hovoldconsulting.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
2015-11-25 15:39:16 -08:00
Johan Hovold 0f37860de9 greybus: kill the endo
Remove the now unused endo and module code.

Note that the never-implemented serial and version attributes of the
endo can be implemented as svc attributes if needed.

Signed-off-by: Johan Hovold <johan@hovoldconsulting.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
2015-11-25 15:35:59 -08:00
Johan Hovold dc3da5db28 greybus: loopback: remove endo reference
Replace reference to "endo0" and generate the raw-latency filename based
on the host-device bus id instead.

Signed-off-by: Johan Hovold <johan@hovoldconsulting.com>
Reviewed-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
2015-11-25 15:34:19 -08:00
Johan Hovold 684156a9d6 greybus: svc: clean up log messages
Use dev_err and friends with the svc device for messages.
Clean up error messages.
Demote a few warnings to warning level.

Signed-off-by: Johan Hovold <johan@hovoldconsulting.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
2015-11-25 15:34:19 -08:00
Johan Hovold 5ef323846f greybus: hd: fix svc-connection handling
Create the svc connection when registering the host-device and
remove the current svc connection hacks that "upgraded" the svc
connection once the endo id and ap interface id was known.

Note that the old implementation was partly based on a misunderstanding
as it was the remote interface id, rather than the local AP interface id,
that used to define a connection (but we also needed the endo_id).

The remote interface is no longer needed as static connections, such as
the svc connection, are now simply defined by the host-device and host
cport id.

Signed-off-by: Johan Hovold <johan@hovoldconsulting.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
2015-11-25 15:34:19 -08:00
Johan Hovold 87757e325a greybus: protocol: handle static connections
Use host-device device and connection name for log messages, as not all
connections have a bundle.

Note that the "initial" svc connection has never had a bundle.

Signed-off-by: Johan Hovold <johan@hovoldconsulting.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
2015-11-25 15:34:19 -08:00
Johan Hovold 25cdd7aa5e greybus: operation: handle static connections
Use the host-device device and connection name for error messages, as
the operation code can not assume that a connection has a bundle.

Note that the "initial" svc connection has never had a bundle.

Signed-off-by: Johan Hovold <johan@hovoldconsulting.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
2015-11-25 15:34:19 -08:00
Johan Hovold 4c4b502186 greybus: connection: handle static connections
Use host-device device and connection name for log messages rather than
assume that all connections have a bundle (e.g. not true for static
connections).

Note that the "initial" svc connection has never had a bundle.

Signed-off-by: Johan Hovold <johan@hovoldconsulting.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
2015-11-25 15:34:19 -08:00
Johan Hovold 729b260a67 greybus: connection: add name field
Add a name field to connections that can be used in log messages.

A connection always belongs to a host-device (bus) and can be uniquely
identified by its host-device cport id, but include remote interface and
cport id nonetheless on the following format:

	<hd_cport_id>/<intf_id>:<cport_id>

The remote interface and cport id will be zero for static connections.

Signed-off-by: Johan Hovold <johan@hovoldconsulting.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
2015-11-25 15:34:19 -08:00
Johan Hovold 4ec1574ae9 greybus: connection: kill GB_PROTOCOL_SKIP_SVC_CONNECTION
Add helper to determine whether a connection is static, and remove the
protocol flag GB_PROTOCOL_SKIP_SVC_CONNECTION.

Signed-off-by: Johan Hovold <johan@hovoldconsulting.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
2015-11-25 15:34:19 -08:00
Johan Hovold 0daf17b9e4 greybus: connection: fix potential null-deref on create
Make sure that the interface lookup helper can handle static,
bundle-less connections without oopsing when creating further
connections.

Note that the initial svc-connection has always been bundle-less, but
did not trigger an oops as a bundle was created for it before further
connections were created.

Signed-off-by: Johan Hovold <johan@hovoldconsulting.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
2015-11-25 15:34:19 -08:00
Johan Hovold 2566fae6a5 greybus: connection: clean up connection-creation interface
Clean up the connection-creation interface by clearly separating our two
types of connections: static and dynamic.

Add two convenience functions for creating static and dynamic connections.

A static connection is a pre-setup connection that is defined by a host
device and a host-device cport id. Specifically, the remote interface or
cport id need not be known. The SVC connection is a static connection.

A dynamic connection is defined by a host device and a remote interface
and cport id. This is our normal connections where the host-device cport
is (generally) allocated dynamically.

Note that the new generic interface is marked static, but can be
exported later to allow dynamic connections to be created also from
fixed host-device cports (e.g. for CSI).

Also note that a connection of either type is uniquely identified by its
host-device and host-device cport id once created.

Signed-off-by: Johan Hovold <johan@hovoldconsulting.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
2015-11-25 15:34:19 -08:00
Johan Hovold e4048006fd greybus: interface: kill gb_create_bundle_connection
Kill gb_create_bundle_connection, which was only used to create the
control bundle and connection, and replace it with a specialised static
helper.

Signed-off-by: Johan Hovold <johan@hovoldconsulting.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
2015-11-25 15:30:03 -08:00
Johan Hovold 66069fb06c greybus: svc: move endo id and ap interface id to svc
Move endo_id and AP interface id to the svc device.

The endo abstraction is about to be removed, and these attributes are
arguable attributes of the svc anyway.

Signed-off-by: Johan Hovold <johan@hovoldconsulting.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
2015-11-25 15:30:03 -08:00
Johan Hovold 88f7b96da7 greybus: svc: register svc device at hello
Register the svc device upon reception of the HELLO request.

The SVC HELLO request contains the endo id and AP interface id, which
will be exposed from the svc device rather than the endo.

Signed-off-by: Johan Hovold <johan@hovoldconsulting.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
2015-11-25 15:30:03 -08:00
Johan Hovold 6106e51b74 greybus: svc: clean up svc initialisation
Make sure to initialise the svc device fully before adding it to the
host device.

Signed-off-by: Johan Hovold <johan@hovoldconsulting.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
2015-11-25 15:30:03 -08:00
Johan Hovold efe6ef76ba greybus: svc: make svc a device
Make the svc object a child device of the host-device device and use
driver core to manage its lifetime.

The svc device name is "<bus_id>-svc", where bus_id is the dynamically
assigned id of the host device.

Note that there is exactly one svc-device per host device (bus).

Signed-off-by: Johan Hovold <johan@hovoldconsulting.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
2015-11-25 15:30:03 -08:00
Johan Hovold f0172c7043 greybus: bundle: rename bundle devices
Rename bundle devices so that the new device names become
"<bus_id>-<intf_id>.<bundle_id>", where bus_id is the dynamically
allocated host-device bus id and intf_id the svc-allocated interface
id.

Using a period (.) rather than a colon (:) makes dev-messages easier to
read as as those already add a colon after the device name, for example:

	greybus 1-4.15: failed to connect cport: -22

Signed-off-by: Johan Hovold <johan@hovoldconsulting.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
2015-11-25 15:27:06 -08:00
Johan Hovold 8b0df4b2ea greybus: interface: make interfaces children of host devices
Make interfaces child devices of host devices.

The new interface device name is "<bus_id>-<intf_id>", where bus_id is
the dynamically allocated bus id for the host device and intf_id is the
svc-allocated interface id.

Signed-off-by: Johan Hovold <johan@hovoldconsulting.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
2015-11-25 15:27:06 -08:00