1. 18 Nov, 2014 5 commits
    • Alex Elder's avatar
      greybus: start using struct gb_message · c7f82d5d
      Alex Elder authored
      This converts some of the operation code to start leveraging the
      new gb_message type.  Instead of creating the request and response
      gbufs, we initialize (and tear down with a new function) the
      request and response message structures.
      Signed-off-by: default avatarAlex Elder <elder@linaro.org>
      Signed-off-by: default avatarGreg Kroah-Hartman <greg@kroah.com>
      c7f82d5d
    • Alex Elder's avatar
      greybus: define struct gb_message · 3690a826
      Alex Elder authored
      A Greybus buffer (gbuf) is a generic buffer used for data transfer
      over a Greybus interconnect.  We only ever use gbufs in operations,
      which always involve exactly two of them.  The lifetime of a gbuf is
      therefore directly connected to the lifetime of an operation, so
      there no real need to manage gbufs separate from operations.
      
      This patch begins the process of removing the gbuf abstraction, on
      favor of a new data type, gb_message.  The purpose of a gb_message
      is--like a gbuf--to represent data to be transferred over Greybus.
      However a gb_message is oriented toward the more restrictive way
      we do Greybus transfers--as operation messages (either a request or
      a response).
      
      This patch simply defines the structure in its initial form, and
      defines the request and response fields in a Greybus operation
      structure as embedded instances of that type.  The gbuf pointer
      is defined within the gb_message structure, and as a result lots
      of code needs to be tweaked to reference the request and response
      gbufs as subfields of the request and response structures.
      Signed-off-by: default avatarAlex Elder <elder@linaro.org>
      Signed-off-by: default avatarGreg Kroah-Hartman <greg@kroah.com>
      3690a826
    • Alex Elder's avatar
      greybus: move the definition of struct gbuf · 3c3cef40
      Alex Elder authored
      We no longer need struct gbuf defined in "greybus.h".  An upcoming
      patch will embed a gbuf struct (not a pointer) into the operation
      structure, and to do that we'll need the struct defined prior to the
      operation.  Just move the gbuf definition into "operation.h".
      Signed-off-by: default avatarAlex Elder <elder@linaro.org>
      Signed-off-by: default avatarGreg Kroah-Hartman <greg@kroah.com>
      3c3cef40
    • Alex Elder's avatar
      greybus: kill gbuf->kref · 2f528c8b
      Alex Elder authored
      Since there is only ever one reference to a gbuf, we don't need a
      kref to figure out when it can be freed.  Get rid of the kref and
      its supporting code.
      Signed-off-by: default avatarAlex Elder <elder@linaro.org>
      Signed-off-by: default avatarGreg Kroah-Hartman <greg@kroah.com>
      2f528c8b
    • Alex Elder's avatar
      greybus: kill greybus_{get,put}_gbuf() · 6e5dd0bb
      Alex Elder authored
      These functions are never used, so we can get rid of them.
      Since there's no reference-getting function any more, we no
      longer need "gbuf_mutex" to avoid racing gets and puts, so
      get rid of that too.
      Signed-off-by: default avatarAlex Elder <elder@linaro.org>
      Signed-off-by: default avatarGreg Kroah-Hartman <greg@kroah.com>
      6e5dd0bb
  2. 17 Nov, 2014 12 commits
  3. 16 Nov, 2014 1 commit
    • Greg Kroah-Hartman's avatar
      greybus: Greybus UART connection driver · b4be4043
      Greg Kroah-Hartman authored
      Flush out the Greybus UART driver to actually implement greybus
      requests.  The number of Greybus Protocol operations has been reduced
      down to a managable number, and, if you look closely, you will notice it
      follows the CDC ACM USB specification, which can drive UART devices
      quite well, no need for complex UART state changes, leave all of that
      logic up to the firmware, if it wants/needs it.
      
      The Greybus Protocol spec has been updated to match the driver.
      
      TODO: There are 2 requests from the device to the host that need to be
      implemented.  As this isn't fully hooked up in the Greybus core, that is
      not implemented here yet either.
      Signed-off-by: default avatarGreg Kroah-Hartman <greg@kroah.com>
      b4be4043
  4. 15 Nov, 2014 1 commit
  5. 14 Nov, 2014 21 commits