Forum | Documentation | Website | Blog

Skip to content
Snippets Groups Projects
  1. Mar 05, 2017
  2. Dec 26, 2016
  3. Dec 22, 2016
    • Alexandre Bailon's avatar
      svc: implements new svc operations · 4e65aa83
      Alexandre Bailon authored
      
      gbridge has been written to work with the latest version
      of greybus available at the beginning of the project.
      But greybus has been updated and merge to kernel.
      Update gbridge to work with the latest version of greybus.
      
      Signed-off-by: default avatarAlexandre Bailon <abailon@baylibre.com>
      4e65aa83
    • Alexandre Bailon's avatar
      greybus: add a new macro operation_handler macro · 4eccc823
      Alexandre Bailon authored
      
      Add the macro REQUEST_NO_HANDLER() to define an operation handler
      without a callback. This will let us add new SVC operations without
      to have to implement them.
      Operation registered with REQUEST_NO_HANDLER() are not supposed
      to be used by the kernel in the current state, but if the kernel
      does, then gbridge will print an error.
      
      Signed-off-by: default avatarAlexandre Bailon <abailon@baylibre.com>
      4eccc823
    • Alexandre Bailon's avatar
      svc: Make development and debugging of SVC protocol easier · cde86e24
      Alexandre Bailon authored
      
      SVC operation are dispatched in SVC driver by switch case block.
      It works fine but it is hard to figure out which operation handler
      is complete, which one is just a stub method or which one is missing.
      In addition, it's not really scalable. By example, to print then of
      operation that failed, we will have to add and maintain another switch
      case block that print operation name (instead of operation type).
      Use new struct to register a callback and some other information about
      operation.
      Register all operation in an array and get the operation handler from it.
      In the case of failure, the operation dispatcher will be able get some
      additional information from the operation handler and give some details
      about the error.
      
      Signed-off-by: default avatarAlexandre Bailon <abailon@baylibre.com>
      cde86e24
    • Alexandre Bailon's avatar
      debug: Add color to logs · 6b0d7a9d
      Alexandre Bailon authored
      
      Update log helpers to print errors in red and warnings in yellow.
      It should make more easier to see errors and warnings when they printed
      between greybus operation dump.
      
      Signed-off-by: default avatarAlexandre Bailon <abailon@baylibre.com>
      6b0d7a9d
  4. Dec 12, 2016
  5. Sep 28, 2016
  6. Sep 20, 2016
  7. Sep 18, 2016
    • Alexandre Bailon's avatar
      Add the TCP/IP controller · 32b56486
      Alexandre Bailon authored
      
      Add the TCP/IP controller to connect to module through TCP/IP.
      Currently, a module is detected by using avahi.
      To be discovered, the module must register a service of type "_greybus._tcp".
      The TCP/IP controller will create one socket per connection,
      and use an unique port number to open each of them.
      
      Signed-off-by: default avatarAlexandre Bailon <abailon@baylibre.com>
      32b56486
    • Alexandre Bailon's avatar
      controller: create thread per connection · 98f6bb7c
      Alexandre Bailon authored
      
      Currently, the read of data commming from module is made at interface level.
      It is required for controller that only support one stream per interface.
      But controllers may have one stream per connection and so,
      we can create a thread to wait and read incoming data for each connection.
      
      Signed-off-by: default avatarAlexandre Bailon <abailon@baylibre.com>
      98f6bb7c
    • Alexandre Bailon's avatar
      controller: Add connection callbacks · 06eab8dd
      Alexandre Bailon authored
      
      Currently, the connection between the host and a module
      can only be created after the module has been detected or
      during the interface create. For some controller, we don't
      have the choice because they only have a stream that need
      to open before any other operation.
      But some controller (e.g. TPC/IP) can use more than one stream.
      Add connection_create() and connection_destroy() callbacks to
      let that kind of controller create more than one connection.
      
      Signed-off-by: default avatarAlexandre Bailon <abailon@baylibre.com>
      06eab8dd
    • Alexandre Bailon's avatar
      controller: Add a new callback to stop the event loop. · a41226ba
      Alexandre Bailon authored
      
      The event is mainly used for module detection.
      The controller create a thread to run the loop and generate
      the hotplug and hot unpulg events.
      But an event loop may prevent the application to exit,
      because it use methods that prevent thread to be cancelled.
      Add a new callback that will be called before to cancel the
      thread to put the event loop in a cancellable state.
      
      Signed-off-by: default avatarAlexandre Bailon <abailon@baylibre.com>
      a41226ba
  8. Sep 16, 2016