From owner-svn-src-head@FreeBSD.ORG Sun Nov 15 18:31:57 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C7F12106568D; Sun, 15 Nov 2009 18:31:57 +0000 (UTC) (envelope-from rpaulo@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id B64518FC12; Sun, 15 Nov 2009 18:31:57 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id nAFIVvP5044849; Sun, 15 Nov 2009 18:31:57 GMT (envelope-from rpaulo@svn.freebsd.org) Received: (from rpaulo@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id nAFIVvMv044846; Sun, 15 Nov 2009 18:31:57 GMT (envelope-from rpaulo@svn.freebsd.org) Message-Id: <200911151831.nAFIVvMv044846@svn.freebsd.org> From: Rui Paulo Date: Sun, 15 Nov 2009 18:31:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r199292 - head/share/man/man4 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 15 Nov 2009 18:31:57 -0000 Author: rpaulo Date: Sun Nov 15 18:31:57 2009 New Revision: 199292 URL: http://svn.freebsd.org/changeset/base/199292 Log: Add atp(4) man page. Submitted by: Rohit Grover Added: head/share/man/man4/atp.4 (contents, props changed) Modified: head/share/man/man4/Makefile Modified: head/share/man/man4/Makefile ============================================================================== --- head/share/man/man4/Makefile Sun Nov 15 16:44:43 2009 (r199291) +++ head/share/man/man4/Makefile Sun Nov 15 18:31:57 2009 (r199292) @@ -44,6 +44,7 @@ MAN= aac.4 \ ath_hal.4 \ atkbd.4 \ atkbdc.4 \ + ${_atp.4} \ audit.4 \ auditpipe.4 \ aue.4 \ @@ -611,6 +612,7 @@ _acpi_wmi.4= acpi_wmi.4 _amdsmb.4= amdsmb.4 _amdtemp.4= amdtemp.4 _asmc.4= asmc.4 +_atp.4= atp.4 _coretemp.4= coretemp.4 _cpuctl.4= cpuctl.4 _dpms.4= dpms.4 @@ -642,6 +644,10 @@ _wpi.4= wpi.4 MLINKS+=lindev.4 full.4 .endif +.if ${MACHINE_ARCH} == "powerpc" +_atp.4= atp.4 +.endif + .if exists(${.CURDIR}/man4.${MACHINE_ARCH}) SUBDIR= man4.${MACHINE_ARCH} .endif Added: head/share/man/man4/atp.4 ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/share/man/man4/atp.4 Sun Nov 15 18:31:57 2009 (r199292) @@ -0,0 +1,180 @@ +.\" Copyright (c) 2009 Rohit Grover . +.\" 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 November 12, 2009 +.Dt ATP 4 +.Os +.Sh NAME +.Nm atp +.Nd Apple 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 atp" +.Cd "device usb" +.Ed +.Pp +Alternatively, to load the driver as a +module at boot time, place the following line in +.Xr loader.conf 5 : +.Bd -literal -offset indent +atp_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 tap generates a left button click; +two\-finger tap maps to the middle button; whereas a three\-finger tap +gets treated as a right button click. +. +A double\-tap followed by a drag is treated as a selection gesture; a +virtual left\-button click is assumed for the lifespan of the drag. +. +.Nm +attempts to filter away activity at the horizontal edges of the +trackpad\-\-this is to keep unintentional palm movement from being +considered as user input. +. +.Pp +.Nm +supports dynamic reconfiguration using +.Xr sysctl 8 ; +through nodes under +.Nm hw.usb.atp . +Pointer sensitivity can be controlled using the sysctl tunable +.Nm hw.usb.atp.scale_factor . +. +.Sh HARDWARE +The +.Nm +driver provides support for the following Product IDs: +.Pp +.Bl -bullet -compact +.It +Core Duo MacBook & MacBook Pro (IDs: 0x0217, 0x0218, 0x0219) +.It +Core2 Duo MacBook & MacBook Pro (IDs: 0x021a, 0x021b, 0x021c) +.It +Core2 Duo MacBook3,1 (IDs: 0x0229, 0x022a, 0x022b) +.It +12 inch PowerBook and iBook (IDs: 0x030a, 0x030b) +.It +15 inch PowerBook (IDs: 0x020e, 0x020f, 0x0215) +.It +17 inch PowerBook (ID: 0x020d) +.El +.Pp +To discover the product\-id of a touchpad, search for 'Trackpad' in the +output of +.Xr lshal 1 +and look up the property +.Nm usb_device.product_id . +.Sh FILES +.Nm +creates a blocking pseudo\-device file, +.Pa /dev/atp0 , +which presents the mouse as a +.Ar sysmouse +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 , +.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 Rohit Grover Aq rgrover1@gmail.com