- 05 Sep, 2018 1 commit
-
-
spiiroin authored
Make all local header files self-sufficient. Normalize order of including header files, so that header corresponding with compilation module is included first, followed by local headers, system headers, standard headers, and finally headers from auxiliary libraries. Remove all include statements that are, or are made redundant by the above changes. Signed-off-by:
Simo Piiroinen <simo.piiroinen@jollamobile.com>
-
- 24 Aug, 2018 5 commits
-
-
spiiroin authored
Writing empty string gets ignored. This causes problems for example when switching from mass-storage mode to charging only as the lua/file attribute does not get cleared. Use a wrapper function to append a linefeed to strings written to sysfs. This avoids zero length writes and makes behavior similar to how redirected echo from command line works. Also tweak unexpected-sysfs-content-change tracker so that it ignores changes in whitespace. Signed-off-by:
Simo Piiroinen <simo.piiroinen@jollamobile.com>
-
spiiroin authored
Configfs wants to have numbers in '0xbeef' form while android usb wants to have 'beef'. Normalizing the output to expected format allows either form to be used in usb-moded configuration files. Signed-off-by:
Simo Piiroinen <simo.piiroinen@jollamobile.com>
-
spiiroin authored
Make it logically match what is available in configfs module. Signed-off-by:
Simo Piiroinen <simo.piiroinen@jollamobile.com>
-
spiiroin authored
The target is to always have android usb enabled with valid function, so this workaround is not relevant anymore. Signed-off-by:
Simo Piiroinen <simo.piiroinen@jollamobile.com>
-
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:
Simo Piiroinen <simo.piiroinen@jollamobile.com>
-
- 05 Jun, 2018 1 commit
-
-
spiiroin authored
On some devices enumeration fails on the 1st connect after bootup unless android usb has already been set up for some function at least once. Add --android-bootup-function option that can be used on such devices to force usb-moded to program some function and then clear the function list when usb-moded is executed during device bootup. Signed-off-by:
Simo Piiroinen <simo.piiroinen@jollamobile.com>
-
- 08 Mar, 2018 1 commit
-
-
spiiroin authored
Usb-moded does android usb initialization only if there is a non-empty configuration block in the ini-files. This does not make sense anymore as the values defined in the config file are used as fallback solution if required data can't be obtained by other means. If android_usb specific sysfs controls are present on the device, try to initialize them regardless of whether ubs-moded configuration files contain relevant information or not. Signed-off-by:
Simo Piiroinen <simo.piiroinen@jollamobile.com>
-
- 26 Apr, 2017 1 commit
-
-
spiiroin authored
While android initialization scripts typically set up the usb serial number, it might happen at wrong time from usb-moded point of view and we in general want to minimize the amount of android init that is needed/used for running sfos. Use usb serial number parsed from kernel command line when initializing default usb properties. Signed-off-by:
Simo Piiroinen <simo.piiroinen@jollamobile.com>
-
- 07 Jul, 2016 1 commit
-
-
spiiroin authored
If android usb is in enable=0 state, cable detection is persistently broken as the existing workarounds in usb-moded are made when cable disconnect is detected and that can't happen unless cable detect works. Enable android usb on usb-moded startup. Signed-off-by:
Simo Piiroinen <simo.piiroinen@jollamobile.com>
-
- 05 Nov, 2015 1 commit
-
-
Philippe De Swert authored
For the special android gadget modes it is sometimes useful to be able to override the vendor id temporarly. Signed-off-by:
Philippe De Swert <philippe.deswert@jollamobile.com>
-
- 11 Nov, 2014 1 commit
-
-
Philippe De Swert authored
Hopefully the last bits of unneeded casting and faulty use of const are now gone. Signed-off-by:
Philippe De Swert <philippe.deswert@jollamobile.com>
-
- 20 Sep, 2013 1 commit
-
-
Philippe De Swert authored
Signed-off-by:
Philippe De Swert <philippe.deswert@jollamobile.com>
-
- 19 Sep, 2013 1 commit
-
-
Philippe De Swert authored
Signed-off-by:
Philippe De Swert <philippe.deswert@jollamobile.com>
-
- 11 Sep, 2013 1 commit
-
-
Philippe De Swert authored
default behaviour. Signed-off-by:
Philippe De Swert <philippe.deswert@jollamobile.com>
-
- 23 Aug, 2013 1 commit
-
-
Philippe De Swert authored
Signed-off-by:
Philippe De Swert <philippe.deswert@jollamobile.com>
-
- 22 Aug, 2013 1 commit
-
-
Philippe De Swert authored
Seems an empty android gadget only enumerates if some configuration had been used before. Fix this by using mass_storage to make a similar fake mass_storage device as used with normal modules. [usb-moded] Use fake mass_storage for android gadget charging mode. Fixes: JB#8277 Signed-off-by:
Philippe De Swert <philippe.deswert@jollamobile.com>
-
- 14 Aug, 2013 2 commits
-
-
Philippe De Swert authored
might not be available so trick the android gadget into an empty configuration for charging enumeration. [usb-moded] Charging mode with android gadget Signed-off-by:
Philippe De Swert <philippe.deswert@jollamobile.com>
-
Philippe De Swert authored
[usb-moded] use android gadget mac Signed-off-by:
Philippe De Swert <philippe.deswert@jollamobile.com>
-
- 07 Aug, 2013 1 commit
-
-
Philippe De Swert authored
* Fix mess with iProduct and idProduct * Make all config file values match the sysfs entries Signed-off-by:
Philippe De Swert <philippe.deswert@jollamobile.com>
-
- 02 Aug, 2013 2 commits
-
-
Philippe De Swert authored
Signed-off-by:
Philippe De Swert <philippe.deswert@jollamobile.com>
-
Philippe De Swert authored
Signed-off-by:
Philippe De Swert <philippe.deswert@jollamobile.com>
-