Skip to content

Commit

Permalink
Merge branch 'asus' into release
Browse files Browse the repository at this point in the history
Conflicts:
	Documentation/feature-removal-schedule.txt
	drivers/platform/x86/eeepc-laptop.c

Signed-off-by: Len Brown <len.brown@intel.com>
  • Loading branch information
Len Brown committed Dec 16, 2009
2 parents 173cc11 + d951d4c commit 9a3bff2
Show file tree
Hide file tree
Showing 5 changed files with 838 additions and 668 deletions.
19 changes: 19 additions & 0 deletions Documentation/feature-removal-schedule.txt
Original file line number Diff line number Diff line change
Expand Up @@ -474,3 +474,22 @@ Why: Obsoleted by the adt7475 driver.
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>

----------------------------
2 changes: 2 additions & 0 deletions drivers/platform/x86/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -334,6 +334,8 @@ config EEEPC_LAPTOP
depends on HOTPLUG_PCI
select BACKLIGHT_CLASS_DEVICE
select HWMON
select LEDS_CLASS
select NEW_LEDS
---help---
This driver supports the Fn-Fx keys on Eee PC laptops.

Expand Down
25 changes: 13 additions & 12 deletions drivers/platform/x86/asus-laptop.c
Original file line number Diff line number Diff line change
Expand Up @@ -221,6 +221,7 @@ static struct asus_hotk *hotk;
*/
static const struct acpi_device_id asus_device_ids[] = {
{"ATK0100", 0},
{"ATK0101", 0},
{"", 0},
};
MODULE_DEVICE_TABLE(acpi, asus_device_ids);
Expand All @@ -232,6 +233,7 @@ static void asus_hotk_notify(struct acpi_device *device, u32 event);
static struct acpi_driver asus_hotk_driver = {
.name = ASUS_HOTK_NAME,
.class = ASUS_HOTK_CLASS,
.owner = THIS_MODULE,
.ids = asus_device_ids,
.flags = ACPI_DRIVER_ALL_NOTIFY_EVENTS,
.ops = {
Expand Down Expand Up @@ -293,6 +295,11 @@ struct key_entry {
enum { KE_KEY, KE_END };

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, 0x31, KEY_VOLUMEDOWN},
{KE_KEY, 0x32, KEY_MUTE},
Expand All @@ -312,8 +319,11 @@ static struct key_entry asus_keymap[] = {
{KE_KEY, 0x5F, KEY_WLAN},
{KE_KEY, 0x60, 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, 0x88, KEY_WLAN },
{KE_KEY, 0x8A, KEY_PROG1},
{KE_KEY, 0x95, KEY_MEDIA},
{KE_KEY, 0x99, KEY_PHONE},
Expand Down Expand Up @@ -1240,9 +1250,6 @@ static int asus_hotk_add(struct acpi_device *device)
{
int result;

if (!device)
return -EINVAL;

pr_notice("Asus Laptop Support version %s\n",
ASUS_LAPTOP_VERSION);

Expand Down Expand Up @@ -1283,8 +1290,8 @@ static int asus_hotk_add(struct acpi_device *device)
hotk->ledd_status = 0xFFF;

/* Set initial values of light sensor and level */
hotk->light_switch = 1; /* Default to light sensor disabled */
hotk->light_level = 0; /* level 5 for sensor sensitivity */
hotk->light_switch = 0; /* Default to light sensor disabled */
hotk->light_level = 5; /* level 5 for sensor sensitivity */

if (ls_switch_handle)
set_light_sens_switch(hotk->light_switch);
Expand All @@ -1306,9 +1313,6 @@ static int asus_hotk_add(struct acpi_device *device)

static int asus_hotk_remove(struct acpi_device *device, int type)
{
if (!device || !acpi_driver_data(device))
return -EINVAL;

kfree(hotk->name);
kfree(hotk);

Expand Down Expand Up @@ -1444,9 +1448,6 @@ static int __init asus_laptop_init(void)
{
int result;

if (acpi_disabled)
return -ENODEV;

result = acpi_bus_register_driver(&asus_hotk_driver);
if (result < 0)
return result;
Expand Down
19 changes: 5 additions & 14 deletions drivers/platform/x86/asus_acpi.c
Original file line number Diff line number Diff line change
Expand Up @@ -466,6 +466,7 @@ MODULE_DEVICE_TABLE(acpi, asus_device_ids);
static struct acpi_driver asus_hotk_driver = {
.name = "asus_acpi",
.class = ACPI_HOTK_CLASS,
.owner = THIS_MODULE,
.ids = asus_device_ids,
.flags = ACPI_DRIVER_ALL_NOTIFY_EVENTS,
.ops = {
Expand Down Expand Up @@ -1334,9 +1335,6 @@ static int asus_hotk_add(struct acpi_device *device)
acpi_status status = AE_OK;
int result;

if (!device)
return -EINVAL;

printk(KERN_NOTICE "Asus Laptop ACPI Extras version %s\n",
ASUS_ACPI_VERSION);

Expand Down Expand Up @@ -1392,9 +1390,6 @@ static int asus_hotk_add(struct acpi_device *device)

static int asus_hotk_remove(struct acpi_device *device, int type)
{
if (!device || !acpi_driver_data(device))
return -EINVAL;

asus_hotk_remove_fs(device);

kfree(hotk);
Expand Down Expand Up @@ -1422,21 +1417,17 @@ static int __init asus_acpi_init(void)
{
int result;

if (acpi_disabled)
return -ENODEV;
result = acpi_bus_register_driver(&asus_hotk_driver);
if (result < 0)
return result;

asus_proc_dir = proc_mkdir(PROC_ASUS, acpi_root_dir);
if (!asus_proc_dir) {
printk(KERN_ERR "Asus ACPI: Unable to create /proc entry\n");
acpi_bus_unregister_driver(&asus_hotk_driver);
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
* for ASUS systems, but there's currently no way to probe the
Expand Down
Loading

0 comments on commit 9a3bff2

Please sign in to comment.