Merge branch 'asus' into release

Conflicts:
	Documentation/feature-removal-schedule.txt
	drivers/platform/x86/eeepc-laptop.c

Signed-off-by: Len Brown <len.brown@intel.com>
This commit is contained in:
Len Brown 2009-12-15 22:34:48 -05:00
commit 9a3bff236b
5 changed files with 871 additions and 701 deletions

View file

@ -474,3 +474,22 @@ Why: Obsoleted by the adt7475 driver.
Who: Jean Delvare <khali@linux-fr.org> Who: Jean Delvare <khali@linux-fr.org>
--------------------------- ---------------------------
What: Support for lcd_switch and display_get in asus-laptop driver
When: March 2010
Why: These two features use non-standard interfaces. There are the
only features that really need multiple path to guess what's
the right method name on a specific laptop.
Removing them will allow to remove a lot of code an significantly
clean the drivers.
This will affect the backlight code which won't be able to know
if the backlight is on or off. The platform display file will also be
write only (like the one in eeepc-laptop).
This should'nt affect a lot of user because they usually know
when their display is on or off.
Who: Corentin Chary <corentin.chary@gmail.com>
----------------------------

View file

@ -334,6 +334,8 @@ config EEEPC_LAPTOP
depends on HOTPLUG_PCI depends on HOTPLUG_PCI
select BACKLIGHT_CLASS_DEVICE select BACKLIGHT_CLASS_DEVICE
select HWMON select HWMON
select LEDS_CLASS
select NEW_LEDS
---help--- ---help---
This driver supports the Fn-Fx keys on Eee PC laptops. This driver supports the Fn-Fx keys on Eee PC laptops.

View file

