operation: make the timeout a per-operation thing, not per-connection

An operation is what can timeout, not a connection itself.  So notify
the operation timedout, and the connection can then do with it as it
sees fit, if necessary.

Signed-off-by: Greg Kroah-Hartman <greg@kroah.com>
greybus: gpio: kill gpio_controller->gpio

This field is never used (and not needed) so get rid of it.

Signed-off-by: Alex Elder <elder@linaro.org>
Signed-off-by: Greg Kroah-Hartman <greg@kroah.com>
greybus: embed the i2c adapter struct

We don't need to dynamically allocate the i2c adapter structure, we
can just embed it right in struct gb_i2c_device.

Signed-off-by: Alex Elder <elder@linaro.org>
Signed-off-by: Greg Kroah-Hartman <greg@kroah.com>
uart-gb: convert over to the connection interface

Move the uart code over to use the "new" connection interface, instead
of the "old" module interface.

Signed-off-by: Greg Kroah-Hartman <greg@kroah.com>
uart-gb: remove global init functions

The uart-gb code needs to init the tty core before it can add devices.
Previously we hard-coded this in the greybus core, move this to be
"dynamic" and self-contained within the uart-gb.c file.

Signed-off-by: Greg Kroah-Hartman <greg@kroah.com>
FIXME/XXX removals: We have proper reference counting now

Now that we have proper reference counting for modules, interfaces, and
connections, no need to worry about grabbing a pointer to your "parent"
structure, all is good.

Signed-off-by: Greg Kroah-Hartman <greg@kroah.com>
module: remove unneeded XXX comment about module id values

We do properly check for duplicate module ids, as fixed in
008d85d90ae1ab31f1f7b80f245f6ee2eb5aed49 "module: don't create duplicate
module ids", so remove the XXX marker.

Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
kernel_ver.h: add ATTRIBUTE_GROUPS() macro for older kernels

This was added in 3.11, and we need it for 3.10

Signed-off-by: Greg Kroah-Hartman <greg@kroah.com>
greybus: begin abstracting connection operations

This is part 1 of abstracting the connection operations into a set
of methods.  This will avoid some big switch statements, but more
importantly this will be needed for supporting multiple versions of
each protocol.

For now only two methods are defined.  The init method is used
to set up the device (or whatever the CPort represents) and the exit
method tears it down.  There may need to be additional operations
added in the future, and once versioning is used we might stash
the version number in this structure as well.

The next patch adds dynamic registratration of these protocol
handlers, and will do away with the switch statement now found
in gb_connection_init().

Signed-off-by: Alex Elder <elder@linaro.org>
Signed-off-by: Greg Kroah-Hartman <greg@kroah.com>
uart-gb: mark some functions static

Signed-off-by: Greg Kroah-Hartman <greg@kroah.com>
battery-gb: remove some #if 0 code

We aren't going to have individual modules for the gb protocols, so just
remove this useless code, it was throwing up warnings in sparse.

Signed-off-by: Greg Kroah-Hartman <greg@kroah.com>
sdio-gb: convert to the connection interface.

No one is using sdio yet, but convert to the connection interface to
remove the last user of the "old" module interface.

Signed-off-by: Greg Kroah-Hartman <greg@kroah.com>
Merge branch 'master' into driver_model_rework