xref: /freebsd/share/man/man4/cyapa.4 (revision bae28eaa8d26ddd67e9af51979f1a54599e9b3a8)
1.\" Copyright (c) 2015 Michael Gmelin <freebsd@grem.de>
2.\" All rights reserved.
3.\"
4.\" Redistribution and use in source and binary forms, with or without
5.\" modification, are permitted provided that the following conditions
6.\" are met:
7.\" 1. Redistributions of source code must retain the above copyright
8.\"    notice, this list of conditions and the following disclaimer.
9.\" 2. Redistributions in binary form must reproduce the above copyright
10.\"    notice, this list of conditions and the following disclaimer in the
11.\"    documentation and/or other materials provided with the distribution.
12.\"
13.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
14.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
15.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
16.\" ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
17.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
18.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
19.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
20.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
21.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
22.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
23.\" SUCH DAMAGE.
24.\"
25.\" $FreeBSD$
26.\"
27.Dd July 25, 2015
28.Dt CYAPA 4
29.Os
30.Sh NAME
31.Nm cyapa
32.Nd Cypress APA trackpad with I2C interface driver
33.Sh SYNOPSIS
34To compile this driver into the kernel, place the following lines into
35the kernel configuration file:
36.Bd -ragged -offset indent
37.Cd "device cyapa"
38.Cd "device ig4"
39.Cd "device smbus"
40.Ed
41.Pp
42Alternatively, to load the driver as a module at boot time, place the following line in
43.Xr loader.conf 5 :
44.Bd -literal -offset indent
45cyapa_load="YES"
46ig4_load="YES"
47.Ed
48.Sh DESCRIPTION
49The
50.Nm
51driver provides support for the Cypress APA trackpad.
52It emulates the IntelliMouse PS/2 protocol.
53It supports basic mouse ioctls, so that
54.Xr moused 8
55is supported properly.
56.Ss Trackpad layout
57.Bd -literal
58                   2/3               1/3
59          +--------------------+------------+
60          |                    |   Middle   |
61          |                    |   Button   |
62          |       Left         |            |
63          |      Button        +------------+
64          |                    |   Right    |
65          |                    |   Button   |
66          +--------------------+............|
67          |     Thumb/Button Area           | 15%
68          +---------------------------------+
69.Ed
70.Ss Trackpad features
71.Bl -tag -width 8n
72.It Va Two finger scrolling
73Use two fingers for Z axis scrolling.
74.It Va Button down/second finger
75While one finger clicks and holds down the touchpad, the second finger can be
76used to move the mouse cursor.
77This can be useful for drawing or selecting text.
78.It Va Thumb/Button area
79The lower 15% of the trackpad will not affect the mouse cursor position.
80This allows for high precision clicking, by controlling the cursor with the
81index finger and pushing/holding the pad down with the thumb.
82.It Va Trackpad button
83Push physical button.
84The left two thirds of the pad issues a LEFT button event.
85The upper right corner issues a MIDDLE button event.
86The lower right corner issues a RIGHT button.
87Optionally, tap to click can be enabled (see below).
88.El
89.Sh SYSCTL VARIABLES
90These
91.Xr sysctl 8
92variables are available:
93.Bl -tag -width 8n
94.It Va debug.cyapa_idle_freq
95Scan frequency in idle mode, the default is 1.
96.It Va debug.cyapa_slow_freq
97Scan frequency in slow mode, the default is 20.
98.It Va debug.cyapa_norm_freq
99Scan frequency in normal mode, the default is 100.
100.It Va debug.cyapa_minpressure
101Minimum pressure to detect a finger, the default is 12.
102.It Va debug.cyapa_enable_tapclick
103Controls tap to click.
104Possible values:
105.Bl -tag -width 8n
106.It 0
107Tap to click is disabled.
108This is the default value.
109.It 1
110Tap to click always generates a left mouse button event.
111.It 2
112Tap to click generates left mouse button event if the left 2/3rds of the pad
113are tapped and a right mouse button event otherwise.
114.It 3
115Tap to click generates mouse button events as if the physical button was
116pressed (see
117.Sx DESCRIPTION
118above).
119.El
120.It Va debug.cyapa_tapclick_min_ticks
121Minimum tap duration in ticks to create a click, the default is 1.
122.It Va debug.cyapa_tapclick_max_ticks
123Maximum tap duration in ticks to create a click, the default is 8.
124.It Va debug.cyapa_move_min_ticks
125Minimum ticks before cursor movement occurs, the default is 4.
126.It Va debug.cyapa_scroll_wait_ticks
127Ticks to wait before starting to scroll, the default is 0.
128.It Va debug.cyapa_scroll_stick_ticks
129Ticks while preventing cursor movement on single finger after scroll,
130the default is 15.
131.It Va debug.cyapa_thumbarea_percent
132Size of bottom thumb area in percent, the default is 15.
133.It Va debug.cyapa_debug
134Setting this to a non-zero value enables debug output to console and syslog,
135the default is 0.
136.It Va debug.cyapa_reset
137Setting this to a non-zero value reinitializes the device.
138The sysctl resets to zero immediately.
139.El
140.Sh FILES
141.Nm
142creates
143.Pa /dev/cyapa0 ,
144which presents the mouse as an
145.Ar IntelliMouse PS/2
146device.
147It supports
148.Xr moused 8
149levels 0 through 2, level 1 is used by default.
150.Sh EXAMPLES
151To use
152.Nm
153with
154.Xr moused 8 ,
155add the following lines to the
156.Xr rc.conf 5
157file:
158.Pp
159.Dl moused_enable="YES"
160.Dl moused_port="/dev/cyapa0"
161.Pp
162If vertical scrolling is not desired, add
163.Pp
164.Dl moused_flags="-l0"
165.Pp
166to
167.Xr rc.conf 5 .
168.Pp
169Enable tap to click for the left and the right mouse button and
170disable the thumb area by adding these lines to the
171.Xr sysctl.conf 5
172file:
173.Pp
174.Dl debug.cyapa_thumbarea_percent=0
175.Dl debug.cyapa_enable_tapclick=2
176.Sh SEE ALSO
177.Xr ig4 4 ,
178.Xr moused 4 ,
179.Xr smbus 4 ,
180.Xr sysmouse 4
181.Sh AUTHORS
182.An -nosplit
183The original
184.Nm
185driver was written for DragonFly BSD by
186.An Matthew Dillon .
187.Pp
188It has been ported, modified, and enhanced for
189.Fx
190by
191.An Michael Gmelin Aq Mt freebsd@grem.de .
192.Pp
193This manual page was written by
194.An Michael Gmelin Aq Mt freebsd@grem.de .
195.Sh BUGS
196The
197.Nm
198driver detects the device based on its I2C address (0x67).
199This might have unforeseen consequences if the initialization sequence
200is sent to an unknown device at that address.
201