1. 04 Oct, 2016 1 commit
    • spiiroin's avatar
      [usb-moded] Add mtp_mode-android-ffs configuration. JB#27650 · d580e69c
      spiiroin authored
      Existing configuration files do not cover case where android kernel
      is used to implement just mtp functionality using ffs based userspace
      code - mtp_mode-android uses "mtp" instead of "ffs" and pc_suite-android
      activates both mtp and obex support.
      Add mtp_mode-android-ffs.ini that is identical with pc_suite-android.ini
      except for the mode name which is "mtp" instead of "pc_suite".
  2. 07 Jul, 2016 25 commits
  3. 11 May, 2016 3 commits
  4. 04 May, 2016 2 commits
  5. 29 Apr, 2016 1 commit
    • spiiroin's avatar
      [dbus] Handle missing mode setting gracefully. Fixes MER#1576 · 1aadb958
      spiiroin authored
      If usb mode setting is not present in usb-moded.ini and override is not
      specified in kernel command line, get_mode_setting() will return null.
      The handler for "get_config" D-Bus method call does not check the return
      value and using the null value triggers abort from sanity checks at
      libdbus. Attempting to pass NULL as string via D-Bus causes abort.
      Use MODE_UNDEFINED as fallback in case the setting value is not defined.
      Also remove potential memory leaks in the code used for determining the
      mode setting value and use correct function for releasing the resulting
      dynamically allocated string.
      Signed-off-by: spiiroin's avatarSimo Piiroinen <simo.piiroinen@jollamobile.com>
  6. 27 Apr, 2016 2 commits
  7. 26 Apr, 2016 3 commits
    • spiiroin's avatar
      [systemd] Allow passing optional adaptation args for usb-moded. JB#34547 · e92c69c9
      spiiroin authored
      Systemd environment files can't be used to accumulate values and the
      existing $USB_MODED_ARGS is already used for the purposes of optional
      rescue mode.
      Use separate $USB_MODED_HW_ADAPTATION_ARGS to allow passing hw adaptation
      specific command line options to usb-moded.
      Additionally remove the '-a' argument from default command line parameters
      as it can now be handled in adaptation config only for those devices that
      actually need it.
      Signed-off-by: spiiroin's avatarSimo Piiroinen <simo.piiroinen@jollamobile.com>
    • spiiroin's avatar
      [udev] Suspend proof event reading and processing. Fixes JB#34440 · c982d3b4
      spiiroin authored
      Depending on kernel side usb drivers and charging logic, it is possible
      that device suspends immediately after reporting usb connect / disconnect
      while display is off and autosuspend enabled. That can delay the actions
      that should be made on usb connection state changes.
      Acquire a wakelock for the duration of udev event input processing.
      Hold a wakelock for a while when usb connection state changes occur.
      Signed-off-by: spiiroin's avatarSimo Piiroinen <simo.piiroinen@jollamobile.com>
    • spiiroin's avatar
      [udev] Try to ignore false positive cable connects. Contributes to JB#34547 · 2fa5781b
      spiiroin authored
      When connecting charger to usb port, it is sometimes initially detected as
      a pc cable instead of charger. This leads to usb mode selection dialog
      popping up in a situation where mode selection is not possible.
      Optionally, when cable connect is seen based on udev events, wait a while
      to see if it gets identified as dedicated charger before invoking actions
      relevant to pc cable connection only.
      It is assumed that data reported by udev on usb-moded startup is stable
      and pc cable connection is accepted without delay.
      By default usb-moded reacts immediately to pc cable connect events.
      If needed, the default delay can be adjusted via usb-moded command
      line argument -m/--max-cable-delay=<ms>.
      Signed-off-by: spiiroin's avatarSimo Piiroinen <simo.piiroinen@jollamobile.com>
  8. 25 Apr, 2016 2 commits
  9. 22 Apr, 2016 1 commit
    • jpoutiai's avatar
      Merge branch '34608' into 'master' · 97954cb9
      jpoutiai authored
      Wait for confirmation before choosing the mode
      With some cables the first meaningful uevent has the POWER_SUPPLY_TYPE always as USB but next can be USB_DCP. This change waits for the second verification before choosing connection type and if nothing comes falls back to charging mode.
      See merge request !6