19 Sep, 2016
1 commit
-
The last thing remaining in kernel_ver.h was the setting of
CONFIG_PM_RUNTIME, which isn't needed in a in-tree implementation. So
remove the setting of this value, and the .h file entirely as that was
the last thing left in it.Signed-off-by: Greg Kroah-Hartman
15 Jul, 2016
1 commit
-
This patch adds runtime pm support for the bundle core. Unbound bundle
devices are always deactivated. During probe, Runtime PM status is set
to enabled and active and the usage count is incremented. If the driver
supports runtime PM, it should call pm_runtime_put() in its probe
routine and pm_runtime_get_sync() in remove routine as bundle needs to
be resume before it can be deactivated.Testing Done:
- Check runtime_status of the bundle driver when bundle goes to suspendSigned-off-by: David Lin
Signed-off-by: Axel Haslam
Reviewed-by: Johan Hovold
Signed-off-by: Alex Elder
04 Jun, 2016
1 commit
-
Define a bundle ID that means "no bundle". This will be used for
tracing connection events during the portion of a connection's
lifetime when it has no bundle associated with it. Don't allow
any bundle to be created using that ID.Signed-off-by: Alex Elder
Reviewed-by: Viresh Kumar
Signed-off-by: Greg Kroah-Hartman
31 Mar, 2016
1 commit
-
Clean up the device id-handling and make sure we never allocate invalid
device ids due to a missing upper bound.Signed-off-by: Johan Hovold
Signed-off-by: Greg Kroah-Hartman
12 Feb, 2016
1 commit
-
Remove the private data field from the bundle structure as it is no
longer needed. Bundle drivers can use the driver data field in the
bundle device.Update the only current user to use the connection private data until it
has been converted to a bundle driver.Signed-off-by: Johan Hovold
Signed-off-by: Greg Kroah-Hartman
22 Jan, 2016
1 commit
-
Defer connection creation to bundle driver probe instead of creating
them when initialising the interface and parsing the manifest.Store copies of the CPorts descriptors in the bundle for the drivers to
use, and update the legacy driver.This is needed for drivers that need more control over host-device
resource management, for example, when a protocol needs to use a
dedicated host CPort for traffic offloading (e.g. camera data).This also avoids allocating host CPorts for bundles that are not bound
to a driver or for remote CPorts that a driver does not need.Reviewed-by: Viresh Kumar
Signed-off-by: Johan Hovold
Signed-off-by: Greg Kroah-Hartman
20 Jan, 2016
1 commit
-
Add bundle-version operation to fetch the version of the bundle class.
Retrieve the bundle version of all bundles when initialising the
interface in case the control-protocol version is greater than 0.1.Reviewed-by: Viresh Kumar
Signed-off-by: Johan Hovold
Signed-off-by: Greg Kroah-Hartman
09 Dec, 2015
3 commits
-
Separate bundle creation and registration.
Note that the bundle connections still needs to be initialised post
registration as protocol drivers create child devices to the bundle.This will ultimately allow connection structures to be created while
parsing manifests, but the connections to not be enabled until a driver
is bound.Signed-off-by: Johan Hovold
Reviewed-by: Viresh Kumar
Signed-off-by: Greg Kroah-Hartman -
Kill the bundle lock, which looked like it protected the interface
bundle lists but really did not as lock-less manipulations were still
made.No locking for the interface bundle list is in fact needed as bundles
are created along with the interface, and the list is only used to check
for duplicate bundle ids when parsing the manifest and to destroy the
bundles when removing the interface itself.Signed-off-by: Johan Hovold
Reviewed-by: Viresh Kumar
Signed-off-by: Greg Kroah-Hartman -
Remove gb_bundle_bind_protocols() that was used to iterate over all
registered bundles and bind protocols to them should a protocol become
available post bundle creation.The protocol abstraction as a generic construct is going away in favour
of class drivers. Connections will be setup when a class driver is
probed, and driver modules can be loaded on-demand by user space based
on uevents and modalias.Signed-off-by: Johan Hovold
Reviewed-by: Viresh Kumar
Signed-off-by: Greg Kroah-Hartman
08 Dec, 2015
1 commit
-
Remove obsolete function prototype that was left after a recent code
relocation.Signed-off-by: Johan Hovold
Signed-off-by: Greg Kroah-Hartman
20 Oct, 2015
1 commit
-
The gb_bundle structure needs a private field if we are going to be able
to replace the gb_connection device with this one for all use cases.Ideally we could use the private pointer within the struct device, but
for now let's just try to mirror how people were using the gb_connection
structure to make the patches simpler, and the logic the same.Signed-off-by: Greg Kroah-Hartman
Reviewed-by: Viresh Kumar
Reviewed-by: Alex Elder
Reviewed-by: Johan Hovold
02 Jul, 2015
2 commits
-
They aren't used anymore, remove them. This also gets rid of
gb_bundle_connections_init().Signed-off-by: Viresh Kumar
Reviewed-by: Alex Elder
Signed-off-by: Greg Kroah-Hartman -
While introducing bundles, the device_id also got moved to the bundle,
whereas it identifies an interface block to the AP.Move it back to interface instead of bundle.
Calls to gb_bundle(s)_init() are dropped as connections will be
initialized while they are created now, as device_id will be valid.Signed-off-by: Viresh Kumar
Reviewed-by: Alex Elder
Signed-off-by: Greg Kroah-Hartman
13 Jun, 2015
1 commit
-
Currently gb_bundle_destroy() takes an interface as an argument,
and really doesn't do what a function by that name should do.What it now does is delete all bundles associated with a given
interface. What it should do is destroy a single bundle.Move the looping logic out of gb_bundle_destroy() and into its
caller, gb_interface_destroy(). Pass each bundle in an interface to
gb_bundle_destroy(), which will do what's required to destroy a
single bundle (including removing it from its interface's bundle
list under protection of the lock).Signed-off-by: Alex Elder
Signed-off-by: Greg Kroah-Hartman
17 Apr, 2015
1 commit
-
A bundle has a state file, that is managed by the endo userspace
process. This file can be written to and any process that is polling on
the file will be woken up and can read the new value. It's a "cheap"
IPC for programs that are not allowed to do anything other than
read/write to kernel sysfs files.Signed-off-by: Greg Kroah-Hartman
06 Apr, 2015
4 commits
-
Alex suggested to name it class instead of class type.
Signed-off-by: Viresh Kumar
Signed-off-by: Greg Kroah-Hartman -
A Greybus driver will bind to a bundle, not an interface. Lets follow
this rule in code.Signed-off-by: Viresh Kumar
Signed-off-by: Greg Kroah-Hartman -
An interface can have 1 or more bundles. On link-up event, we must initialize
all the bundles associated with the interface.Signed-off-by: Viresh Kumar
Signed-off-by: Greg Kroah-Hartman -
Currently we are creating bundles based on interface descriptors. An interface
can have one or more bundles associated with it and so a bundle must be created
based on a bundle descriptor.Also get class_type from bundle descriptor.
Signed-off-by: Viresh Kumar
Signed-off-by: Greg Kroah-Hartman
03 Jan, 2015
1 commit
-
Use a "name" for when we don't have a valid device id yet, instead of a
magic value of 0xff.Reported-by: Alex Elder
Signed-off-by: Greg Kroah-Hartman
Reviewed-by: Alex Elder
24 Dec, 2014
1 commit
-
When adding a new protocol to the system, walk all bundles and try to
hook up any connections that do not have a protocol already. This sets
the stage to allow for protocols to be loaded at any time, not just
before the device is seen in the system.Reviewed-by: Alex Elder
Signed-off-by: Greg Kroah-Hartman
20 Dec, 2014
1 commit
-
Rename struct gb_interface_block to struct gb_interface
Lots of renaming, and variable renames as well (gb_ib->intf), but all
should be sane with regards to the new naming scheme we are using.Reviewed-by: Alex Elder
Signed-off-by: Greg Kroah-Hartman
14 Dec, 2014
2 commits
-
Rename struct gb_interface to struct gb_bundle
It's a lot of renaming, some structures got renamed and also some
fields, but the goal was to rename things to make sense with the new
naming of how the system is put together in the 'driver model' view.Reviewed-by: Alex Elder
Signed-off-by: Greg Kroah-Hartman -
We are renameing the "interface" term to "bundle" so rename the files
before we start changing structure names to make it easier for people to
see what really is happening in the changes.Signed-off-by: Greg Kroah-Hartman
Reviewed-by: Alex Elder