Subject: New PowerBook/iBook keyboards
To: None <>
From: William O Ferry <>
List: port-macppc
Date: 01/22/2001 13:52:50
	I was wondering what the state of support for the PowerBook and iBook
keyboards is.  I've applied the patch on the iBook page mentioned a few
days ago and it's working great other than the delay during boot, and I do get
an occasional "spurious interrupt" message but it doesn't seem to cause any

	Looing at the patch it appears to me that it's taking two interrupt
conditions from the PMU and beating them down until they go away..  =)  I
notice that both LinuxPPC and Darwin actually appear to service these
interrupts.  Well, Darwin has these checks in a "poll_device" function that
is #ifdef'ed out implying that it only happens when interrupts are disabled,
or else I'm missing the other handler for these IFR values.  Both Darwin and
LinuxPPC imply that 0x04 (which is cleared followed by a long delay) is a
shift register interrupt and take care of clearing out the data.  The 0x10
value appears to be a more general PMU interrupt, that LinuxPPC seems to handle
as an ADB interrupt.

	I assume the patch code must have come from LinuxPPC as there are
some definite similarities.  Either the LinuxPPC code has been cleaned up
since then or at least the implementation seems to be cleaner (there's still
the reach into the gpio/extint-gpio1 nodes that is hard-coded, but it feels
better than a hard-coded 0x50..  =)  Same thing with fetching the interrupt
line out of the extint-gpio1 node rather than hard-coding 0x2f.  In addition
the code that uses the gpio_reg has actually been #ifdef'ed out in LinuxPPC,
it doesn't even appear to be necessary anymore (presumably they're handling
that portion some other/better way).

	Just wondering if anybody's synced up with the other available
sources recently (what's allowed within licenses at least..  =) and if there
will ever be real support for the newer machine keyboards in NetBSD.  If
nothing else could the current patch code be put in the tree?  It seems
it shouldn't be too bad to conditionalize it on presence of the newer
hardware so that it doesn't mess up the older platforms?

	Thanks in advance.
                                             Will Ferry