aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/staging/greybus/Documentation/sysfs-bus-greybus
AgeCommit message (Collapse)Author
2016-07-28greybus: Documentation/sysfs: replace Ara referencesJohan Hovold
Refer to the MDK as GMP MDK. Signed-off-by: Johan Hovold <johan@hovoldconsulting.com> Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
2016-07-26greybus: svc_watchdog: Add sysfs file to change the behavior of biteDavid Lin
Currently, AP performs unipro_reset if SVC fails to response to its ping. While this error recovery is best suited for the end-user experience, errors in the UniPro network could potentially go unnoticed by the QA and fishfooders in the development phase of the project. This patch adds an option to trigger a kernel panic so logs can be collected for analysis. Testing Done: - Reproduce issue and observe kernel panic when watchdob_control is changed to 'panic' Signed-off-by: David Lin <dtwlin@google.com> Reviewed-by: Viresh Kumar <viresh.kumar@linaro.org> Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
2016-07-20greybus: interface: fix power_state documentationJohan Hovold
Reword the power_state attribute documentation to make it clear that an attempt to boot and possibly enumerate an interface is made when writing "on" to the file, and that on errors the interface will again be powered down. Drop the incorrect claim that writing the currently read value has no effect, since no such guarantees can be made (e.g. several writers may be sleeping on the interface mutex). Also fix some minor language issues. Reviewed-by: Sandeep Patil <sspatil@google.com> Signed-off-by: Johan Hovold <johan@hovoldconsulting.com> Reviewed-by: Alex Elder <elder@linaro.org> Reviewed-by: Viresh Kumar <viresh.kumar@linaro.org> Reviewed-by: Patrick Titiano <ptitiano@baylibre.com> Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
2016-07-20greybus: interface: add power_state attributeViresh Kumar
User space needs the capability of powering ON or OFF an Interface for multiple use cases. For example, userspace may want an Interface currently in its S3 boot stage, to boot into its S2 Loader stage to update the bridge SPI flash. Or the Interface is running its S2 Loader stage and updated the SPI flash with the new S2 Loader firmware and wants to boot into the new S2 Loader firmware. Another use case can be, Android wants to disable (not eject) a misbehaving module. Add a 'power_state' sysfs file within the interface directory. It can be read to know the current power state of the Interface and can be written to power ON or power OFF an Interface. Possible values that can be written or read from it are: "on" and "off". Testing Done: Tested by enabling/disabling camera module on EVT 2.0. Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org> CC: David Lin <dtwlin@google.com> Reviewed-by: Johan Hovold <johan@hovoldconsulting.com> [johan: drop es3-quirk duplication, add to power attribute group, fix return value, drop tags ] Signed-off-by: Johan Hovold <johan@hovoldconsulting.com> Reviewed-by: Alex Elder <elder@linaro.org> Reviewed-by: Viresh Kumar <viresh.kumar@linaro.org> Reviewed-by: Sandeep Patil <sspatil@google.com> Reviewed-by: Patrick Titiano <ptitiano@baylibre.com> Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
2016-07-19greybus: interface: add interface-type attributeJohan Hovold
Add an interface-type string attribute that represents the detected interface type as either "dummy", "unipro", "greybus", or "unknown". Signed-off-by: Johan Hovold <johan@hovoldconsulting.com> Reviewed-by: Viresh Kumar <viresh.kumar@linaro.org> Reviewed-by: Sandeep Patil <sspatil@google.com> Reviewed-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org> Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
2016-05-05greybus: Documentation: Add sysfs information about bridged-phy deviceVaibhav Hiremath
Update the documentation (sysfs-bus-greybus) for recent conversion of bridged-phy drivers to real drivers. Signed-off-by: Vaibhav Hiremath <vaibhav.hiremath@linaro.org> Reviewed-by: Viresh Kumar <viresh.kumar@linaro.org> Tested-by: Viresh Kumar <viresh.kumar@linaro.org> Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
2016-05-05greybus: Revert "interface: Fetch and expose version of interface's firmware"Viresh Kumar
This reverts commit b957ade7b3e4ab8c149c53346dbf02e977b7f3a7. The interface version is now managed as part of the firmware-management protocol. This operation is already removed from the greybus specifications. Drop interface version support from greybus. Tested with gbsim (sysfs file not available after this patch). Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org> Reviewed-by: Johan Hovold <johan@hovoldconsulting.com> Acked-by: Sandeep Patil <sspatil@google.com> Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
2016-04-29greybus: Documentation/sysfs: fix sysfs pathsSandeep Patil
correct sysfs paths typo. (s/device/devices). Signed-off-by: Sandeep Patil <sspatil@google.com> Reviewed-by: Viresh Kumar <viresh.kumar@linaro.org> Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
2016-04-29greybus: Documentation/sysfs: add entry for host device bus_idSandeep Patil
Add description for greybus host device bus_id attribute Signed-off-by: Sandeep Patil <sspatil@google.com> Reviewed-by: Johan Hovold <johan@hovoldconsulting.com> Reviewed-by: Viresh Kumar <viresh.kumar@linaro.org> Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
2016-04-25greybus: module: implement controlled module removalJohan Hovold
Implement controlled module removal through a new module attribute "eject". When a non-zero argument is written to the attribute, all interfaces of the module are disabled (e.g. bundles are deregistered) and deactivated (e.g. powered off) before instructing the SVC to physically eject the module. Note that the module device is not deregistered until the SVC has reported the physical removal of all of its interfaces. A new interface mutex is added to enforce interface state-change serialisation. Signed-off-by: Johan Hovold <johan@hovoldconsulting.com> Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
2016-04-25greybus: core: add module abstractionJohan Hovold
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>
2016-04-25greybus: Documentation/sysfs: sort entries alphabeticallyJohan Hovold
The attribute entries have been kept mostly sorted within each device type. Let's move the three more-recently added interface attributes that were not. Suggested-by: Viresh Kumar <viresh.kumar@linaro.org> Signed-off-by: Johan Hovold <johan@hovoldconsulting.com> Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
2016-04-25greybus: Documentation/sysfs: add entry for control deviceJohan Hovold
Add an entry for the recently added interface control device. Also move the bundle-device entry below the control-device entries. Reported-by: Viresh Kumar <viresh.kumar@linaro.org> Signed-off-by: Johan Hovold <johan@hovoldconsulting.com> Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
2016-04-21greybus: interface: move vendor and product strings to control deviceJohan Hovold
The control device is an abstraction of the control connection over which a greybus manifest is retrieved. As interfaces switch modes (e.g. after boot-over-unipro) they expose new manifests, which can contain different vendor and product strings. Eventually control devices will be deregistered and recreated after an interface mode switch, while the interface itself remains registered. Note that only interfaces of type greybus will have control devices. Specifically, dummy interfaces will not. 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>
2016-04-21greybus: Documentation: move the interface power attributesJohan Hovold
Move the interface power attributes after the other interface attributes to keep the attributes grouped by device type. 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>
2016-04-07greybus: svc: add Interface power measurements supportDavid Lin
This change implements the AP Power Monitor functions for obtaining current/voltage/power on a specific rail of an Interface. Testing Done: $ cat /sys/bus/greybus/devices/1-3/current_now 103 $ cat /sys/bus/greybus/devices/1-3/power_now 303 $ cat /sys/bus/greybus/devices/1-3/voltage_now 203 Signed-off-by: David Lin <dtwlin@google.com> Reviewed-by: Viresh Kumar <viresh.kumar@linaro.org> Reviewed-by: Bartosz Golaszewski <bgolaszewski@baylibre.com> Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
2016-02-22greybus: Documentation: remove svc unique_id attributeJohan Hovold
Remove unimplemented svc unique_id attribute from the documentation. This attribute made more sense when we thought we'd have an AP-module, unlike now when the AP and SVC are both part of the same frame. Signed-off-by: Johan Hovold <johan@hovoldconsulting.com> Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
2016-01-26greybus: svc watchdog: allow it to be enabled/disabled from userspaceGreg Kroah-Hartman
Sometimes you want to disable the SVC watchdog without having to patch your kernel, so provide a sysfs file to do this. This can let us do power measurements, and let the firmware developers not go crazy worrying that the kernel is going to reset their chips with no notice. Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
2016-01-12greybus: svc: add intf_eject attributeRui Miguel Silva
Add a new write-only svc attribute to send an eject request to the svc giving the interface number. So, doing: echo 3 > /sys/bus/greybus/devices/1-svc/intf_eject will force eject the module on interface 3 (module slot 1 on EVT1). This can take some seconds as the pulse width for module release is large. Signed-off-by: Rui Miguel Silva <rui.silva@linaro.org> Signed-off-by: Greg Kroah-Hartman <gregkh@google.com> Reviewed-by: Jeffrey Carlyle <jcarlyle@google.com>
2015-12-30greybus: interface: Fetch and expose version of interface's firmwareViresh Kumar
The version of the currently running firmware on the module is useful for userspace as it can be used to find if an update is available or not. This patch fetches interface's version with a new control operation and exposes the same in userspace. 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-30greybus: interface: Receive serial-number on hotplug eventViresh Kumar
Two exactly same modules can be uniquely identified using module's serial-number. This patch updates the interface hotplug event to also receive the serial-number of the module. 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-22greybus: interface: Expose DDBL1 manufacturing and production id in sysfsViresh Kumar
These ids are already fetched from the SVC, but were never exposed to sysfs. Userspace may be interested in using these values and hence these must be exposed to it. 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-04greybus: Documentation: Arrange entries in alphabetical orderViresh Kumar
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-03greybus: Documentation: Fix N-svc directory nameViresh Kumar
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-11-25greybus: bundle: add bundle_id attributeJohan Hovold
Add a bundle_id attribute for the interface-unique id of a bundle that user space can use for matching. Signed-off-by: Johan Hovold <johan@hovoldconsulting.com> Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
2015-11-25greybus: Documentation/sysfs-bus-greybus: update the bus ABI documentationJohan Hovold
Update the ABI documentation to match the new device model. Note that the SVC unique_id and version attributes are not yet implemented. Signed-off-by: Johan Hovold <johan@hovoldconsulting.com> Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
2015-11-21greybus: interface: remove unique idJohan Hovold
Remove the unimplemented interface unique-id. There will eventually be an interface-serial-number attribute provided, but let's not export it or commit to a name for this attribute until we need it. Signed-off-by: Johan Hovold <johan@hovoldconsulting.com> Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
2015-10-19greybus: connection: remove 'struct device' from 'struct gb_connection'Greg Kroah-Hartman
We don't want this in the driver core, as nothing will be binding to it, that's the job of a bundle. So remove the struct device and use a kref to handle reference counting instead. Note, I don't think we really need a kref, but it keeps the lifetime the same as before, and is the simplest change for now. In the future it might be easier to just attach all connections to the bundle and clean them up when the bundle is removed. Also remove the cport sysfs documentation as it's no longer relevant. Signed-off-by: Greg Kroah-Hartman <gregkh@google.com> Reviewed-by: Viresh Kumar <viresh.kumar@linaro.org> Reviewed-by: Alex Elder <elder@linaro.org> Reviewed-by: Johan Hovold <johan@hovoldconsulting.com>
2015-09-17greybus: Documentation: Update sysfs-bus-greybusViresh Kumar
The file names here weren't in sync with what we have today and the updates give a better picture of the same. Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org> Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
2015-09-14greybus: connection: Add sysfs 'ap_cport_id' file for connectionsViresh Kumar
Its a very useful piece of information, i.e. the cport id of the AP to which the cport of the module is connected, and is required lots of times. It isn't known in advance as it is allocated at runtime. This patch creates another file 'ap_cport_id', only for the connection directories, which will give the cport id of the AP. Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org> Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
2015-07-01greybus: interface: device_id belongs to the interfaceViresh Kumar
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 <viresh.kumar@linaro.org> Reviewed-by: Alex Elder <elder@linaro.org> Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
2015-05-28greybus: endo: delete "0xXXXX" portion in sysfs "endo" directoryAlex Elder
With the Endo "id" attribute in place, there's no need to encode the ID of an Endo in its sysfs path. So get rid of it. Signed-off-by: Alex Elder <elder@linaro.org> Reviewed-by: Viresh Kumar <viresh.kumar@linaro.org> Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
2015-05-28greybus: endo: drop redundant prefixes from sysfs basenamesAlex Elder
This commit: 7e761e2 endo: rework some attributes added a new "endo_id" attribute, located under a new "Endo" directory in sysfs. The resulting path looks like: Documentation/sysfs/endo-TYPE/Endo/endo_id There's no need to have a separate "Endo" subdirectory to contain Endo-specific attributes. That commit also added "svc_" to some other paths related to the SVC, like: Documentation/sysfs/endo-TYPE/SVC/svc_version The additional "svc_" is redundant. This patch retouches those paths a bit, mainly to remove some redundancy. It also makes the pathname components all lower case. As a result, the above two paths now look like: Documentation/sysfs/endo-TYPE/id Documentation/sysfs/endo-TYPE/svc/version All other Endo sysfs files are updated similarly. Signed-off-by: Alex Elder <elder@linaro.org> Reviewed-by: Viresh Kumar <viresh.kumar@linaro.org> Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
2015-05-28greybus: update sysfs documentation filesAlex Elder
Impose a few editorial conventions on the Greybus-related sysfs files under "Documentation". - Capitalize "Endo" (except in path names) - Capitalize "ID" (except in path names) - Use "..." to indicate unspecified path components (because ".." means something else). - Add the "0x" prior to the "XXXX" representing the Endo ID. Signed-off-by: Alex Elder <elder@linaro.org> Reviewed-by: Viresh Kumar <viresh.kumar@linaro.org> Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
2015-05-28greybus: add documentation for Endo sysfs filesAlex Elder
Update the files documenting Greybus-related sysfs files under Documentation/ to reflect the addition of the two recently-added Endo attributes. Signed-off-by: Alex Elder <elder@linaro.org> Reviewed-by: Viresh Kumar <viresh.kumar@linaro.org> Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
2015-04-17greybus: bundle: add state sysfs fileGreg Kroah-Hartman
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 <gregkh@google.com>
2015-04-09greybus: Documentation/sysfs-bus-greybus: document module sysfs filesGreg Kroah-Hartman
This documents the module slot sysfs files "epm", "power_control", and "present". Signed-off-by: Greg Kroah-Hartman <gregkh@google.com> Reviewed-by: Alex Elder <elder@linaro.org>
2015-04-09greybus: Documentation/sysfs-bus-greybus: document the endo and SVCGreg Kroah-Hartman
This documents the endo device, and the SVC specific files that are present in the sysfs device tree. Signed-off-by: Greg Kroah-Hartman <gregkh@google.com> Reviewed-by: Alex Elder <elder@linaro.org>
2015-04-09greybus: Documentation/sysfs-bus-greybus: update kernel version and dateGreg Kroah-Hartman
The kernel is now on the 4.XX numbering scheme, and it's going to be a while before we merge this code, so pick a date sometime in the future to be safe. Signed-off-by: Greg Kroah-Hartman <gregkh@google.com> Reviewed-by: Alex Elder <elder@linaro.org>
2014-12-13greybus: bundle: s/gb_interface/gb_bundle/gGreg Kroah-Hartman
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 <elder@linaro.org> Signed-off-by: Greg Kroah-Hartman <greg@kroah.com>
2014-12-11greybus: interface: document sysfs filesGreg Kroah-Hartman
Yes, an interface has a device id sysfs file, so we need to document it. Reviewed-by: Alex Elder <elder@linaro.org> Signed-off-by: Greg Kroah-Hartman <greg@kroah.com>
2014-12-11greybus: connection: document the sysfs filesGreg Kroah-Hartman
Document what the sysfs files are for connections, so that people have a chance to understand what they can be used for. Reviewed-by: Alex Elder <elder@linaro.org> Signed-off-by: Greg Kroah-Hartman <greg@kroah.com>
2014-12-11greybus: sysfs documentation: Document the greybus interface block sysfs files.Greg Kroah-Hartman
Documentation, what, really? Yes. Reviewed-by: Alex Elder <elder@linaro.org> Signed-off-by: Greg Kroah-Hartman <greg@kroah.com>