public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] eeepc-laptop: enable camera by default
@ 2009-06-05  8:59 Pekka J Enberg
  2009-06-05 11:46 ` Corentin Chary
  2009-06-05 20:08 ` Andrew Morton
  0 siblings, 2 replies; 32+ messages in thread
From: Pekka J Enberg @ 2009-06-05  8:59 UTC (permalink / raw)
  To: corentincj; +Cc: acpi4asus-user, len.brown, linux-kernel

From: Pekka Enberg <penberg@cs.helsinki.fi>

If we leave the camera disabled by default, userspace programs (e.g. 
Skype, Cheese) leave the user out in the cold saying that the machine "has 
no camera." Therefore, it's better to enable camera by default and let 
people who really don't want it just disable the thing.

Cc: <acpi4asus-user@lists.sourceforge.net>
Cc: Len Brown <len.brown@intel.com>
Signed-off-by: Pekka Enberg <penberg@cs.helsinki.fi>
---
 drivers/platform/x86/eeepc-laptop.c |   16 ++++++++++++++++
 1 files changed, 16 insertions(+), 0 deletions(-)

diff --git a/drivers/platform/x86/eeepc-laptop.c b/drivers/platform/x86/eeepc-laptop.c
index 353a898..c0f8eb1 100644
--- a/drivers/platform/x86/eeepc-laptop.c
+++ b/drivers/platform/x86/eeepc-laptop.c
@@ -334,6 +334,19 @@ static int eeepc_bluetooth_rfkill_state(void *data, enum rfkill_state *state)
 }
 
 /*
+ * Camera helpers
+ */
+
+static void eeepc_enable_camera(void)
+{
+	int err;
+
+	err = set_acpi(CM_ASL_CAMERA, 1);
+	if (err)
+		printk(EEEPC_WARNING "Unable to enable camera %d\n", err);
+}
+
+/*
  * Sys helpers
  */
 static int parse_arg(const char *buf, unsigned long count, int *val)
@@ -996,6 +1009,9 @@ static int __init eeepc_laptop_init(void)
 	result = eeepc_hwmon_init(dev);
 	if (result)
 		goto fail_hwmon;
+
+	eeepc_enable_camera();
+
 	/* Register platform stuff */
 	result = platform_driver_register(&platform_driver);
 	if (result)
-- 
1.5.6.3


^ permalink raw reply related	[flat|nested] 32+ messages in thread

end of thread, other threads:[~2009-06-08 20:44 UTC | newest]

Thread overview: 32+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-06-05  8:59 [PATCH] eeepc-laptop: enable camera by default Pekka J Enberg
2009-06-05 11:46 ` Corentin Chary
2009-06-05 12:44   ` Pekka Enberg
2009-06-05 13:02     ` Corentin Chary
2009-06-05 13:39       ` Alan Jenkins
2009-06-05 13:51       ` Pekka Enberg
2009-06-05 13:54         ` Pekka Enberg
2009-06-05 13:58         ` Corentin Chary
2009-06-05 14:38         ` Alan Jenkins
2009-06-05 14:50           ` Pekka Enberg
2009-06-05 14:55             ` Alan Jenkins
2009-06-05 15:08               ` Alan Jenkins
2009-06-05 15:14                 ` Pekka Enberg
2009-06-07 14:54                 ` Darren Salt
2009-06-07 15:41                   ` Alan Jenkins
2009-06-07 23:28                     ` Matthew Garrett
2009-06-08  3:03                       ` Alan Stern
2009-06-08  3:07                         ` Matthew Garrett
2009-06-08  3:10                           ` Alan Stern
2009-06-08 15:00                             ` Matthew Garrett
2009-06-08 20:44                               ` Alan Stern
2009-06-05 15:13               ` Alan Stern
2009-06-05 15:22                 ` Pekka Enberg
2009-06-05 21:01   ` Woody Suwalski
2009-06-06  7:12     ` Corentin Chary
2009-06-06  8:04       ` Alan Jenkins
2009-06-05 20:08 ` Andrew Morton
2009-06-06  7:25   ` Corentin Chary
2009-06-06  7:31     ` Andrew Morton
2009-06-06  7:52       ` Corentin Chary
2009-06-06  9:17         ` Pekka Enberg
2009-06-06 10:17           ` Corentin Chary

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox