Commit b1c56ebf authored by spiiroin's avatar spiiroin

[dyn-config] Drop unused softconnect keys

The "softconnect" attributes were used to configure android usb specific
enable/disable sysfs controls. These attributes are no longer used, and
at least in theory the same config files can be used for both android
usb and configfs based systems.

Remove unused attributes.
Signed-off-by: spiiroin's avatarSimo Piiroinen <simo.piiroinen@jollamobile.com>
parent 64350689
......@@ -8,9 +8,6 @@ network = 0
sysfs_path = /sys/class/android_usb/android0/functions
sysfs_value = adb,diag
sysfs_reset_value = none
softconnect_path = /sys/class/android_usb/android0/enable
softconnect = 1
softconnect_disconnect = 0
android_extra_sysfs_path = /sys/class/android_usb/android0/f_diag/clients
android_extra_sysfs_value = diag
idProduct = 0A05
......@@ -11,8 +11,5 @@ sysfs_value = rndis,adb
android_extra_sysfs_path = /sys/class/android_usb/android0/f_ffs/aliases
android_extra_sysfs_value = adb
sysfs_reset_value = none
softconnect_path = /sys/class/android_usb/android0/enable
softconnect = 1
softconnect_disconnect = 0
idProduct = 0A03
dhcp_server = 1
......@@ -6,8 +6,5 @@ module = none
sysfs_path = /sys/class/android_usb/android0/functions
sysfs_value = acm
sysfs_reset_value = none
softconnect_path = /sys/class/android_usb/android0/enable
softconnect = 1
softconnect_disconnect = 0
android_extra_sysfs_path = /sys/class/android_usb/android/f_acm/acm_transports
android_extra_sysfs_value = tty
......@@ -6,8 +6,5 @@ module = none
sysfs_path = /sys/class/android_usb/android0/functions
sysfs_value = serial
sysfs_reset_value = none
softconnect_path = /sys/class/android_usb/android0/enable
softconnect = 1
softconnect_disconnect = 0
android_extra_sysfs_path = /sys/class/android_usb/android0/f_serial/transports
android_extra_sysfs_value = smd,tty
......@@ -6,8 +6,5 @@ module = none
sysfs_path = /sys/class/android_usb/android0/functions
sysfs_value = rndis
sysfs_reset_value = none
softconnect_path = /sys/class/android_usb/android0/enable
softconnect = 1
softconnect_disconnect = 0
idProduct = 0A02
connman_tethering = /net/connman/technology/gadget
......@@ -9,8 +9,5 @@ appsync = 1
sysfs_path = /sys/class/android_usb/android0/functions
sysfs_value = rndis
sysfs_reset_value = none
softconnect_path = /sys/class/android_usb/android0/enable
softconnect = 1
softconnect_disconnect = 0
idProduct = 0A02
nat = 1
......@@ -9,8 +9,5 @@ appsync = 1
sysfs_path = /sys/class/android_usb/android0/functions
sysfs_value = rndis
sysfs_reset_value = none
softconnect_path = /sys/class/android_usb/android0/enable
softconnect = 1
softconnect_disconnect = 0
idProduct = 0A02
dhcp_server = 1
......@@ -9,9 +9,6 @@ network_interface = rndis0
sysfs_path = /sys/class/android_usb/android0/functions
sysfs_value = diag,serial,rmnet,qdss,adb,rndis
sysfs_reset_value = none
softconnect_path = /sys/class/android_usb/android0/enable
softconnect = 1
softconnect_disconnect = 0
android_extra_sysfs_path = /sys/class/android_usb/android0/f_diag/clients
android_extra_sysfs_value = diag
android_extra_sysfs_path2 = /sys/class/android_usb/android0/f_serial/transports
......
......@@ -9,9 +9,6 @@ network_interface = rndis0
sysfs_path = /sys/class/android_usb/android0/functions
sysfs_value = rndis,adb,diag,serial
sysfs_reset_value = none
softconnect_path = /sys/class/android_usb/android0/enable
softconnect = 1
softconnect_disconnect = 0
android_extra_sysfs_path = /sys/class/android_usb/android0/f_diag/clients
android_extra_sysfs_value = diag
android_extra_sysfs_path2 = /sys/class/android_usb/android0/f_serial/transports
......
......@@ -6,7 +6,4 @@ module = none
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
......@@ -6,6 +6,3 @@ module = none
sysfs_path = /sys/class/android_usb/android0/functions
sysfs_value = mtp
sysfs_reset_value = none
softconnect_path = /sys/class/android_usb/android0/enable
softconnect = 1
softconnect_disconnect = 0
......@@ -6,7 +6,4 @@ module = none
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
......@@ -7,7 +7,4 @@ appsync = 1
sysfs_path = /sys/class/android_usb/android0/functions
sysfs_value = mass_storage
sysfs_reset_value = none
softconnect_path = /sys/class/android_usb/android0/enable
softconnect = 1
softconnec_disconnect = 0
idProduct = 55AA
......@@ -237,8 +237,7 @@ Those files will be read on start and usb_moded will keep a list of apps to laun
for a certain mode. This also means that if you change the files or add/remove some
you need to restart usb_moded. Later when the mode is activated, usb_moded will start
each of them after the module has been loaded and keep track if they have been started.
It will warn you if that failed. This works together with an optional softconnect option
that will need kernel support.
It will warn you if that failed.
These services will start before the whole setup for the usb is done. In case the application
only works after everything has been set up, you can start the application at the end by adding
......@@ -264,9 +263,6 @@ network_interface = usb0
sysfs_path = /* in case you need to echo parameters somewhere in a sysfs path */
sysfs_value = /* the values */
sysfs_reset_value = /* in case a reset value needs to be written */
softconnect_path = /* a path in case the module needs activation with a softconnect option */
softconnect = /* value to be written to enable */
softconnect_disconnect = /* value to be written for disable */
Only the mode name and module are mandatory. In case you do not use modules, use none as the value
for module (as for the android gadget for example. See the android section for more info)
......@@ -330,9 +326,6 @@ network_interface = rndis0
sysfs_path = /sys/class/android_usb/android0/functions
sysfs_value = rndis
sysfs_reset_value = none
softconnect_path = /sys/class/android_usb/android0/enable
softconnect = 1
softconnec_disconnect = 0
idProduct = 0002
......
......@@ -61,9 +61,6 @@ void dynconfig_free_list_item(mode_list_elem *list_item)
free(list_item->sysfs_path);
free(list_item->sysfs_value);
free(list_item->sysfs_reset_value);
free(list_item->softconnect);
free(list_item->softconnect_disconnect);
free(list_item->softconnect_path);
free(list_item->android_extra_sysfs_path);
free(list_item->android_extra_sysfs_value);
free(list_item->android_extra_sysfs_path2);
......@@ -160,9 +157,6 @@ static struct mode_list_elem *dynconfig_read_mode_file(const gchar *filename)
list_item->sysfs_value = g_key_file_get_string(settingsfile, MODE_OPTIONS_ENTRY, MODE_SYSFS_VALUE, NULL);
//log_debug("Dynamic mode sysfs value = %s\n", list_item->sysfs_value);
list_item->sysfs_reset_value = g_key_file_get_string(settingsfile, MODE_OPTIONS_ENTRY, MODE_SYSFS_RESET_VALUE, NULL);
list_item->softconnect = g_key_file_get_string(settingsfile, MODE_OPTIONS_ENTRY, MODE_SOFTCONNECT, NULL);
list_item->softconnect_disconnect = g_key_file_get_string(settingsfile, MODE_OPTIONS_ENTRY, MODE_SOFTCONNECT_DISCONNECT, NULL);
list_item->softconnect_path = g_key_file_get_string(settingsfile, MODE_OPTIONS_ENTRY, MODE_SOFTCONNECT_PATH, NULL);
list_item->android_extra_sysfs_path = g_key_file_get_string(settingsfile, MODE_OPTIONS_ENTRY, MODE_ANDROID_EXTRA_SYSFS_PATH, NULL);
list_item->android_extra_sysfs_path2 = g_key_file_get_string(settingsfile, MODE_OPTIONS_ENTRY, MODE_ANDROID_EXTRA_SYSFS_PATH2, NULL);
list_item->android_extra_sysfs_path3 = g_key_file_get_string(settingsfile, MODE_OPTIONS_ENTRY, MODE_ANDROID_EXTRA_SYSFS_PATH3, NULL);
......@@ -200,11 +194,5 @@ static struct mode_list_elem *dynconfig_read_mode_file(const gchar *filename)
dynconfig_free_list_item(list_item);
return NULL;
}
if(list_item->softconnect && list_item->softconnect_path == NULL)
{
/* free list_item as it will not be used */
dynconfig_free_list_item(list_item);
return NULL;
}
return(list_item);
}
......@@ -46,15 +46,17 @@
# define MODE_NETWORK_INTERFACE_KEY "network_interface"
# define MODE_OPTIONS_ENTRY "options"
# define MODE_SYSFS_PATH "sysfs_path"
/* This is list of gadget functions, except for
* host-mode config ... */
# define MODE_SYSFS_VALUE "sysfs_value"
# define MODE_SYSFS_RESET_VALUE "sysfs_reset_value"
# define MODE_SOFTCONNECT "softconnect"
# define MODE_SOFTCONNECT_DISCONNECT "softconnect_disconnect"
# define MODE_SOFTCONNECT_PATH "softconnect_path"
/* Instead of hard-coding values that never change or have only one option,
android engineers prefered to have sysfs entries... go figure... */
# define MODE_ANDROID_EXTRA_SYSFS_PATH "android_extra_sysfs_path"
# define MODE_ANDROID_EXTRA_SYSFS_VALUE "android_extra_sysfs_value"
/* in combined android gadgets we sometime need more than one extra sysfs path or value */
# define MODE_ANDROID_EXTRA_SYSFS_PATH2 "android_extra_sysfs_path2"
# define MODE_ANDROID_EXTRA_SYSFS_VALUE2 "android_extra_sysfs_value2"
......@@ -62,11 +64,13 @@
# define MODE_ANDROID_EXTRA_SYSFS_VALUE3 "android_extra_sysfs_value3"
# define MODE_ANDROID_EXTRA_SYSFS_PATH4 "android_extra_sysfs_path4"
# define MODE_ANDROID_EXTRA_SYSFS_VALUE4 "android_extra_sysfs_value4"
/* For windows different modes/usb profiles need their own idProduct */
# define MODE_IDPRODUCT "idProduct"
# define MODE_IDVENDOROVERRIDE "idVendorOverride"
# define MODE_HAS_NAT "nat"
# define MODE_HAS_DHCP_SERVER "dhcp_server"
# ifdef CONNMAN
# define MODE_CONNMAN_TETHERING "connman_tethering"
# endif
......@@ -89,9 +93,6 @@ typedef struct mode_list_elem
char *sysfs_path; /**< Path to set sysfs options */
char *sysfs_value; /**< Option name/value to write to sysfs */
char *sysfs_reset_value; /**< Value to reset the the sysfs to default */
char *softconnect; /**< Value to be written to softconnect interface */
char *softconnect_disconnect; /**< Value to set on the softconnect interface to disable after disconnect */
char *softconnect_path; /**< Path for the softconnect */
char *android_extra_sysfs_path; /**< Path for static value that never changes that needs to be set by sysfs :( */
char *android_extra_sysfs_value; /**< Static value that never changes that needs to be set by sysfs :( */
char *android_extra_sysfs_path2; /**< Path for static value that never changes that needs to be set by sysfs :( */
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment