Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

misc: dummy function for HTC ril

commit 2a32a61dd57e1047ee37bcc7a2929098264a26c7 1 parent ac3270c
@Kali- Kali- authored
View
9 arch/arm/configs/cyanogen_bravo_defconfig
@@ -1,7 +1,7 @@
#
# Automatically generated make config: don't edit
# Linux/arm 2.6.37.6 Kernel Configuration
-# Tue Jan 10 12:38:57 2012
+# Fri Mar 23 21:37:38 2012
#
CONFIG_ARM=y
CONFIG_SYS_SUPPORTS_APM_EMULATION=y
@@ -413,7 +413,7 @@ CONFIG_DEFAULT_MMAP_MIN_ADDR=32768
CONFIG_NEED_PER_CPU_KM=y
CONFIG_FORCE_MAX_ZONEORDER=11
CONFIG_ALIGNMENT_TRAP=y
-CONFIG_ALLOW_CPU_ALIGNMENT=y
+# CONFIG_ALLOW_CPU_ALIGNMENT is not set
# CONFIG_UACCESS_WITH_MEMCPY is not set
# CONFIG_SECCOMP is not set
# CONFIG_CC_STACKPROTECTOR is not set
@@ -490,9 +490,9 @@ CONFIG_EARLYSUSPEND=y
# CONFIG_NO_USER_SPACE_SCREEN_ACCESS_CONTROL is not set
CONFIG_FB_EARLYSUSPEND=y
# CONFIG_APM_EMULATION is not set
-CONFIG_PM_RUNTIME=y
+# CONFIG_PM_RUNTIME is not set
CONFIG_PM_OPS=y
-CONFIG_SUSPEND_TIME=y
+# CONFIG_SUSPEND_TIME is not set
CONFIG_ARCH_SUSPEND_POSSIBLE=y
CONFIG_NET=y
@@ -1467,6 +1467,7 @@ CONFIG_USB_CSW_HACK=y
# CONFIG_USB_G_MULTI is not set
# CONFIG_USB_G_HID is not set
# CONFIG_USB_G_DBGP is not set
+CONFIG_USB_HTC_SWITCH_STUB=y
#
# OTG and related infrastructure
View
3  arch/arm/configs/cyanogen_bravoc_defconfig
@@ -1,7 +1,7 @@
#
# Automatically generated make config: don't edit
# Linux/arm 2.6.37.6 Kernel Configuration
-# Wed Jan 11 02:32:39 2012
+# Fri Mar 23 21:37:57 2012
#
CONFIG_ARM=y
CONFIG_SYS_SUPPORTS_APM_EMULATION=y
@@ -1467,6 +1467,7 @@ CONFIG_USB_CSW_HACK=y
# CONFIG_USB_G_MULTI is not set
# CONFIG_USB_G_HID is not set
# CONFIG_USB_G_DBGP is not set
+CONFIG_USB_HTC_SWITCH_STUB=y
#
# OTG and related infrastructure
View
6 drivers/usb/gadget/Kconfig
@@ -1065,3 +1065,9 @@ config USB_BYPASS_VBUS_NOTIFY
endif # USB_MSM_72K_HTC
endif # USB_GADGET
+
+config USB_HTC_SWITCH_STUB
+ bool "USB HTC function switch stub"
+ default n
+ help
+ HTC usb_function_switch stub
View
31 drivers/usb/gadget/msm72k_udc.c
@@ -1735,6 +1735,32 @@ static ssize_t usb_remote_wakeup(struct device *dev,
}
static DEVICE_ATTR(wakeup, S_IWUSR, 0, usb_remote_wakeup);
+#ifdef CONFIG_USB_HTC_SWITCH_STUB
+int android_show_function(char *buf)
+{
+ unsigned length = 0;
+
+ length += sprintf(buf + length, "ether:disable\n");
+
+ return length;
+}
+
+static ssize_t show_usb_function_switch(struct device *dev,
+ struct device_attribute *attr, char *buf)
+{
+ return android_show_function(buf);
+}
+
+static ssize_t store_usb_function_switch(struct device *dev,
+ struct device_attribute *attr, const char *buf, size_t count)
+{
+ return 0;
+}
+
+static DEVICE_ATTR(usb_function_switch, 0664,
+ show_usb_function_switch, store_usb_function_switch);
+#endif
+
static int msm72k_probe(struct platform_device *pdev)
{
struct resource *res;
@@ -1884,6 +1910,11 @@ int usb_gadget_probe_driver(struct usb_gadget_driver *driver,
goto fail;
}
+#ifdef CONFIG_USB_HTC_SWITCH_STUB
+ retval = device_create_file(ui->gadget.dev.parent,
+ &dev_attr_usb_function_switch);
+#endif
+
/* create sysfs node for remote wakeup */
retval = device_create_file(&ui->gadget.dev, &dev_attr_wakeup);
if (retval != 0)
Please sign in to comment.
Something went wrong with that request. Please try again.