Add support for trackpads found in Apple MacBook products. While at it

add some missing devd entries.

Submitted by:	Huang Wen Hui <huanghwh@gmail.com>
MFC after:	1 week
This commit is contained in:
Hans Petter Selasky 2014-01-29 10:42:01 +00:00
parent d8b88105c2
commit eed447b59b
7 changed files with 1545 additions and 7 deletions

View file

@ -115,6 +115,15 @@ detach 100 {
action "/etc/rc.d/syscons setkeyboard /dev/kbd0";
};
notify 100 {
match "system" "DEVFS";
match "subsystem" "CDEV";
match "type" "CREATE";
match "cdev" "atp[0-9]+";
action "/etc/rc.d/moused quietstart $cdev";
};
notify 100 {
match "system" "DEVFS";
match "subsystem" "CDEV";
@ -124,6 +133,15 @@ notify 100 {
action "/etc/rc.d/moused quietstart $cdev";
};
notify 100 {
match "system" "DEVFS";
match "subsystem" "CDEV";
match "type" "CREATE";
match "cdev" "wsp[0-9]+";
action "/etc/rc.d/moused quietstart $cdev";
};
notify 100 {
match "system" "DEVFS";
match "subsystem" "CDEV";

View file

@ -2660,6 +2660,9 @@ device umct
device umodem
# USB mouse
device ums
# USB touchpad(s)
device atp
device wsp
# eGalax USB touch screen
device uep
# Diamond Rio 500 MP3 player

View file

@ -2408,6 +2408,7 @@ dev/usb/input/uep.c optional uep
dev/usb/input/uhid.c optional uhid
dev/usb/input/ukbd.c optional ukbd
dev/usb/input/ums.c optional ums
dev/usb/input/wsp.c optional wsp
#
# USB quirks
#

1438
sys/dev/usb/input/wsp.c Normal file

File diff suppressed because it is too large Load diff

View file

@ -1077,12 +1077,54 @@ product APPLE DUMMY 0x0000 Dummy product
product APPLE IMAC_KBD 0x0201 USB iMac Keyboard
product APPLE KBD 0x0202 USB Keyboard M2452
product APPLE EXT_KBD 0x020c Apple Extended USB Keyboard
product APPLE KBD_TP_ANSI 0x0223 Apple Internal Keyboard/Trackpad (Wellspring/ANSI)
product APPLE KBD_TP_ISO 0x0224 Apple Internal Keyboard/Trackpad (Wellspring/ISO)
product APPLE KBD_TP_JIS 0x0225 Apple Internal Keyboard/Trackpad (Wellspring/JIS)
product APPLE KBD_TP_ANSI2 0x0230 Apple Internal Keyboard/Trackpad (Wellspring2/ANSI)
product APPLE KBD_TP_ISO2 0x0231 Apple Internal Keyboard/Trackpad (Wellspring2/ISO)
product APPLE KBD_TP_JIS2 0x0232 Apple Internal Keyboard/Trackpad (Wellspring2/JIS)
/* MacbookAir, aka wellspring */
product APPLE WELLSPRING_ANSI 0x0223 Apple Internal Keyboard/Trackpad
product APPLE WELLSPRING_ISO 0x0224 Apple Internal Keyboard/Trackpad
product APPLE WELLSPRING_JIS 0x0225 Apple Internal Keyboard/Trackpad
/* MacbookProPenryn, aka wellspring2 */
product APPLE WELLSPRING2_ANSI 0x0230 Apple Internal Keyboard/Trackpad
product APPLE WELLSPRING2_ISO 0x0231 Apple Internal Keyboard/Trackpad
product APPLE WELLSPRING2_JIS 0x0232 Apple Internal Keyboard/Trackpad
/* Macbook5,1 (unibody), aka wellspring3 */
product APPLE WELLSPRING3_ANSI 0x0236 Apple Internal Keyboard/Trackpad
product APPLE WELLSPRING3_ISO 0x0237 Apple Internal Keyboard/Trackpad
product APPLE WELLSPRING3_JIS 0x0238 Apple Internal Keyboard/Trackpad
/* MacbookAir3,2 (unibody), aka wellspring4 */
product APPLE WELLSPRING4_ANSI 0x023f Apple Internal Keyboard/Trackpad
product APPLE WELLSPRING4_ISO 0x0240 Apple Internal Keyboard/Trackpad
product APPLE WELLSPRING4_JIS 0x0241 Apple Internal Keyboard/Trackpad
/* MacbookAir3,1 (unibody), aka wellspring4 */
product APPLE WELLSPRING4A_ANSI 0x0242 Apple Internal Keyboard/Trackpad
product APPLE WELLSPRING4A_ISO 0x0243 Apple Internal Keyboard/Trackpad
product APPLE WELLSPRING4A_JIS 0x0244 Apple Internal Keyboard/Trackpad
/* Macbook8 (unibody, March 2011) */
product APPLE WELLSPRING5_ANSI 0x0245 Apple Internal Keyboard/Trackpad
product APPLE WELLSPRING5_ISO 0x0246 Apple Internal Keyboard/Trackpad
product APPLE WELLSPRING5_JIS 0x0247 Apple Internal Keyboard/Trackpad
/* MacbookAir4,1 (unibody, July 2011) */
product APPLE WELLSPRING6A_ANSI 0x0249 Apple Internal Keyboard/Trackpad
product APPLE WELLSPRING6A_ISO 0x024a Apple Internal Keyboard/Trackpad
product APPLE WELLSPRING6A_JIS 0x024b Apple Internal Keyboard/Trackpad
/* MacbookAir4,2 (unibody, July 2011) */
product APPLE WELLSPRING6_ANSI 0x024c Apple Internal Keyboard/Trackpad
product APPLE WELLSPRING6_ISO 0x024d Apple Internal Keyboard/Trackpad
product APPLE WELLSPRING6_JIS 0x024e Apple Internal Keyboard/Trackpad
/* Macbook8,2 (unibody) */
product APPLE WELLSPRING5A_ANSI 0x0252 Apple Internal Keyboard/Trackpad
product APPLE WELLSPRING5A_ISO 0x0253 Apple Internal Keyboard/Trackpad
product APPLE WELLSPRING5A_JIS 0x0254 Apple Internal Keyboard/Trackpad
/* MacbookPro10,1 (unibody, June 2012) */
product APPLE WELLSPRING7_ANSI 0x0262 Apple Internal Keyboard/Trackpad
product APPLE WELLSPRING7_ISO 0x0263 Apple Internal Keyboard/Trackpad
product APPLE WELLSPRING7_JIS 0x0264 Apple Internal Keyboard/Trackpad
/* MacbookPro10,2 (unibody, October 2012) */
product APPLE WELLSPRING7A_ANSI 0x0259 Apple Internal Keyboard/Trackpad
product APPLE WELLSPRING7A_ISO 0x025a Apple Internal Keyboard/Trackpad
product APPLE WELLSPRING7A_JIS 0x025b Apple Internal Keyboard/Trackpad
/* MacbookAir6,2 (unibody, June 2013) */
product APPLE WELLSPRING8_ANSI 0x0290 Apple Internal Keyboard/Trackpad
product APPLE WELLSPRING8_ISO 0x0291 Apple Internal Keyboard/Trackpad
product APPLE WELLSPRING8_JIS 0x0292 Apple Internal Keyboard/Trackpad
product APPLE MOUSE 0x0301 Mouse M4848
product APPLE OPTMOUSE 0x0302 Optical mouse
product APPLE MIGHTYMOUSE 0x0304 Mighty Mouse

View file

@ -47,7 +47,7 @@ SUBDIR += ${_dwc_otg} ehci ${_musb} ohci uhci xhci ${_uss820dci} ${_at91dci} \
${_atmegadci} ${_avr32dci} ${_rsu} ${_rsufw}
SUBDIR += ${_rum} ${_run} ${_runfw} ${_uath} upgt usie ural ${_zyd} ${_urtw}
SUBDIR += ${_urtwn} ${_urtwnfw}
SUBDIR += atp uhid ukbd ums udbp ufm uep
SUBDIR += atp uhid ukbd ums udbp ufm uep wsp
SUBDIR += ucom u3g uark ubsa ubser uchcom ucycom ufoma uftdi ugensa uipaq ulpt \
umct umcs umodem umoscom uplcom uslcom uvisor uvscom
SUBDIR += uether aue axe axge cdce cue ${_kue} mos rue smsc udav uhso ipheth

View file

@ -0,0 +1,36 @@
#
# $FreeBSD$
#
# Copyright (c) 2012 Huang Wen Hui. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
# 1. Redistributions of source code must retain the above copyright
# notice, this list of conditions and the following disclaimer.
# 2. Redistributions in binary form must reproduce the above copyright
# notice, this list of conditions and the following disclaimer in the
# documentation and/or other materials provided with the distribution.
#
# THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
# ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
# SUCH DAMAGE.
#
S= ${.CURDIR}/../../..
.PATH: $S/dev/usb/input
KMOD= wsp
SRCS= opt_bus.h opt_usb.h device_if.h bus_if.h usb_if.h vnode_if.h usbdevs.h \
wsp.c
.include <bsd.kmod.mk>