Commit ee8fb66e authored by Philippe De Swert's avatar Philippe De Swert

Adding soft-connect support for udc type usb controllers

Signed-off-by: default avatarPhilippe De Swert <philippe.deswert@jollamobile.com>
parent 7c8b1d47
......@@ -3,6 +3,7 @@ usb-moded (0.55) unstable; urgency=low
* Add android gadget driver support
* Make udev default
* Add rescue mode
* Add softconnect support
-- Philippe De Swert <philippedeswert@jollamobile.com> Wed, 12 Dec 2012 22:57:42 +0200
......
......@@ -132,6 +132,11 @@ const char * get_network_gateway(void)
return(get_conf_string(NETWORK_ENTRY, NETWORK_GATEWAY_KEY));
}
const char * get_soft_connect_path(void)
{
return(get_conf_string(SOFT_CONNECT_ENTRY, SOFT_CONNECT_PATH_KEY));
}
/* create basic conffile with sensible defaults */
static void create_conf_file(void)
{
......
......@@ -48,6 +48,8 @@
#define NETWORK_IP_KEY "ip"
#define NETWORK_INTERFACE_KEY "interface"
#define NETWORK_GATEWAY_KEY "gateway"
#define SOFT_CONNECT_ENTRY "soft_connect"
#define SOFT_CONNECT_PATH_KEY "soft_connect_path"
const char * find_mounts(void);
int find_sync(void);
......@@ -74,3 +76,5 @@ const char * get_trigger_value(void);
const char * get_network_ip(void);
const char * get_network_interface(void);
const char * get_network_gateway(void);
const char * get_soft_connect_path(void);
......@@ -38,10 +38,8 @@
#include "usb_moded-dbus.h"
#include "usb_moded-dbus-private.h"
#include "usb_moded-config.h"
#ifdef NOKIA
#include "usb_moded-modesetting.h"
#include "usb_moded-modes.h"
#endif
/* kmod context - initialized at start in usb_moded_init */
struct kmod_ctx *ctx;
......@@ -55,6 +53,7 @@ struct kmod_ctx *ctx;
int usb_moded_load_module(const char *module)
{
int ret = 0;
const char * softconnect;
#ifdef NO_KMOD
gchar *command;
......@@ -95,6 +94,12 @@ int usb_moded_load_module(const char *module)
kmod_module_unref(mod);
#endif /* NO_KMOD */
softconnect = get_soft_connect_path();
if(softconnect)
{
write_to_file(softconnect, "connect");
free((void *)softconnect);
}
if( ret == 0)
log_info("Module %s loaded successfully\n", module);
return(ret);
......
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