Skip to content

Commit

Permalink
[usb-moded] Add experimental host mode switching support
Browse files Browse the repository at this point in the history
Signed-off-by: Philippe De Swert <philippe.deswert@jollamobile.com>
  • Loading branch information
philippedeswert committed Feb 22, 2014
1 parent aff2bd2 commit 44ebf5d
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 0 deletions.
8 changes: 8 additions & 0 deletions config/dyn-modes/host_mode_jolla.ini
@@ -0,0 +1,8 @@
[mode]
name = host_mode
module = none

[options]
sysfs_path = /sys/class/power_supply/usb/scope
sysfs_value = 1
sysfs_reset_value = 2
17 changes: 17 additions & 0 deletions rpm/usb-moded.spec
Expand Up @@ -180,6 +180,19 @@ system bus.

This package contains the android at modem port mode config.

%package host-mode-jolla
Summary: USB mode controller - host mode switch for Jolla
Group: Config

%description host-mode-jolla
Usb_moded is a daemon to control the USB states. For this
it loads unloads the relevant usb gadget modules, keeps track
of the filesystem(s) and notifies about changes on the DBUS
system bus.

This package contains the config to switch the first Jolla phone
in host mode.

%package defaults
Summary: USB mode controller - default configuration
Group: Config
Expand Down Expand Up @@ -363,3 +376,7 @@ systemctl daemon-reload || :
%defattr(-,root,root,-)
%{_sysconfdir}/usb-moded/dyn-modes/mass_storage_android.ini
%{_sysconfdir}/usb-moded/mass-storage-jolla.ini

%files host-mode-jolla
%defattr(-,root,root,-)
%{_sysconfdir}/usb-moded/dyn-modes/host_mode_jolla.ini
1 change: 1 addition & 0 deletions src/usb_moded-modes.h
Expand Up @@ -29,4 +29,5 @@
#define MODE_DEVELOPER "developer_mode"
#define MODE_MTP "mtp_mode"
#define MODE_CHARGER "dedicated_charger"
#define MODE_HOST "host_mode"
#define MODE_CONNECTION_SHARING "connection_charing"

0 comments on commit 44ebf5d

Please sign in to comment.