usb: gadget: f_phonet: convert to new function interface with backward compatibility

Converting f_phonet to the new function interface requires converting
the f_phonet's function code and its users.

This patch converts the f_phonet.c to the new function interface.

The file is now compiled into a separate usb_f_phonet.ko module.

The old function interface is provided by means of preprocessor
conditional directives. After all users are converted, the old interface
can be removed.

Signed-off-by: Andrzej Pietrasiewicz <andrzej.p@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
diff --git a/drivers/usb/gadget/u_phonet.h b/drivers/usb/gadget/u_phonet.h
index 459ee32..1ff5ad5 100644
--- a/drivers/usb/gadget/u_phonet.h
+++ b/drivers/usb/gadget/u_phonet.h
@@ -14,6 +14,15 @@
 #include <linux/usb/composite.h>
 #include <linux/usb/cdc.h>
 
+struct f_phonet_opts {
+	struct usb_function_instance func_inst;
+	bool bound;
+	struct net_device *net;
+};
+
+struct net_device *gphonet_setup_default(void);
+void gphonet_set_gadget(struct net_device *net, struct usb_gadget *g);
+int gphonet_register_netdev(struct net_device *net);
 struct net_device *gphonet_setup(struct usb_gadget *gadget);
 int phonet_bind_config(struct usb_configuration *c, struct net_device *dev);
 void gphonet_cleanup(struct net_device *dev);