summaryrefslogtreecommitdiff
path: root/sys/dev/ic/pckbc.c
diff options
context:
space:
mode:
authorMiod Vallat <miod@cvs.openbsd.org>2008-07-16 20:03:23 +0000
committerMiod Vallat <miod@cvs.openbsd.org>2008-07-16 20:03:23 +0000
commitf4c3215d929c4f4e37ecb0c1bc54f824318df42a (patch)
treeafc8cd62bc512c8de5f73dd13808ce7a713558aa /sys/dev/ic/pckbc.c
parent68330ed749561ba61b9cb79efdedd3137e66aaa3 (diff)
Add a new parameter to pckbc_cnattach(): flags to put in the pckbc bowels.
For now, only one such flag is defined, PCKBC_CANT_TRANSLATE. It hints pckbc that the device does not behave correctly to the ``set translation'' commands. Set this flag if we are running on a Tadpole Ultrabook machine, which needs it. This makes the built-in keyboard work correctly on this laptop (with the help of the software translation pckbd diff). tested & ok kettenis@
Diffstat (limited to 'sys/dev/ic/pckbc.c')
-rw-r--r--sys/dev/ic/pckbc.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/sys/dev/ic/pckbc.c b/sys/dev/ic/pckbc.c
index b1b798edf3d..5a759389e0d 100644
--- a/sys/dev/ic/pckbc.c
+++ b/sys/dev/ic/pckbc.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: pckbc.c,v 1.15 2007/11/26 22:45:27 miod Exp $ */
+/* $OpenBSD: pckbc.c,v 1.16 2008/07/16 20:03:22 miod Exp $ */
/* $NetBSD: pckbc.c,v 1.5 2000/06/09 04:58:35 soda Exp $ */
/*
@@ -475,7 +475,8 @@ pckbc_xt_translation(self, slot, on)
struct pckbc_internal *t = self;
int ison;
- if (slot != PCKBC_KBD_SLOT) {
+ if (ISSET(t->t_flags, PCKBC_CANT_TRANSLATE) ||
+ slot != PCKBC_KBD_SLOT) {
/* translation only for kbd slot */
if (on)
return (0);
@@ -998,11 +999,12 @@ pckbcintr_internal(t, sc)
}
int
-pckbc_cnattach(iot, addr, cmd_offset, slot)
+pckbc_cnattach(iot, addr, cmd_offset, slot, flags)
bus_space_tag_t iot;
bus_addr_t addr;
bus_size_t cmd_offset;
pckbc_slot_t slot;
+ int flags;
{
bus_space_handle_t ioh_d, ioh_c;
int res = 0;
@@ -1018,6 +1020,7 @@ pckbc_cnattach(iot, addr, cmd_offset, slot)
pckbc_consdata.t_ioh_d = ioh_d;
pckbc_consdata.t_ioh_c = ioh_c;
pckbc_consdata.t_addr = addr;
+ pckbc_consdata.t_flags = flags;
timeout_set(&pckbc_consdata.t_cleanup, pckbc_cleanup, &pckbc_consdata);
timeout_set(&pckbc_consdata.t_poll, pckbc_poll, &pckbc_consdata);