[Debian-eeepc-devel] toggling bluetooth with 2.6.26 kernel

Bernd.Spaeth at gmx.net Bernd.Spaeth at gmx.net
Tue Oct 7 21:50:36 UTC 2008


Hugh, ClickToTap sometimes seems to be really punishing, especially if the pointer is hovering above the send button -  sorry for that!

What I wantet to say is, that I really didn't know there already exists a reference to a filename under the /sys directory for that purpose. Since the author of the original patch chose the name bt under /proc/acpi/asus, I thought it was a wise idea to name it bt also.

To change the name to bluetooth you simply should have to change the first argument to the EEPC_CREATE_DEVICE_ATTR macro  to bluetooth. Since this will also change the name of the created device_attribute struct, in the pointer added to platform_attributes has to be renamed to &dev_attr_bluetooth.attr.

 Diff of original kernel version and modified version below:

--- a/drivers/misc/eeepc-laptop.c	2008-10-05 19:23:29.000000000 +0200
+++ b/drivers/misc/eeepc-laptop.c	2008-10-07 23:40:27.000000000 +0200
@@ -88,7 +88,7 @@
 };
 
 const char *cm_getv[] = {
-	"WLDG", NULL, NULL, NULL,
+	"WLDG", "BTHG", NULL, NULL,
 	"CAMG", NULL, NULL, NULL,
 	NULL, "PBLG", NULL, NULL,
 	"CFVG", NULL, NULL, NULL,
@@ -97,7 +97,7 @@
 };
 
 const char *cm_setv[] = {
-	"WLDS", NULL, NULL, NULL,
+	"WLDS", "BTHS", NULL, NULL,
 	"CAMS", NULL, NULL, NULL,
 	"SDSP", "PBLS", "HDPS", NULL,
 	"CFVS", NULL, NULL, NULL,
@@ -312,12 +312,14 @@
 EEEPC_CREATE_DEVICE_ATTR(cardr, CM_ASL_CARDREADER);
 EEEPC_CREATE_DEVICE_ATTR(disp, CM_ASL_DISPLAYSWITCH);
 EEEPC_CREATE_DEVICE_ATTR(wlan, CM_ASL_WLAN);
+EEEPC_CREATE_DEVICE_ATTR(bluetooth, CM_ASL_BLUETOOTH);
 
 static struct attribute *platform_attributes[] = {
 	&dev_attr_camera.attr,
 	&dev_attr_cardr.attr,
 	&dev_attr_disp.attr,
 	&dev_attr_wlan.attr,
+	&dev_attr_bluetooth.attr,
 	NULL
 };


-- 
GMX startet ShortView.de. Hier findest Du Leute mit Deinen Interessen!
Jetzt dabei sein: http://www.shortview.de/wasistshortview.php?mc=sv_ext_mf@gmx



More information about the Debian-eeepc-devel mailing list