@ -221,6 +221,7 @@ static struct asus_hotk *hotk;
*/ */
static const struct acpi_device_id asus_device_ids[] = { static const struct acpi_device_id asus_device_ids[] = {
{"ATK0100", 0}, {"ATK0100", 0},
{"ATK0101", 0},
{"", 0}, {"", 0},
}; };
MODULE_DEVICE_TABLE(acpi, asus_device_ids); MODULE_DEVICE_TABLE(acpi, asus_device_ids);
@ -232,6 +233,7 @@ static void asus_hotk_notify(struct acpi_device *device, u32 event);
static struct acpi_driver asus_hotk_driver = { static struct acpi_driver asus_hotk_driver = {
.name = ASUS_HOTK_NAME, .name = ASUS_HOTK_NAME,
.class = ASUS_HOTK_CLASS, .class = ASUS_HOTK_CLASS,
.owner = THIS_MODULE,
.ids = asus_device_ids, .ids = asus_device_ids,
.flags = ACPI_DRIVER_ALL_NOTIFY_EVENTS, .flags = ACPI_DRIVER_ALL_NOTIFY_EVENTS,
.ops = { .ops = {
@ -293,6 +295,11 @@ struct key_entry {
enum { KE_KEY, KE_END }; enum { KE_KEY, KE_END };
static struct key_entry asus_keymap[] = { static struct key_entry asus_keymap[] = {
{KE_KEY, 0x02, KEY_SCREENLOCK},
{KE_KEY, 0x05, KEY_WLAN},
{KE_KEY, 0x08, KEY_F13},
{KE_KEY, 0x17, KEY_ZOOM},
{KE_KEY, 0x1f, KEY_BATTERY},
{KE_KEY, 0x30, KEY_VOLUMEUP}, {KE_KEY, 0x30, KEY_VOLUMEUP},
{KE_KEY, 0x31, KEY_VOLUMEDOWN}, {KE_KEY, 0x31, KEY_VOLUMEDOWN},
{KE_KEY, 0x32, KEY_MUTE}, {KE_KEY, 0x32, KEY_MUTE},
@ -312,8 +319,11 @@ static struct key_entry asus_keymap[] = {
{KE_KEY, 0x5F, KEY_WLAN}, {KE_KEY, 0x5F, KEY_WLAN},
{KE_KEY, 0x60, KEY_SWITCHVIDEOMODE}, {KE_KEY, 0x60, KEY_SWITCHVIDEOMODE},
{KE_KEY, 0x61, KEY_SWITCHVIDEOMODE}, {KE_KEY, 0x61, KEY_SWITCHVIDEOMODE},
{KE_KEY, 0x6B, BTN_TOUCH}, /* Lock Mouse */ {KE_KEY, 0x62, KEY_SWITCHVIDEOMODE},
{KE_KEY, 0x63, KEY_SWITCHVIDEOMODE},
{KE_KEY, 0x6B, KEY_F13}, /* Lock Touchpad */
{KE_KEY, 0x82, KEY_CAMERA}, {KE_KEY, 0x82, KEY_CAMERA},
{KE_KEY, 0x88, KEY_WLAN },
{KE_KEY, 0x8A, KEY_PROG1}, {KE_KEY, 0x8A, KEY_PROG1},
{KE_KEY, 0x95, KEY_MEDIA}, {KE_KEY, 0x95, KEY_MEDIA},
{KE_KEY, 0x99, KEY_PHONE}, {KE_KEY, 0x99, KEY_PHONE},
@ -1240,9 +1250,6 @@ static int asus_hotk_add(struct acpi_device *device)
{ {
int result; int result;
if (!device)
return -EINVAL;
pr_notice("Asus Laptop Support version %s\n", pr_notice("Asus Laptop Support version %s\n",
ASUS_LAPTOP_VERSION); ASUS_LAPTOP_VERSION);
@ -1283,8 +1290,8 @@ static int asus_hotk_add(struct acpi_device *device)
hotk->ledd_status = 0xFFF; hotk->ledd_status = 0xFFF;
/* Set initial values of light sensor and level */ /* Set initial values of light sensor and level */
hotk->light_switch = 1; /* Default to light sensor disabled */ hotk->light_switch = 0; /* Default to light sensor disabled */
hotk->light_level = 0; /* level 5 for sensor sensitivity */ hotk->light_level = 5; /* level 5 for sensor sensitivity */
if (ls_switch_handle) if (ls_switch_handle)
set_light_sens_switch(hotk->light_switch); set_light_sens_switch(hotk->light_switch);
@ -1306,9 +1313,6 @@ end:
static int asus_hotk_remove(struct acpi_device *device, int type) static int asus_hotk_remove(struct acpi_device *device, int type)
{ {
if (!device || !acpi_driver_data(device))
return -EINVAL;
kfree(hotk->name); kfree(hotk->name);
kfree(hotk); kfree(hotk);
@ -1444,9 +1448,6 @@ static int __init asus_laptop_init(void)
{ {
int result; int result;
if (acpi_disabled)
return -ENODEV;
result = acpi_bus_register_driver(&asus_hotk_driver); result = acpi_bus_register_driver(&asus_hotk_driver);
if (result < 0) if (result < 0)
return result; return result;

View file

@ -466,6 +466,7 @@ MODULE_DEVICE_TABLE(acpi, asus_device_ids);
static struct acpi_driver asus_hotk_driver = { static struct acpi_driver asus_hotk_driver = {
.name = "asus_acpi", .name = "asus_acpi",
.class = ACPI_HOTK_CLASS, .class = ACPI_HOTK_CLASS,
.owner = THIS_MODULE,
.ids = asus_device_ids, .ids = asus_device_ids,
.flags = ACPI_DRIVER_ALL_NOTIFY_EVENTS, .flags = ACPI_DRIVER_ALL_NOTIFY_EVENTS,
.ops = { .ops = {
@ -1334,9 +1335,6 @@ static int asus_hotk_add(struct acpi_device *device)
acpi_status status = AE_OK; acpi_status status = AE_OK;
int result; int result;
if (!device)
return -EINVAL;
printk(KERN_NOTICE "Asus Laptop ACPI Extras version %s\n", printk(KERN_NOTICE "Asus Laptop ACPI Extras version %s\n",
ASUS_ACPI_VERSION); ASUS_ACPI_VERSION);
@ -1392,9 +1390,6 @@ end:
static int asus_hotk_remove(struct acpi_device *device, int type) static int asus_hotk_remove(struct acpi_device *device, int type)
{ {
if (!device || !acpi_driver_data(device))
return -EINVAL;
asus_hotk_remove_fs(device); asus_hotk_remove_fs(device);
kfree(hotk); kfree(hotk);
@ -1422,21 +1417,17 @@ static int __init asus_acpi_init(void)
{ {
int result; int result;
if (acpi_disabled) result = acpi_bus_register_driver(&asus_hotk_driver);
return -ENODEV; if (result < 0)
return result;
asus_proc_dir = proc_mkdir(PROC_ASUS, acpi_root_dir); asus_proc_dir = proc_mkdir(PROC_ASUS, acpi_root_dir);
if (!asus_proc_dir) { if (!asus_proc_dir) {
printk(KERN_ERR "Asus ACPI: Unable to create /proc entry\n"); printk(KERN_ERR "Asus ACPI: Unable to create /proc entry\n");
acpi_bus_unregister_driver(&asus_hotk_driver);
return -ENODEV; return -ENODEV;
} }
result = acpi_bus_register_driver(&asus_hotk_driver);
if (result < 0) {
remove_proc_entry(PROC_ASUS, acpi_root_dir);
return result;
}
/* /*
* This is a bit of a kludge. We only want this module loaded * This is a bit of a kludge. We only want this module loaded
* for ASUS systems, but there's currently no way to probe the * for ASUS systems, but there's currently no way to probe the

File diff suppressed because it is too large Load diff