Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 272011
b: refs/heads/master
c: f43d9ec
h: refs/heads/master
i:
  272009: 695a7d8
  272007: f71cc64
v: v3
  • Loading branch information
Ike Panhc authored and Matthew Garrett committed Oct 24, 2011
1 parent 5490192 commit a765ad6
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 3 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 923de84ab07cfcee75946191f17a6e7fb98e3ac8
refs/heads/master: f43d9ec06028b8cb122a7a2b367a7af066342918
21 changes: 19 additions & 2 deletions trunk/drivers/platform/x86/ideapad-laptop.c
Original file line number Diff line number Diff line change
Expand Up @@ -386,8 +386,10 @@ static void ideapad_platform_exit(struct ideapad_private *priv)
* input device
*/
static const struct key_entry ideapad_keymap[] = {
{ KE_KEY, 0x06, { KEY_SWITCHVIDEOMODE } },
{ KE_KEY, 0x0D, { KEY_WLAN } },
{ KE_KEY, 6, { KEY_SWITCHVIDEOMODE } },
{ KE_KEY, 13, { KEY_WLAN } },
{ KE_KEY, 16, { KEY_PROG1 } },
{ KE_KEY, 17, { KEY_PROG2 } },
{ KE_END, 0 },
};

Expand Down Expand Up @@ -442,6 +444,18 @@ static void ideapad_input_report(struct ideapad_private *priv,
sparse_keymap_report_event(priv->inputdev, scancode, 1, true);
}

static void ideapad_input_novokey(struct ideapad_private *priv)
{
unsigned long long_pressed;

if (read_ec_data(ideapad_handle, VPCCMD_R_NOVO, &long_pressed))
return;
if (long_pressed)
ideapad_input_report(priv, 17);
else
ideapad_input_report(priv, 16);
}

/*
* backlight
*/
Expand Down Expand Up @@ -634,6 +648,9 @@ static void ideapad_acpi_notify(struct acpi_device *adevice, u32 event)
case 4:
ideapad_backlight_notify_brightness(priv);
break;
case 3:
ideapad_input_novokey(priv);
break;
case 2:
ideapad_backlight_notify_power(priv);
break;
Expand Down

0 comments on commit a765ad6

Please sign in to comment.