1. 07 Jun, 2016 5 commits
    • Bryan O'Donoghue's avatar
      greybus: tracepoints: Add standard Linux tracepoint for TimeSync event · 6da7c889
      Bryan O'Donoghue authored
      This patch adds a tracepoint to the TimeSync ISR, the purpose of which is
      to indicate a TimeSync event has happened. This tracepoint can be enabled
      by issuing the following command:
      
      echo 1 > /sys/kernel/debug/tracing/events/greybus/gb_timesync_irq/enable
      
      Synchronization looks like this:
      
       TIMESTAMP  FUNCTION
          |         |
      147.865788: gb_timesync_irq: strobe 1/4 frame-time 2910076529
      147.866781: gb_timesync_irq: strobe 2/4 frame-time 2910095689
      147.867777: gb_timesync_irq: strobe 3/4 frame-time 2910114820
      147.868791: gb_timesync_irq: strobe 4/4 frame-time 2910134038
      
      A ping can be triggered like this:
      
      cat /sys/kernel/debug/greybus/frame-time
      
      And that ping looks like this:
      
       TIMESTAMP  FUNCTION
          |         |
      147.934678: gb_timesync_irq: ping 4/4 frame-time 2911380356
      169.280551: gb_timesync_irq: ping 4/4 frame-time 3321221069
      Signed-off-by: default avatarBryan O'Donoghue <bryan.odonoghue@linaro.org>
      Reviewed-by: default avatarVaibhav Hiremath <vaibhav.hiremath@linaro.org>
      Acked-by: default avatarAlex Elder <elder@linaro.org>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@google.com>
      6da7c889
    • Bryan O'Donoghue's avatar
      greybus: timesync: Bind TimeSync into Greybus · 4a448427
      Bryan O'Donoghue authored
      TimeSync needs to bind into Greybus in a few places.
      
      - core.c
        To initialize its internal state and tear-down its internal state.
        To schedule a timesync to a newly added Bundle after probe() completes.
      
      - svc.c
        To get access to the SVC and enable/disable timesync as well as
        extracting the authoritative time from the SVC to subsequently
        disseminate to other entities in the system.
      
      - interface.c
        To get access to an Interface in order to inform APBx of timesync
        enable/disable and authoritative operations.
      
      This patch adds those bindings into Greybus core.
      Signed-off-by: default avatarBryan O'Donoghue <bryan.odonoghue@linaro.org>
      Reviewed-by: default avatarVaibhav Hiremath <vaibhav.hiremath@linaro.org>
      Acked-by: default avatarAlex Elder <elder@linaro.org>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@google.com>
      4a448427
    • Bryan O'Donoghue's avatar
      greybus: timesync: Add timesync core driver · 970dc85b
      Bryan O'Donoghue authored
      This patch adds the core timesync functionality.
      
      0. arche-platform.c/arche-apb-ctrl.c
         Modifies the platform layer to hook the incoming TIME_SYNC signal up to
         the timesync strobe IRQ handler. If the arche-platform driver can't
         satisfy the request for the wake-detect line, it will return -EAGAIN and
         the calling work-queue must reschedule the attempt to get exclusive
         access to the wake-detect pin logic. A private data field is added to
         the arche-platform driver to enable passing of a timesync pointer to the
         ISR responsible for synchronizing time.
      
      1. timesync.c
         A new file added which contains all of the logic associated with sending
         greybus commands to SVC, APBx or Interfaces to enable, disable and
         disseminate timing information.
      
      2. timesync_platform.c
         Any platform/arch specific code goes into timesync_platform.c.
         Originally the idea was to keep the x86 and ARM arch dependencies in a
         timesync_platform_arch.c file - however with further refinement that's
         currently not necessary however just-in-case it becomes necessary to
         resuscitate arch or platform specific methods for accessing timer
         resources that access shouldn't be part of the core timesync.c logic and
         so for the moment we access these timer resources through a thin access
         layer in timesync_platform.c. Expect this to go away long term ideally.
      Signed-off-by: default avatarBryan O'Donoghue <bryan.odonoghue@linaro.org>
      Acked-by: default avatarAlex Elder <elder@linaro.org>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@google.com>
      970dc85b
    • Vaibhav Agarwal's avatar
      greybus: audio: Report DISCONNECT event after resource cleanup. · 698282f6
      Vaibhav Agarwal authored
      Reporting DISCONNECT event immediately on module removal causes
      race condition while re-populating mixer controls by above HAL. The
      original intent was to avoid any (invalid) mixer control modification
      request from above layer.
      
      Ideally, it should report 'MODULE_NOT_READY' on module plug-out and
      DISCONNECT after resource cleanup. This would involve changes in GB
      Audio manager and HAL layer.
      
      Since we already have a plan to remove GB Audio manager, I'm making this
      change in GB codec driver to avoid any race condition. Also, codec
      driver already ensures mixer control modifcations for disconnected
      modules are not triggered to AP Bridge audio FW & reported invalid.
      Signed-off-by: default avatarVaibhav Agarwal <vaibhav.agarwal@linaro.org>
      Reviewed-by: default avatarMark Greer <mgreer@animalcreek.com>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@google.com>
      698282f6
    • Vaibhav Agarwal's avatar
      greybus: audio: Report warning in case module is already removed · 02f1c12c
      Vaibhav Agarwal authored
      Added warning message in find_gb_module(). This will help to identify
      invalid mixer control/widget modification triggered from above layer.
      Signed-off-by: default avatarVaibhav Agarwal <vaibhav.agarwal@linaro.org>
      Reviewed-by: default avatarMark Greer <mgreer@animalcreek.com>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@google.com>
      02f1c12c
  2. 04 Jun, 2016 11 commits
  3. 03 Jun, 2016 3 commits
  4. 02 Jun, 2016 4 commits
  5. 01 Jun, 2016 8 commits
  6. 27 May, 2016 9 commits