1. 24 Sep, 2014 3 commits
    • Alex Elder's avatar
      greybus: embed workqueue structure in struct gbuf · 2e353685
      Alex Elder authored
      A Greybus buffer containing outbound data is submitted to to the
      underlying driver to be sent over a CPort.  Sending that data could
      be deferred, so the submit operation completes asynchronously.  When
      the send is done, a callback occurs, and the buffer is "completed",
      and the buffer's completion routine is called.  The buffer is then
      freed.
      
      If data arrives on the CPort, greybus_cport_in_data() is called
      to allocate a Greybus buffer and copy the received data into it.
      Once that's done the buffer is completed, again allowing the
      buffer's completion routine to finish any final tasks before
      freeing the buffer.
      
      We use a workqueue to schedule calling the buffer's completion
      function.  This patch does two things related to the work queue:
          - Renames the work queue "gbuf_workqueue" so its name more
            directly describes its purpose
          - Moves the work_struct needed for scheduling completions
            into the struct greybuf.  Previously a separate type
            was used, and dynamically allocated *at interrupt time*
            to hold this work_struct.  We can now do away with that.
      Signed-off-by: default avatarAlex Elder <elder@linaro.org>
      Signed-off-by: default avatarGreg Kroah-Hartman <greg@kroah.com>
      2e353685
    • Alex Elder's avatar
      greybus: get rid of a weird idiom · 217b870e
      Alex Elder authored
      It strikes me as strange to add one to a value while checking to see
      if it exceeds a maximum.
      Signed-off-by: default avatarAlex Elder <elder@linaro.org>
      Signed-off-by: default avatarGreg Kroah-Hartman <greg@kroah.com>
      217b870e
    • Alex Elder's avatar
      greybus: quick fix for sysfs serial number · 380f6bdd
      Alex Elder authored
      Let the serial number attribute have its own is_visible function.
      Signed-off-by: default avatarAlex Elder <elder@linaro.org>
      Signed-off-by: default avatarGreg Kroah-Hartman <greg@kroah.com>
      380f6bdd
  2. 23 Sep, 2014 2 commits
    • Alex Elder's avatar
      greybus: rename struct greybus_device · 778c69c9
      Alex Elder authored
      The greybus_device structure represents an Ara phone module.
      It does *not* (necessarily) represent a UniPro device, nor any
      device (like an i2c adapter) that might reside on an Ara module.
      
      As such, rename struct greybus_device to be struct greybus_module.
      Rename all symbols having that type to be "gmod" rather than "gdev".
      Signed-off-by: default avatarAlex Elder <elder@linaro.org>
      Signed-off-by: default avatarGreg Kroah-Hartman <greg@kroah.com>
      778c69c9
    • Alex Elder's avatar
      greybus: simple fixes · 69f93abf
      Alex Elder authored
      A few silly little fixes.
          - Clear out some unnecessary #includes in "debugfs.c"
          - Drop some unneeded parentheses in hd_to_es1()
          - Use &hd->hd_priv in hd_to_es1() to emphasize we are working
            with an embedded array, not a pointer
          - Fix a comment in the header for ap_probe()
          - Drop a duplicate #include in "gpio-gb.c"
          - Fix a use-before-set problem in set_serial_info()
      Signed-off-by: default avatarAlex Elder <elder@linaro.org>
      Signed-off-by: default avatarGreg Kroah-Hartman <greg@kroah.com>
      69f93abf
  3. 22 Sep, 2014 9 commits
  4. 20 Sep, 2014 2 commits
  5. 19 Sep, 2014 3 commits
  6. 14 Sep, 2014 8 commits
  7. 13 Sep, 2014 9 commits
  8. 11 Sep, 2014 3 commits
  9. 10 Sep, 2014 1 commit
    • Greg Kroah-Hartman's avatar
      greybus: pass appropriate type to create function · 3d545326
      Greg Kroah-Hartman authored
      Based on a patch from Alex Elder <elder@linaro.org>.
      
      Alex's original description:
      
      Every descriptor in a manifest is interpreted by greybus_new_module().
      We call a function to do initialization based on descriptor's type.
      
      Since we know the type of the descriptor at that point, we can pass
      to the called function the actual sub-type it needs (i.e., the union
      member associated with the type).  This allows those functions to
      be slightly simplified, and more focused.
      
      Also change some size variables to have size_t type, and simplify a
      few spots further by using sizeof(object) in place of sizeof(type).
      3d545326