Skip to contentSkip to conversation

eeepc-laptop bt and fan

PATCH In review Corentin CHARY 3 participants 5 messages Jul 12, 2008 – Jul 24, 2008 2 messages not in the archive

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

cover eeepc-laptop bt and fan

Hi,

Two patchs from Alexandre d'Alton. The bt patch add a file to switch BT power. The fan patch create a name file to make libsensors work.

Thanks

-------------------------------------------------------------------------
Sponsored by: SourceForge.net Community Choice Awards: VOTE NOW! Studies have shown that voting for your favorite open source project, along with a healthy diet, reduces your potential for chronic lameness and boredom. Vote Now at http://www.sourceforge.net/community/cca08

#2 lore raw

PATCH 1/2 eeepc-laptop: add bt support

In reply to a message not in the archive

From: Alexandre d'Alton <alex-jojFES6RfZNxtahE/[email protected]>

Adds a bt file that allows to switch the BT power if
a BT module is added to the BT_CON connector of the eeepc 900, I think it will also work for the 901 that has BT by default.

---
 eeepc-laptop.c |    6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)
drivers/misc/eeepc-laptop.c +4 -2
@@ -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(bt, 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_bt.attr,
 	NULL
 };
 

-------------------------------------------------------------------------
Sponsored by: SourceForge.net Community Choice Awards: VOTE NOW! Studies have shown that voting for your favorite open source project, along with a healthy diet, reduces your potential for chronic lameness and boredom. Vote Now at http://www.sourceforge.net/community/cca08

#5 lore raw

PATCH 2/2 eeepc-laptop: make libsensors work

In reply to Corentin CHARY

From: Alexandre d'Alton <[email protected]>

Creates a name file in the sysfs directory, that seems to be needed for the libsensors library to work.

---
 eeepc-laptop.c |    8 ++++++++
 1 file changed, 8 insertions(+)
drivers/misc/eeepc-laptop.c +8 -0
@@ -527,10 +527,18 @@
 EEEPC_CREATE_SENSOR_ATTR(pwm1_enable, S_IRUGO | S_IWUSR,
 			 eeepc_get_fan_ctrl, eeepc_set_fan_ctrl);
 
+static ssize_t
+show_name(struct device *dev, struct device_attribute *attr, char *buf)
+{
+	return sprintf(buf, "fan\n");
+}
+static SENSOR_DEVICE_ATTR(name, S_IRUGO, show_name, NULL);
+
 static struct attribute *hwmon_attributes[] = {
 	&sensor_dev_attr_fan1_pwm.dev_attr.attr,
 	&sensor_dev_attr_fan1_input.dev_attr.attr,
 	&sensor_dev_attr_pwm1_enable.dev_attr.attr,
+	&sensor_dev_attr_name.dev_attr.attr,
 	NULL
 };
 
#4 lore raw

Re: [PATCH 1/2] eeepc-laptop: add bt support

In reply to a message not in the archive

Please use the rfkill interface for this, rather than adding another special-cased attribute.

Signature · 7 lines
Matthew Garrett | [email protected]

-------------------------------------------------------------------------
Sponsored by: SourceForge.net Community Choice Awards: VOTE NOW!
Studies have shown that voting for your favorite open source project,
along with a healthy diet, reduces your potential for chronic lameness
and boredom. Vote Now at http://www.sourceforge.net/community/cca08