1. 06 Jul, 2018 1 commit
    • spiiroin's avatar
      [usb_moded] Add configfs support. JB#42083 · 79c7a763
      spiiroin authored
      Add custom Makefile for faster smoke-test rebuilds without spending time
      in configure, autotools, document generation and/or rolling rpm packages.
      
      Add multiple include protection to all header files.
      
      Move function prototypes away from header files that included in the
      development package.
      
      Mass rename functions to have a prefix giving context for the function.
      For the most part the prefix is derived from the name of the compilation
      module containing the function.
      
      Mass normalize indentation to four spaces in all source files.
      
      Augment author lists on each source file based on git committers.
      
      Remove "inline" attributes from not-really-inlineable functions.
      
      Remove .gitignore.
      
      Remove unused modules-android.c source file.
      
      Define _GNU_SOURCE for whole build rather than in individual files.
      
      Fix resource leaks here and there.
      
      Try to avoid hard-coding android usb paths.
      
      Add configfs backend for usb cadget configuration.
      
      Probe supported backends (configfs, android usb, or kmod) on usb-moded
      startup and make them mutually exclusive with each other.
      
      Allow configfs and android usb control structures some time to show up
      if usb-moded is started during device bootup.
      
      Refactor udev event listener to utilize a state machine. Simplifies
      book keeping and makes pc/charger detection heuristics easier to control.
      
      Refactor mode selection to utilize three interconnected mini state machines.
      Allows separating logically wanted mode from mode programmed to usb and
      mode exposed over D-Bus.
      Signed-off-by: spiiroin's avatarSimo Piiroinen <simo.piiroinen@jollamobile.com>
      79c7a763
  2. 06 Jun, 2018 2 commits
  3. 05 Jun, 2018 3 commits
  4. 04 Apr, 2018 2 commits
  5. 29 Mar, 2018 3 commits
  6. 28 Mar, 2018 7 commits
  7. 14 Mar, 2018 2 commits
  8. 08 Mar, 2018 2 commits
  9. 04 Dec, 2017 2 commits
  10. 01 Dec, 2017 2 commits
    • spiiroin's avatar
      [udev] Do not exit if cable state can't be determined · 22bcd9f4
      spiiroin authored
      If usb-moded exits when it can't deduce cable connect state, it will
      be restarted by systemd. As the usb-moded restarts are not going to
      change how the udev status looks like, this repeats until systemd
      moves the usb-moded service to failed state.
      
      Do not exit and assume no usb-cable is connected. In addition to not
      triggering restart spree, this has the additional benefit that the
      usb-moded dbus interface stays available and signaling not-connected
      state.
      Signed-off-by: spiiroin's avatarSimo Piiroinen <simo.piiroinen@jollamobile.com>
      22bcd9f4
    • spiiroin's avatar
      [udev] Suppress repetitive property warnings. Fixes JB#40394 · 0d5a10b7
      spiiroin authored
      Usb-moded expects to see POWER_SUPPLY_PRESENT and POWER_SUPPLY_TYPE
      properties defined for usb power-supply devices. When this is not
      the case, it emits warnings and applies various fallbacks. Since the
      properties get re-evaluated periodically, this also leads to the
      same warnings being repeated.
      
      Refactor the code so that in default verbosity the property warnings
      are emitted only during what looks like cable connect / disconnect.
      Signed-off-by: spiiroin's avatarSimo Piiroinen <simo.piiroinen@jollamobile.com>
      0d5a10b7
  11. 15 Nov, 2017 2 commits
  12. 14 Nov, 2017 1 commit
  13. 23 Aug, 2017 3 commits
  14. 18 Aug, 2017 2 commits
  15. 17 Aug, 2017 3 commits
    • spiiroin's avatar
      [modesetting] Write dummy value to clear ffs function list. Fixes JB#39402 · e7536ebc
      spiiroin authored
      It seems that kernels in many if not all devices ignore writing of empty
      string to ffs function control file - the function list is left as it were
      and this can cause subtle issues on the next cable connect. On the other
      hand writing a non-existing "function" will clear the function list, but
      causes write error to be reported.
      
      Treat attempts to clear function list as a special case so that non-empty
      string gets written and the resulting write error is ignored under normal
      logging verbosity.
      Signed-off-by: spiiroin's avatarSimo Piiroinen <simo.piiroinen@jollamobile.com>
      e7536ebc
    • spiiroin's avatar
      [debug] Do diagnostic logging for each D-Bus signal broadcast · 3350e0b6
      spiiroin authored
      When debugging order and timing of issues related to several processes
      it is handy to have signals emitted by usb-moded in the journal along
      with the other related logging.
      Signed-off-by: spiiroin's avatarSimo Piiroinen <simo.piiroinen@jollamobile.com>
      3350e0b6
    • spiiroin's avatar
      [debug] Optionally include file/line/function info when logging to stderr · 3420f50a
      spiiroin authored
      When debugging usb-moded it is time consuming to find where the
      various debug messages originate from.
      
      When logging to stderr, prefix the messages with source code
      position info similar as gcc uses for reporting compilation
      issues. This allows browsing usb-moded code with jump to the
      next error functionality available in many text editors.
      
      Since the amount of information passed to logging functions
      is significantly increased, check whether the message would
      be emitted or not before evaluating formatting parameters etc.
      
      Also make variables relating to logging level, type, etc
      available only via accessor functions.
      Signed-off-by: spiiroin's avatarSimo Piiroinen <simo.piiroinen@jollamobile.com>
      3420f50a
  16. 11 Aug, 2017 1 commit
  17. 05 May, 2017 2 commits