Commit cede2cb6 authored by Pekka Enberg's avatar Pekka Enberg Committed by Len Brown

eeepc-laptop: enable camera by default

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.

To reduce power usage you should enable USB autosuspend:
echo -n auto > /sys/bus/usb/drivers/uvcvideo/*:*/../power/level
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarPekka Enberg <penberg@cs.helsinki.fi>
Signed-off-by: default avatarCorentin Chary <corentincj@iksaif.net>
Signed-off-by: default avatarLen Brown <len.brown@intel.com>
parent 57599cc9
......@@ -321,6 +321,15 @@ static const struct rfkill_ops eeepc_rfkill_ops = {
.set_block = eeepc_rfkill_set,
};
static void __init eeepc_enable_camera(void)
{
/*
* If the following call to set_acpi() fails, it's because there's no
* camera so we can ignore the error.
*/
set_acpi(CM_ASL_CAMERA, 1);
}
/*
* Sys helpers
*/
......@@ -983,6 +992,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)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment