Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
[usb-moded] Add mtp_mode-android-ffs configuration. JB#27650
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".
  • Loading branch information
spiiroin committed Oct 4, 2016
1 parent 5c753e8 commit d580e69
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 0 deletions.
12 changes: 12 additions & 0 deletions config/dyn-modes/mtp_mode-android-ffs.ini
@@ -0,0 +1,12 @@
[mode]
name = mtp_mode
module = none

[options]
sysfs_path = /sys/class/android_usb/android0/functions
sysfs_value = ffs
sysfs_reset_value = none
softconnect_path = /sys/class/android_usb/android0/enable
softconnect = 1
softconnect_disconnect = 0
idProduct = 0A07
18 changes: 18 additions & 0 deletions rpm/usb-moded.spec
Expand Up @@ -169,6 +169,20 @@ system bus.

This package contains the mtp mode config.

%package mtp-mode-android-ffs
Summary: USB mode controller - droid mtp mode config
Group: Config

%description mtp-mode-android-ffs
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 mtp mode config for devices that
have android kernel but still implement mtp functionality
via ffs.

%package pc-suite-mode-android
Summary: USB mode controller - android pc suite mode config
Group: Config
Expand Down Expand Up @@ -427,6 +441,10 @@ systemctl daemon-reload || :
%defattr(-,root,root,-)
%{_sysconfdir}/usb-moded/dyn-modes/mtp_mode-android.ini

%files mtp-mode-android-ffs
%defattr(-,root,root,-)
%{_sysconfdir}/usb-moded/dyn-modes/mtp_mode-android-ffs.ini

%files pc-suite-mode-android
%defattr(-,root,root,-)
%{_sysconfdir}/usb-moded/dyn-modes/pc_suite-android.ini
Expand Down

0 comments on commit d580e69

Please sign in to comment.