1. 18 Oct, 2016 1 commit
    • spiiroin's avatar
      [udev] Cancel mode selection when charger is detected. Fixes MER#1677 · b1d7a18f
      spiiroin authored
      When charger is connected, usb-moded can see first "USB" (=cable)
      connection event from udev followed by "USB_CDP" (=charger) event.
      Due to cached something-connected flag usb moded still behaves as
      if pc cable were connected - which leaves ui thinking mode selection
      can/should be done etc.
      If dedicated charger is reported after pc cable, clear the low level
      something-connected flag before acting on charger connected info.
      Signed-off-by: spiiroin's avatarSimo Piiroinen <simo.piiroinen@jollamobile.com>
  2. 05 Oct, 2016 2 commits
  3. 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".
  4. 07 Jul, 2016 25 commits
  5. 11 May, 2016 3 commits
  6. 04 May, 2016 2 commits
  7. 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>
  8. 27 Apr, 2016 2 commits
  9. 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>