From 8eefb35ebf7078770dd0c5fd70229a8b4e04d5a8 Mon Sep 17 00:00:00 2001 From: hselasky Date: Fri, 14 Feb 2014 07:36:04 +0000 Subject: [PATCH] MFC r261597, r261598 and r261599: Apple touchpad manual page fixes: - Add manual page for wsp driver - Update atp driver manual page - Install atp manual page for all platforms git-svn-id: svn://svn.freebsd.org/base/stable/9@261874 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f --- share/man/man4/Makefile | 7 +-- share/man/man4/atp.4 | 57 ++---------------------- share/man/man4/wsp.4 | 96 +++++++++++++++++++++++++++++++++++++++++ 3 files changed, 101 insertions(+), 59 deletions(-) create mode 100644 share/man/man4/wsp.4 diff --git a/share/man/man4/Makefile b/share/man/man4/Makefile index 737bee401..ef712dbf2 100644 --- a/share/man/man4/Makefile +++ b/share/man/man4/Makefile @@ -55,7 +55,7 @@ MAN= aac.4 \ ath_pci.4 \ atkbd.4 \ atkbdc.4 \ - ${_atp.4} \ + atp.4 \ ${_atrtc.4} \ ${_attimer.4} \ audit.4 \ @@ -539,6 +539,7 @@ MAN= aac.4 \ wlan_wep.4 \ wlan_xauth.4 \ ${_wpi.4} \ + wsp.4 \ xe.4 \ ${_xen.4} \ xhci.4 \ @@ -720,7 +721,6 @@ _amdsbwd.4= amdsbwd.4 _amdsmb.4= amdsmb.4 _amdtemp.4= amdtemp.4 _asmc.4= asmc.4 -_atp.4= atp.4 _bxe.4= bxe.4 _coretemp.4= coretemp.4 _cpuctl.4= cpuctl.4 @@ -785,9 +785,6 @@ MLINKS+=qlxgbe.4 if_qlxgbe.4 MLINKS+=sfxge.4 if_sfxge.4 .endif -.if ${MACHINE_CPUARCH} == "powerpc" -_atp.4= atp.4 -.endif .if ${MACHINE_CPUARCH} == "mips" _nvram2env.4= nvram2env.4 .endif diff --git a/share/man/man4/atp.4 b/share/man/man4/atp.4 index ca9f0474a..27d6397c3 100644 --- a/share/man/man4/atp.4 +++ b/share/man/man4/atp.4 @@ -27,7 +27,7 @@ .\" .\" $FreeBSD$ .\" -.Dd November 12, 2009 +.Dd February 7, 2014 .Dt ATP 4 .Os .Sh NAME @@ -98,7 +98,7 @@ Core2 Duo MacBook3,1 (IDs: 0x0229, 0x022a, 0x022b) .El .Pp To discover the product\-id of a touchpad, search for 'Trackpad' in the -output of +output of .Xr lshal 1 and look up the property .Nm usb_device.product_id . @@ -108,63 +108,12 @@ creates a blocking pseudo\-device file, .Pa /dev/atp0 , which presents the mouse as a .Ar sysmouse -or +or .Ar mousesystems type device\-\-see .Xr moused 8 for an explanation of these mouse types. -.Xr moused 8 -can be configured to read touchpad data from -.Pa /dev/atp0 -and pass it along to the -.Xr sysmouse 4 -driver so that any process wanting to utilize mouse operation (such as -an X server) may fetch it from -.Pa /dev/sysmouse ; -alternatively, -.Pa /dev/atp0 -may be manipulated via -.Xr read 2 -and -.Xr ioctl 2 -calls to get mouse data directly. -.Sh EXAMPLES -To use a compatible Apple Trackpad as your console mouse: -.Pp -.Dl moused -p /dev/atp0 -t auto -.Pp -To launch -.Xr moused 8 -automatically upon boot, add the following to -.Pa /etc/rc.conf : -.Pp -.Dl moused_enable="YES" -.Dl moused_type="auto" -.Dl moused_port="/dev/atp0" -.Pp -If you want -.Xr moused 8 -to also probe for external USB mice or other devices, then add the -following to -.Pa /etc/rc.conf : -.Pp -.Dl moused_nondefault_enable="YES" -.Dl moused_ums0_enable="YES" -.Dl moused_ums1_enable="YES" -.Pp -To be able to use the trackpad under X, change the "Pointer" section in -.Nm xorg.conf -to the following: -.Pp -.Dl Device "/dev/atp0" -.Dl Protocol "Auto" -.Pp -Better still, if you want to be able to use the mouse in both virtual -consoles as well as in X change it to: -.Pp -.Dl Device "/dev/sysmouse" -.Dl Protocol "Auto" .Sh SEE ALSO .Xr sysmouse 4 , .Xr usb 4 , diff --git a/share/man/man4/wsp.4 b/share/man/man4/wsp.4 new file mode 100644 index 000000000..e558299c1 --- /dev/null +++ b/share/man/man4/wsp.4 @@ -0,0 +1,96 @@ +.\" Copyright (c) 2014 Hans Petter Selasky . +.\" 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. +.\" 3. Neither the name of the author nor the names of any co-contributors +.\" may be used to endorse or promote products derived from this software +.\" without specific prior written permission. +.\" +.\" 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. +.\" +.\" $FreeBSD$ +.\" +.Dd February 7, 2014 +.Dt WSP 4 +.Os +.Sh NAME +.Nm wsp +.Nd Wellspring touchpad driver +.Sh SYNOPSIS +To compile this driver into the kernel, place the following lines into +your kernel configuration file: +.Bd -ragged -offset indent +.Cd "device wsp" +.Cd "device usb" +.Ed +.Pp +Alternativly, to load the driver as a module at boot time, +place the following line in +.Xr loader.conf 5 : +.Bd -literal -offset indent +wsp_load="YES" +.Ed +.Sh DESCRIPTION +The +.Nm +driver provides support for the Apple Internal Trackpad +device found in many Apple laptops. +.Pp +The driver simulates a three\-button mouse using multi\-finger tap +detection. +. +A single\-finger press generates a left button click. +A two\-finger tap maps to the right button; whereas a three\-finger tap +gets treated as a middle button click. +. +.Pp +.Nm +supports dynamic reconfiguration using +.Xr sysctl 8 ; +through nodes under +.Nm hw.usb.wsp . +Pointer sensitivity can be controlled using the sysctl tunable +.Nm hw.usb.wsp.scale_factor . +. +.Sh FILES +.Nm +creates a blocking pseudo\-device file, +.Pa /dev/wsp0 , +which presents the mouse as a +.Ar sysmouse +or +.Ar mousesystems +type device\-\-see +.Xr moused 8 +for an explanation of these mouse +types. +.Sh SEE ALSO +.Xr sysmouse 4 , +.Xr usb 4 , +.Xr loader.conf 5 , +.Xr xorg.conf 5 Pq Pa ports/x11/xorg , +.Xr moused 8 , +.Xr sysctl 8 +.Sh AUTHORS +.An -nosplit +The +.Nm +driver was written by +.An Huang Wen Hui Aq huanghwh@gmail.com -- 2.45.0