1. 20 Nov, 2014 6 commits
    • Alex Elder's avatar
      greybus: distinguish incoming from outgoing requests · 30a2964f
      Alex Elder authored
      When we remove the mandatory status byte from response messages we
      will no longer be able to use a zero-sized response to indicate
      an operation is to be used for an incoming request.
      
      Define a new function gb_operation_create_incoming() to be used
      for incoming operations.  Change (and rename) gb_operation_create()
      to be a helper that takes a Boolean to indicate which type is to be
      created, and use a simple wrapper to expose the outgoing operation
      creation routine.
      Signed-off-by: default avatarAlex Elder <elder@linaro.org>
      Signed-off-by: default avatarGreg Kroah-Hartman <greg@kroah.com>
      30a2964f
    • Alex Elder's avatar
      greybus: get rid of uart request_operation() · dcec19fb
      Alex Elder authored
      In "uart-gb.c", request_operation() function is only used by
      get_version().  Since it's not reused, it probably subtracts
      rather than adds value.  So just incorporate what it does
      into get_version() and get rid of request_operation().
      Signed-off-by: default avatarAlex Elder <elder@linaro.org>
      Signed-off-by: default avatarGreg Kroah-Hartman <greg@kroah.com>
      dcec19fb
    • Greg Kroah-Hartman's avatar
      greybus: uart-gb: handle throttle/unthrottle properly · 980c7c50
      Greg Kroah-Hartman authored
      This hooks up throttle/unthrottle to properly toggle the RTS line or do
      XON/XOFF if that is how the port is set up.
      
      Note, if the UART itself can handle XON/XOFF, we would need to send the
      correct character down to it, to have the firmware in the device set up
      the chip to use it automatically when needed.  The odds of someone
      wanting to use this type of flow control is slim, so this isn't
      implemented at this point in time.
      
      Also fill in a few more fields in the get_serial_info ioctl, to make
      tools like stty(1) happier.
      Signed-off-by: default avatarGreg Kroah-Hartman <greg@kroah.com>
      980c7c50
    • Alex Elder's avatar
      greybus: fix vibrator request_operation() · d122382f
      Alex Elder authored
      And this fixes a problem similar the last two, this time found in
      the vibrator protcool driver code.
      
      Change a variable name in get_version() to reflect that it holds
      a response message, not a request message.
      Signed-off-by: default avatarAlex Elder <elder@linaro.org>
      Signed-off-by: default avatarGreg Kroah-Hartman <greg@kroah.com>
      d122382f
    • Alex Elder's avatar
      greybus: fix uart request_operation() · bc091356
      Alex Elder authored
      This fixes a problem similar to what was found in the battery
      protcool driver code.
      
      There's no need to allocate a local buffer, that already set up
      by gb_operation_create().  Just use that instead.
      
      Change a few variable names to reflect that they hold response
      messages, not request messages.
      Signed-off-by: default avatarAlex Elder <elder@linaro.org>
      Signed-off-by: default avatarGreg Kroah-Hartman <greg@kroah.com>
      bc091356
    • Alex Elder's avatar
      greybus: fix battery_operation() · 0bbfe04c
      Alex Elder authored
      This patch fixes some problems with the battery protocol driver.
      
      First, when gb_operation_create() is called, it creates buffers of
      the requested sizes to hold the operation request and response
      messages.  There is therefore no reason to allocate a local response
      buffer.  By the time the (synchronous) gb_operation_request_send()
      call returns, the operation response buffer will have been filled in.
      
      (In addition, the content of local_response was not being filled
      before its contents were used...)
      
      Next, all the message structures are misnamed.  The structures that
      are defined are all the content of operation response messages (not
      request messages).  So this changes all the types names to properly
      reflect their role.
      
      All the local variables using these types are similarly renamed.
      
      I added a new type, gb_generic_battery_response, to be used for
      casting the fake_response used in battery_operation().
      Signed-off-by: default avatarAlex Elder <elder@linaro.org>
      Signed-off-by: default avatarGreg Kroah-Hartman <greg@kroah.com>
      0bbfe04c
  2. 19 Nov, 2014 11 commits
  3. 18 Nov, 2014 23 commits