Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 62554
b: refs/heads/master
c: 5c29d58
h: refs/heads/master
v: v3
  • Loading branch information
Henrique de Moraes Holschuh authored and Len Brown committed Jul 22, 2007
1 parent 43acbba commit 342319e
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: e295e8508c1dd56e06c73e78a2f67f2eb563e74f
refs/heads/master: 5c29d58f471099401513e2e567f6c28001bb0f13
28 changes: 28 additions & 0 deletions trunk/drivers/misc/thinkpad_acpi.c
Original file line number Diff line number Diff line change
Expand Up @@ -1014,6 +1014,11 @@ static int __init hotkey_init(struct ibm_init_struct *iibm)
}
}

if (tp_features.hotkey_wlsw) {
set_bit(EV_SW, tpacpi_inputdev->evbit);
set_bit(SW_RADIO, tpacpi_inputdev->swbit);
}

#ifdef CONFIG_THINKPAD_ACPI_INPUT_ENABLED
dbg_printk(TPACPI_DBG_INIT,
"enabling hot key handling\n");
Expand Down Expand Up @@ -1062,6 +1067,15 @@ static void tpacpi_input_send_key(unsigned int scancode,
}
}

static void tpacpi_input_send_radiosw(void)
{
int wlsw;

if (tp_features.hotkey_wlsw && !hotkey_get_wlsw(&wlsw))
input_report_switch(tpacpi_inputdev,
SW_RADIO, !!wlsw);
}

static void hotkey_notify(struct ibm_struct *ibm, u32 event)
{
u32 hkey;
Expand Down Expand Up @@ -1096,6 +1110,14 @@ static void hotkey_notify(struct ibm_struct *ibm, u32 event)
hkey);
}
break;
case 7:
/* 0x7000-0x7FFF: misc */
if (tp_features.hotkey_wlsw && hkey == 0x7000) {
tpacpi_input_send_radiosw();
sendacpi = 0;
break;
}
/* fallthrough to default */
default:
/* case 2: dock-related */
/* 0x2305 - T43 waking up due to bay lever eject while aslept */
Expand All @@ -1113,6 +1135,11 @@ static void hotkey_notify(struct ibm_struct *ibm, u32 event)
}
}

static void hotkey_resume(void)
{
tpacpi_input_send_radiosw();
}

/*
* Call with hotkey_mutex held
*/
Expand Down Expand Up @@ -1240,6 +1267,7 @@ static struct ibm_struct hotkey_driver_data = {
.read = hotkey_read,
.write = hotkey_write,
.exit = hotkey_exit,
.resume = hotkey_resume,
.acpi = &ibm_hotkey_acpidriver,
};

Expand Down

0 comments on commit 342319e

Please sign in to comment.