summaryrefslogtreecommitdiffstats
path: root/drivers/staging/greybus/greybus_manifest.h
Commit message (Collapse)AuthorAgeFilesLines
* staging: greybus: add SPDX identifiers to all greybus driver filesGreg Kroah-Hartman2017-11-111-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | It's good to have SPDX identifiers in all files to make it easier to audit the kernel tree for correct licenses. Update the drivers/staging/greybus files files with the correct SPDX license identifier based on the license text in the file itself. The SPDX identifier is a legally binding shorthand, which can be used instead of the full boiler plate text. This work is based on a script and data from Thomas Gleixner, Philippe Ombredanne, and Kate Stewart. Cc: Vaibhav Hiremath <hvaibhav.linux@gmail.com> Cc: "Bryan O'Donoghue" <pure.logic@nexus-software.ie> Cc: Thomas Gleixner <tglx@linutronix.de> Cc: Kate Stewart <kstewart@linuxfoundation.org> Cc: Philippe Ombredanne <pombredanne@nexb.com> Acked-by: Vaibhav Agarwal <vaibhav.sr@gmail.com> Acked-by: David Lin <dtwlin@gmail.com> Reviewed-by: Alex Elder <elder@linaro.org> Acked-by: Johan Hovold <johan@kernel.org> Acked-by: Viresh Kumar <viresh.kumar@linaro.org> Acked-by: Mark Greer <mgreer@animalcreek.com> Acked-by: Rui Miguel Silva <rmfrfs@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* greybus: Add Component Authentication Protocol supportViresh Kumar2016-07-061-0/+1
| | | | | | | | | | | | | | This patch adds Component Authentication Protocol support in greybus. The purpose of the CAP protocol is to authenticate the Module hardware, and it can only be used when it is present as part of the firmware-management bundle, on a separate CPort. Compile tested only. Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org> Reviewed-by: Jun Li <li_jun@projectara.com> Tested-by: Jun Li <li_jun@projectara.com> Signed-off-by: Alex Elder <elder@linaro.org>
* greybus: add support for the log protocolJoel Porquet2016-06-241-0/+2
| | | | | | | | | | | | | | | | | | Add support for the new Log class/protocol. This protocol allows modules to send their internal logging messages to the AP in order to make module debugging easier. The protocol is, for now, composed a single module-initiated request. This request contains a message and associated length. The message is integrated in the kernel log with dev_dbg(). In order to be displayed with 'dmesg', the following command needs to be entered first: $ echo "file log.c +p" > /sys/kernel/debug/dynamic_debug/control The major portion of this file was initially written by Greg KH. Signed-off-by: Joel Porquet <porquet_joel@projectara.com> Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
* greybus: interface: Extract and store Interface feature byteBryan O'Donoghue2016-05-151-1/+6
| | | | | | | | | | | | | | | | | | | | | The Interface description in the Greybus specification contains a 'features' field which is currently not implemented on the AP side. The Interface features field provides information on optional attributes of an Interface as a bitmask. Currently only GREYBUS_INTERFACE_FEATURE_TIMESYNC is implemented in the specification but, the expectation is that other feature flags will be added over time. This patch adds support to extract the feature byte communicated in the features field of the Interface Descriptor header and extends struct interface to contain a features field through which any user with a pointer to struct interface may interrogate the features of an Interface. This is a necessary pre-cursor for TimeSync to ensure only Interfaces which declare GREYBUS_INTERFACE_FEATURE_TIMESYNC will be included when we go through the process of FrameTime synchronization. Signed-off-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org> Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
* greybus: Remove bridge PHY protocol specific classesViresh Kumar2016-05-141-7/+7
| | | | | | | | | | | | | | These protocols are managed under the bridged PHY class and doesn't need protocol specific classes anymore. Remove their entries from gb_gpbridge_id_table array and remove the now unused macro's and mark their values as unused. Tested on EVT 1.5 with generic-test module. Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org> Acked-by: Sandeep Patil <sspatil@google.com> Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
* greybus: firmware: Add firmware management bundle driverViresh Kumar2016-04-271-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | All firmware packages on the Modules or Interfaces are now managed by a special Firmware Management Protocol. The Interface Manifest shall at least contain the Firmware Management Bundle and a Firmware Management Protocol CPort within it. The bundle may contain additional CPorts based on the extra functionality required to manage firmware packages. For example, this is how the Firmware Management Bundle of the Interface Manifest may look like: ; Firmware Management Bundle (Bundle 1): [bundle-descriptor 1] class = 0x16 ; (Mandatory) Firmware Management Protocol on CPort 1 [cport-descriptor 1] bundle = 1 protocol = 0x18 ; (Optional) Firmware Download Protocol on CPort 2 [cport-descriptor 2] bundle = 1 protocol = 0x17 ; (Optional) SPI protocol on CPort 3 [cport-descriptor 3] bundle = 1 protocol = 0x0b ; (Optional) Component Authentication Protocol (CAP) on CPort 4 [cport-descriptor 4] bundle = 1 protocol = 0xXX //TBD This patch adds the basic firmware-management bundle driver, which just creates a firmware-management connection. Support for individual protocols will be added separately. Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org> Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
* greybus: firmware: Rename to bootrom protocolViresh Kumar2016-04-041-2/+2
| | | | | | | | Align with Greybus specifications and rename Firmware Protocol driver as Bootrom Protocol driver. Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org> Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
* greybus: greybus_manifest: remove unused SVC classJohan Hovold2016-03-091-1/+1
| | | | | | | | | Mark the SVC Bundle-class id as unused. Signed-off-by: Johan Hovold <johan@hovoldconsulting.com> Reviewed-by: Jeffrey Carlyle <jcarlyle@google.com> Reviewed-by: Viresh Kumar <viresh.kumar@linaro.org> Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
* greybus: greybus_manifest: remove unused AP class and protocolJohan Hovold2016-03-091-2/+2
| | | | | | | | | Mark the AP Bundle-class and protocol ids as unused. Signed-off-by: Johan Hovold <johan@hovoldconsulting.com> Reviewed-by: Viresh Kumar <viresh.kumar@linaro.org> Reviewed-by: Jeffrey Carlyle <jcarlyle@google.com> Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
* greybus: manifest: reserve the Bridged PHY classGreg Kroah-Hartman2016-03-031-1/+1
| | | | | | | | This reserves the bridged phy class number to be used later on. Signed-off-by: Greg Kroah-Hartman <gregkh@google.com> Reviewed-by: Viresh Kumar <viresh.kumar@linaro.org> Reviewed-by: Johan Hovold <johan@hovoldconsulting.com>
* greybus: audio: Rename Audio class and remove the unused oneViresh Kumar2016-01-271-2/+2
| | | | | | | | | | There should be a single class macro for Audio and two protocol macros. Rename class with value 0x12 as GREYBUS_CLASS_AUDIO and remove the other unused class GREYBUS_CLASS_AUDIO_DATA. 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>
* greybus: Add camera protocol definitionLaurent Pinchart2015-12-141-1/+2
| | | | | | | | Define the camera data protocol ID and all the protocol operations data structures. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
* greybus: audio: Allocate protocol and class valuesMark Greer2015-11-161-4/+4
| | | | | | | | | Allocate protocol and class values for the Audio Device Class Protocol. Two values of each type are allocated: one for Audio Management Connections and one for Audio Data Connections. Signed-off-by: Mark Greer <mgreer@animalcreek.com> Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
* greybus: battery: move implementation to power_supplyRui Miguel Silva2015-11-121-2/+2
| | | | | | | | | | Rename protocol to POWER_SUPPLY and implementation details from battery to power_supply. Also fix some tabs between define and macro name. Signed-off-by: Rui Miguel Silva <rui.silva@linaro.org> Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
* greybus: i2s: Remove deprecated I2S Bridged-PHY ProtocolMark Greer2015-11-041-6/+6
| | | | | | | | | The Greybus I2S Bridged-PHY Protocol is deprecated so remove all support for it from the Greybus code. CC: Vaibhav Agarwal <vaibhav.agarwal@linaro.org> Signed-off-by: Mark Greer <mgreer@animalcreek.com> Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
* greybus: Add firmware protocol driverViresh Kumar2015-08-111-0/+2
| | | | | | | | | | This adds firmware protocol driver based on the latest specs available on mailing lists. This uses the firmware framework present in kernel. Refer Documentation/firmware_class/README on how it works. Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org> Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
* greybus: sync protocol and class definitionsViresh Kumar2015-07-221-0/+5
| | | | | | | | Class types aren't in sync with protocol types, lets keep them in sync for now. Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org> Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
* greybus: define more greybus classesViresh Kumar2015-06-301-0/+3
| | | | | | | | | There are new protocols defined which don't belong to any existing class, add more classes to support them. Reported-by: Alexandre Bailon <abailon@baylibre.com> Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org> Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
* greybus: introduce SVC protocolAlex Elder2015-05-231-0/+1
| | | | | | | | | | | | This patch adds support for the Greybus SVC protocol. We may want to rearrange protocol numbers at some point, since this is a pretty fundamental protocol. Note: It has only been compile tested; no SVC CPorts have yet been defined, so this code is not yet exercised. Signed-off-by: Alex Elder <elder@linaro.org> Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
* greybus: update copyrightsAlex Elder2015-05-231-2/+2
| | | | | | | Update the copyright statements for recently-modified source files. Signed-off-by: Alex Elder <elder@linaro.org> Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
* greybus: raw: add raw greybus kernel driverGreg Kroah-Hartman2015-05-191-0/+1
| | | | | | | | | | | | | | This adds a driver that implements the greybus Raw protocol as specified. It preserves the message boundries by only allowing a read to receive a "full" message, and any write() call also is passed in a single greybus request. Totally untested, given that we have no raw firmware or gbsim code yet. Signed-off-by: Greg Kroah-Hartman <gregkh@google.com> Reviewed-by: Rui Miguel Silva <rui.silva@linaro.org>
* greybus: manifest: be coherent with protocol nameRui Miguel Silva2015-05-111-1/+1
| | | | | | | | | remane protocol define from GREYBUS_PROTOCOL_LED to GREYBUS_PROTOCOL_LIGHTS to be coherent with the specification. Signed-off-by: Rui Miguel Silva <rui.silva@linaro.org> Reviewed-by: Alex Elder <elder@linaro.org> Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
* greybus: Move id-field before bundle-field in CPort Descriptor.Viresh Kumar2015-05-011-1/+1
| | | | | | | | | | Note that this also makes sure the id-field is naturally aligned in case we ever were to remove the __packed attribute. Reviewed-by: Alex Elder <elder@linaro.org> 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>
* greybus: Explicitly add pad-bytes to manifest descriptorsViresh Kumar2015-05-011-0/+3
| | | | | | | | | | Explicitly add pad-bytes to manifest descriptors to match their layout in greybus specification. Reviewed-by: Alex Elder <elder@linaro.org> 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>
* greybus: Remove class descriptorViresh Kumar2015-05-011-10/+0
| | | | | | | | | We carry this information as part of bundle descriptor now and this can be removed. Reviewed-by: Alex Elder <elder@linaro.org> Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org> Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
* greybus: manifest: drop interface-version fieldViresh Kumar2015-05-011-1/+0
| | | | | | | | It is not required anymore. Drop it. Reviewed-by: Alex Elder <elder@linaro.org> Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org> Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
* greybus: manifest: Remove vendor, product and unique-id from interface ↵Viresh Kumar2015-05-011-3/+0
| | | | | | | | | | | | descriptor These should come from control protocol instead. For now, initialize this statically with a FIXME to not forget it later. Reviewed-by: Alex Elder <elder@linaro.org> Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org> Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
* greybus: Explicitly mark structures as packedViresh Kumar2015-04-291-13/+9
| | | | | | | | | | | | | | | These structures are already marked as __packed, as these are enclosed within: #pragma pack(push, 1) #pragma pack(pop) Lets mark them __packed explicitly. Reviewed-by: Alex Elder <elder@linaro.org> 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>
* greybus: bundle: s/class_type/classViresh Kumar2015-04-061-3/+3
| | | | | | | Alex suggested to name it class instead of class type. Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org> Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
* greybus: drop module descriptorsViresh Kumar2015-04-061-15/+0
| | | | | Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org> Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
* greybus: manifest: Use interface descriptor instead of module descriptor to ↵Viresh Kumar2015-04-061-12/+9
| | | | | | | | | | | | | | | | | | get information A module can have more than one interfaces and we get hotplug events or manifests for interfaces, not modules. Details like version, vendor, product id, etc. can be different for different interfaces within the same module and so shall be fetched from interface descriptor instead of module descriptor. So what we have been doing for module descriptors until now must be done for interface descriptors. There can only be one interface descriptor in the manifest. Module descriptor isn't used anymore and probably most of its fields can be removed now. Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org> Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
* greybus: Add bundle descriptor typeViresh Kumar2015-04-051-2/+28
| | | | | | | | | | | A bundle corresponds to a device and a greybus driver binds to it. This patch adds a type and descriptor for bundle. This also shuffles the values of 'enum greybus_descriptor_type' to align them with Greybus Specifications. Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org> Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
* greybus: Initial I2S definitionsMark Greer2015-04-041-1/+3
| | | | | | | | | | | | These are definitions from Mark that I've consolidated into one header file. I'd like to get these merged at some point soon, so the audio driver and gbsim work can avoid having out-of-tree dependencies. Signed-off-by: Mark A. Greer <mgreer@animalcreek.com> Reviewed-by: Alex Elder <elder@linaro.org> Signed-off-by: John Stultz <john.stultz@linaro.org> Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
* greybus: Add loopback protocolAlexandre Bailon2015-03-311-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add a simple Greybus protocol in order to stress USB and Greybus. This protocol currently support 2 requests: ping and transfer. ping request is useful to measure latency. Kernel send a ping request and firmware should respond with a ping. The transfer request request is useful to stress Greybus and USB. Kernel can send data from 0 to 4k and the firmware must send back the data to kernel. This behaviour of gb-loopback module is controlled via sysfs. Curently, connection sysfs folder is updated with new entries: - type: Type of loopback message to send * 0 => Don't send message * 1 => Send ping message continuously (message without payload) * 2 => Send transer message continuously (message with payload) - size: Size of transfer message payload: 0-4096 bytes - ms_wait: Time to wait between two messages: 0-1024 ms Module also export some statistics about connection: - latency: Time to send and receive one message - frequency: Number of packet sent per second on this cport - throughput: Quantity of data sent and received on this cport - error All this statistics are cleared everytime type, size or ms_wait entries are updated. Signed-off-by: Alexandre Bailon <abailon@baylibre.com> Signed-off-by: Greg Kroah-Hartman <greg@kroah.com>
* greybus: bundle: s/gb_interface/gb_bundle/gGreg Kroah-Hartman2014-12-131-2/+2
| | | | | | | | | | | 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>
* greybus: add Linaro copyrightsAlex Elder2014-12-121-0/+1
| | | | | | | | I was asked to add a Linaro copyright to all Greybus source files that anyone at Linaro has modified. This patch does that. Signed-off-by: Alex Elder <elder@linaro.org> Signed-off-by: Greg Kroah-Hartman <greg@kroah.com>
* greybus: greybus_manifest.h: add FIXME for versionGreg Kroah-Hartman2014-12-091-1/+1
| | | | | | | The version field is going to go away, but after the demo, not before. Note that in the header file. Signed-off-by: Greg Kroah-Hartman <greg@kroah.com>
* greybus: greybus_manifest.h: update with full list of protocolsGreg Kroah-Hartman2014-11-171-2/+9
| | | | | | | | The protocol values had gotten out of sync with the Greybus Protocol specification document, so bring them back into sync by changing a few values, and adding the missing values. Signed-off-by: Greg Kroah-Hartman <greg@kroah.com>
* greybus: add pwm protocol driverMatt Porter2014-11-141-0/+1
| | | | | | | Add a PWM driver that implements the Greybus PWM protocol. Signed-off-by: Matt Porter <mporter@linaro.org> Signed-off-by: Greg Kroah-Hartman <greg@kroah.com>
* greybus: register preallocated protocolsAlex Elder2014-11-051-0/+1
| | | | | | | | | | Set up protocol structures as static objects in each protocol source file. Pass the address of that in--rather than the protocol id and version information--to the protocol registration routine. Call a central routine to register all our pre-defined protocols. Signed-off-by: Alex Elder <elder@linaro.org> Signed-off-by: Greg Kroah-Hartman <greg@kroah.com>
* greybus: use protocol_id for numeric valuesAlex Elder2014-10-291-2/+2
| | | | | | | | | Switch to using "protocol_id" to refer to a byte-sized numeric protocol number. A "protocol" will represent a protocol structure (created in the next patch). Signed-off-by: Alex Elder <elder@linaro.org> Signed-off-by: Greg Kroah-Hartman <greg@kroah.com>
* greybus: add LED protocol numbersGreg Kroah-Hartman2014-10-201-0/+1
|
* greybus: battery: some hooking up to the greybus coreGreg Kroah-Hartman2014-10-201-0/+1
| | | | Signed-off-by: Greg Kroah-Hartman <greg@kroah.com>
* greybus: greybus_manifest.h: fix up class protocol numbers to match the spec.Greg Kroah-Hartman2014-10-201-10/+12
| | | | Signed-off-by: Greg Kroah-Hartman <greg@kroah.com>
* greybus: greybus_manifest.h: add BSD license so that firmware can share it.Greg Kroah-Hartman2014-10-061-1/+1
|
* greybus: fix greybus_class_type symbol namesAlex Elder2014-10-031-14/+14
| | | | | | | These were inadvertently not fixed when the type name was changed. Signed-off-by: Alex Elder <elder@linaro.org> Signed-off-by: Greg Kroah-Hartman <greg@kroah.com>
* greybus: October 1 updatesAlex Elder2014-10-021-29/+54
| | | | | | | | | | | | | | | | | | | | | | | | | | Update the definitions in "greybus_manifest.h" to reflect the changes to the Greybus specification made on October 1. They are: - renaming "device" to be "interface" - renumbering greybus descriptor type - eliminating the notion of a "function" - defining a CPort's protocol in the CPort descriptor - having a "class" take on the types previously used for "function" - renaming "serial number" to be "unique id" (for now) - relying on an interface's maximum cport id to determine how much device+cport address space the interface consumes - adding a simple class descriptor - renaming gb_interface->interface_id to be gb_interface->id This also reorders some things to match ordering in the document, and adds some commentary for the various structures. Since greybus_function_type is gone, we eliminate the "type" field from a function structure. (Functions are going away, next.) Signed-off-by: Alex Elder <elder@linaro.org> Signed-off-by: Greg Kroah-Hartman <greg@kroah.com>
* greybus: descriptor type updatesAlex Elder2014-10-021-20/+43
| | | | | | | | | | | | | | | | | Some more updates to the definition of a manifest descriptor. - We get rid of function descriptors. The type of function is easily specified with the CPort it uses. - Add a new interface descriptor type. - Clean up the CPort descriptor structure, eliminating fields that serve no purpose and adding the function id field The sysfs stuff will be updated a little later to add entries for the Greybus interfaces associated with modules. Rearrange the order of a few things in "greybus_manifest.h". Signed-off-by: Alex Elder <elder@linaro.org> Signed-off-by: Greg Kroah-Hartman <greg@kroah.com>
* greybus: remove additional unused fields from the cport descriptorMatt Porter2014-10-011-3/+0
| | | | | | | | | The Greybus spec was updated to remove some unused fields from the CPort descriptor definition. Remove them from the structure so we don't fail manifest parsing. Signed-off-by: Matt Porter <mporter@linaro.org> Signed-off-by: Greg Kroah-Hartman <greg@kroah.com>
* greybus: descriptor type is 1 byteAlex Elder2014-09-291-7/+7
| | | | | | | | | The spec was changed to require only one byte to represent the type of a module descriptor. Update our data type and the values used to reflect that. Signed-off-by: Alex Elder <elder@linaro.org> Signed-off-by: Greg Kroah-Hartman <greg@kroah.com>
OpenPOWER on IntegriCloud