History log of /freebsd-10.1-release/sys/dev/adb/
Revision Date Author Comments
272461 03-Oct-2014 gjb

Copy stable/10@r272459 to releng/10.1 as part of
the 10.1-RELEASE process.

Approved by: re (implicit)
Sponsored by: The FreeBSD Foundation


265998 14-May-2014 ian

MFC r257180, r257195, r257196, r257198, r257209, r257295

Add some extra sanity checking and checks to printf format specifiers.

Try even harder to find a console before giving up.

Make devices with registers into the KVA region work reliably.

Turn on VM_KMEM_SIZE_SCALE on 32-bit as well as 64-bit PowerPC.

Return NOKEY instead of 0 if there are no more key presses queued.


262668 01-Mar-2014 jhibbits

MFC r261068

Properly sort the arguments to mtx_init(9).

PR: misc/186020
Submitted by: alfred


256281 10-Oct-2013 gjb

Copy head (r256279) to stable/10 as part of the 10.0-RELEASE cycle.

Approved by: re (implicit)
Sponsored by: The FreeBSD Foundation


255921 28-Sep-2013 jhibbits

Fix powerpc/161045. ams_poll() needs to return that any data is available, not
just a new packet.

PR: powerpc/161045
Approved by: re(marius)
MFC after: 1 week


242948 13-Nov-2012 kevlo

Use uiomove return value instead of returning 0.


237480 23-Jun-2012 jhibbits

Release the ADB keyboard mutex when handling the power button
press/release. Found by WITNESS.

Approved by: nwhitehorn (mentor)
MFC after: 3 days


226449 16-Oct-2011 nwhitehorn

Add support for special keys (volume/brightness/eject) on Apple laptops with
ADB keyboards.

Submitted by: Justin Hibbits <jrh29 at alumni dot cwru dot edu>
MFC after: 9.0-RELEASE


224126 17-Jul-2011 ed

Restore binary compatibility for GIO_KEYMAP and PIO_KEYMAP.

Back in 2009 I changed the ABI of the GIO_KEYMAP and PIO_KEYMAP ioctls
to support wide characters. I created a patch to add ABI compatibility
for the old calls, but I didn't get any feedback to that.

It seems now people are upgrading from 8 to 9 they experience this
issue, so add it anyway.


199888 28-Nov-2009 nwhitehorn

Add support for interpreting taps on ADB touchpads as a button click.

Submitted by: Andreas Tobler <andreast-list at fgznet dot ch>
MFC after: 2 weeks


196403 20-Aug-2009 jhb

Temporarily revert the new-bus locking for 8.0 release. It will be
reintroduced after HEAD is reopened for commits by re@.

Approved by: re (kib), attilio


196037 02-Aug-2009 attilio

Make the newbus subsystem Giant free by adding the new newbus sxlock.
The newbus lock is responsible for protecting newbus internIal structures,
device states and devclass flags. It is necessary to hold it when all
such datas are accessed. For the other operations, softc locking should
ensure enough protection to avoid races.

Newbus lock is automatically held when virtual operations on the device
and bus are invoked when loading the driver or when the suspend/resume
take place. For other 'spourious' operations trying to access/modify
the newbus topology, newbus lock needs to be automatically acquired and
dropped.

For the moment Giant is also acquired in some key point (modules subsystem)
in order to avoid problems before the 8.0 release as module handlers could
make assumptions about it. This Giant locking should go just after
the release happens.

Please keep in mind that the public interface can be expanded in order
to provide more support, if there are really necessities at some point
and also some bugs could arise as long as the patch needs a bit of
further testing.

Bump __FreeBSD_version in order to reflect the newbus lock introduction.

Reviewed by: ed, hps, jhb, imp, mav, scottl
No answer by: ariff, thompsa, yongari
Tested by: pho,
G. Trematerra <giovanni dot trematerra at gmail dot com>,
Brandon Gooch <jamesbrandongooch at gmail dot com>
Sponsored by: Yahoo! Incorporated
Approved by: re (ksmith)


187893 29-Jan-2009 jhb

Use si_drv1 to hold the softc for the adb_mouse character device instead of
using devclass_get_softc().

Tested by: nwhitehorn


187878 29-Jan-2009 ed

Make adb_mouse use dev2unit() instead of minor().

A real fix would be to migrate it to si_drv0 to store the softc
directly, but this is the quickest way to fix it right now.


186906 08-Jan-2009 nwhitehorn

Improve the AT keyboard emulation of the ADB keyboard driver, by supporting
an AT-like K_RAW mode instead of just K_CODE. This has the effect of making
the arrow keys on ADB keyboards work in X11.

Copied from: sunkbd(4)


185724 06-Dec-2008 nwhitehorn

Fix some nasty race conditions in the VIA-CUDA driver that ended up preventing
my right mouse button and keyboard LEDs from working due to mangled
configuration packets. Fixed several other races and associated problems in the
main ADB stack that were exposed while fixing this.


184890 12-Nov-2008 nwhitehorn

Probe ADB miscellaneous devices (ID 7) instead of stopping at ID 6. This
allows us to probe the brightness and volume control buttons on PPC Apple
laptops, though there is not yet a driver to do anything useful with them.


184565 02-Nov-2008 ed

Make the touch pad on my PowerBook G4 12" a little more usable.

For an unknown reason the touch pad of my PowerBook generates button 5
events when you operate it. This causes the adb_mouse code to convert
them to button 2 events, which is not what we want.

Add a new flag, AMS_TOUCHPAD, which is used to distinguish the touch
pad. When set, don't convert button events of unknown buttons to the
last button.

There are still three problems left with respect to user input:

- The mouse button events are not properly processed when the touch pad
isn't touched.

- The arrow keys on the keyboard don't work inside X11.

- The power button isn't handled by the kernel, similar to the ACPI
power button on i386/amd64.

Approved by: nwhitehorn


184520 01-Nov-2008 ed

Allow a read() on /dev/ams[0-9] to be interrupted.

Right now ams_read() uses cv_wait() to wait for new data to arrive on
the mouse device. This means that when you run `cat /dev/ams0', it
cannot be interrupted directly. After you press ^C, you first need to
move the mouse before cat will quit. Make this function use
cv_wait_sig(), which allows it to be interrupted directly.

Reviewed by: nwhitehorn


184473 30-Oct-2008 nwhitehorn

Fix some possible infinite loops in the ADB code, and remove some hacks
that were inserted in desperation during bring-up. In addition, move ADB bus
enumeration and child attachment to when interrupts are available.


184299 26-Oct-2008 nwhitehorn

Add ADB support. This provides support for the external ADB bus on the PowerMac
G3 as well as the internal ADB keyboard and mice in PowerBooks and iBooks. This
also brings in Mac GPIO support, for which we should eventually have a better
interface.

Obtained from: NetBSD (CUDA and PMU drivers)