Subject: ADB stuff
To: netbsd-macppc macppc <port-macppc@netbsd.org>
From: Michael Lorenz <macallan@netbsd.org>
List: port-macppc
Date: 11/17/2006 23:35:51
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hello,

now that my re-implementation of the ADB subsystem starts to become 
useful I have a few questions, mainly about ancient history.
First - does anyone use aed at adb for anything? The code looks like 
it's been used mainly for mouse button emulation some time before the 
previous ice age ( read before there was wscons ). I got around this 
particular problem by attaching a wsmouse to adbkbd which only spews 
button events and have the Xserver listen to /dev/wsmouse, that way I 
can translate any key I want to mouse buttons without any ugly hacks. 
Pseudo keyboard devices used by some mice and trackballs can be treated 
the same way.
Second - how much do people really care about apm emulation? All it 
does is report battery and AC power state, data which will also be 
available via envsys, in much more detail. There's no support for 
suspend or anything so running apmd doesn't make that much sense.
Third - the power key. The old code ignores it, but my driver could 
actually do something useful like reporting it to powerd. Problem with 
this - on some powerbooks the power key is so close to the backspace 
key that people press it by accident so we better don't shut down 
unconditionally...

About the rewrite - the main goal was to clean things up, remove 
unnecessary cruft, support the i2c bus and get rid of various 
weirdnesses. So far it does:
- - put stuff like ADB device discovery into a separate bus abstraction - 
nadb
- - have both nadb at cuda and nadb at pmu
- - support basic stuff like RTC, reset, power off on both cuda and pmu
- - support ADB mice and keyboards, as many as you can connect. The old 
PMU code would support only one of each.
- - twinkle LEDs on external keyboards - the old code wouldn't do that.
- - basic support for cuda's i2c bus, enough to control the beige G3's 
additional audio mixer chip.
- - translate keys to mouse buttons and report then via wsmouse at adbkbd
- - the new code is much smaller

So far it does NOT:
- - support brightness and audio volume buttons on powerbooks
- - support any sort of power management
- - send weird phantom keycodes like the old driver
... and it hasn't been tested on a lot of hardware.

I'll make some test kernels available in the next few days.

have fun
Michael
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (Darwin)

iQEVAwUBRV6Np8pnzkX8Yg2nAQJ52ggAuVAO+BSomS5dJZsHS2vUwV5hcwWxvVUv
cn6uujlGUR+QVPrdPyy3PciOgdRAJXwKEwg/I1jEEuGTwlsblwotAIelr6mFmxyb
rnQuezDQ4JlNfE8WyY2VNN6uLEZxcNv4jd4dCBNBQnPmb7ctc2JrxkU9LKi4c87y
YCqNlkG2QUcVNhCnSmht/AK2EV3K/ZGOv+jhluRhPrBh+rJrb06iCdUPVqSYQw8v
pQnYsX+6JHVyvmu5tmuTw2/etWfh5jdQfY4yQxMueulCBLXFCEKY3MoynMHq17OD
+j3mHbLgUhU9l1SKIpad+PgWsCj4Ko+7Fw3QB6CuHOgu+ITs0pG9UQ==
=JzQh
-----END PGP SIGNATURE-----