PERFORCE change 124012 for review

Rui Paulo rpaulo at FreeBSD.org
Tue Jul 24 13:59:15 UTC 2007


http://perforce.freebsd.org/chv.cgi?CH=124012

Change 124012 by rpaulo at rpaulo_epsilon on 2007/07/24 13:59:10

	Don't depend on a quirk to detect Apple keyboards with the
	Fn key.

Affected files ...

.. //depot/projects/soc2007/rpaulo-macbook/dev/usb/ukbd.c#10 edit
.. //depot/projects/soc2007/rpaulo-macbook/dev/usb/usb_quirks.c#10 edit
.. //depot/projects/soc2007/rpaulo-macbook/dev/usb/usb_quirks.h#9 edit

Differences ...

==== //depot/projects/soc2007/rpaulo-macbook/dev/usb/ukbd.c#10 (text+ko) ====

@@ -201,23 +201,20 @@
 	/*
 	 * Locate the Fn key on Apple keyboards.
 	 */
-	if (usbd_get_quirks(uaa->device)->uq_flags & UQ_KBD_FNKEY) {
-		err = usbd_read_report_desc(uaa->iface, &desc, &size, M_TEMP);
-		if (err) {
-			device_printf(self,
-			    "could not read report descriptor\n");
-			return ENXIO;
-		}
+	err = usbd_read_report_desc(uaa->iface, &desc, &size, M_TEMP);
+	if (err) {
+		device_printf(self, "could not read report descriptor\n");
+		return ENXIO;
+	}
 
-		if (hid_locate(desc, size, HID_USAGE2(HUP_CUSTOM, HUC_FNKEY),
-			       hid_input, &sc->sc_loc_fn, &flags)) {
-			device_printf(self, "Fn key.\n");
-			sc->sc_flags |= UKBD_FN;
-		} else
-			device_printf(self, "Fn key not found.\n");
-		free(desc, M_TEMP);
+	if (hid_locate(desc, size, HID_USAGE2(HUP_CUSTOM, HUC_FNKEY),
+		hid_input, &sc->sc_loc_fn, &flags)) {
+		device_printf(self, "Fn key.\n");
+		sc->sc_flags |= UKBD_FN;
 	}
 
+	free(desc, M_TEMP);
+
 	arg[0] = (void *)uaa;
 	arg[1] = (void *)ukbd_intr;
 	kbd = NULL;

==== //depot/projects/soc2007/rpaulo-macbook/dev/usb/usb_quirks.c#10 (text+ko) ====

@@ -110,10 +110,7 @@
 	ANY, { UQ_KBD_IGNORE }},
  { USB_VENDOR_METAGEEK, USB_PRODUCT_METAGEEK_WISPYX,
 	ANY, { UQ_KBD_IGNORE }},
- /* Devices that need special handling of the Fn key */
- { USB_VENDOR_APPLE, USB_PRODUCT_APPLE_INTKBTP,
-	ANY, { UQ_KBD_FNKEY } },
-
+ /* XXX: temporary */
  { USB_VENDOR_APPLE, USB_PRODUCT_APPLE_BLUETOOTH_HID,
 	ANY, { UQ_MS_IGNORE } },
 

==== //depot/projects/soc2007/rpaulo-macbook/dev/usb/usb_quirks.h#9 (text+ko) ====

@@ -57,7 +57,6 @@
 #define UQ_KBD_IGNORE	0x00018000 /* device should be ignored by both kbd and hid class */
 #define	UQ_MS_BAD_CLASS 0x00020000 /* doesn't identify properly */
 #define	UQ_MS_LEADING_BYTE 0x40000 /* mouse sends an unknown leading byte. */
-#define UQ_KBD_FNKEY	0x00080000 /* device needs special handling for the Fn key */
 #define UQ_MS_IGNORE	0x00100000 /* device should be ignored by ums */
 };
 


More information about the p4-projects mailing list