xref: /freebsd/share/man/man4/cyapa.4 (revision 41059135ce931c0f1014a999ffabc6bc470ce856)
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 October 03, 2016
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 iicbus"
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.Pp
49In
50.Pa /boot/device.hints :
51.Cd hint.cyapa.0.at="iicbus0"
52.Cd hint.cyapa.0.addr="0xCE"
53.Cd hint.cyapa.1.at="iicbus1"
54.Cd hint.cyapa.1.addr="0xCE"
55.Sh DESCRIPTION
56The
57.Nm
58driver provides support for the Cypress APA trackpad.
59It emulates the IntelliMouse PS/2 protocol.
60It supports basic mouse ioctls, so that
61.Xr moused 8
62is supported properly.
63.Ss Trackpad layout
64.Bd -literal
65                   2/3               1/3
66          +--------------------+------------+
67          |                    |   Middle   |
68          |                    |   Button   |
69          |       Left         |            |
70          |      Button        +------------+
71          |                    |   Right    |
72          |                    |   Button   |
73          +--------------------+............|
74          |     Thumb/Button Area           | 15%
75          +---------------------------------+
76.Ed
77.Ss Trackpad features
78.Bl -tag -width 8n
79.It Va Two finger scrolling
80Use two fingers for Z axis scrolling.
81.It Va Button down/second finger
82While one finger clicks and holds down the touchpad, the second finger can be
83used to move the mouse cursor.
84This can be useful for drawing or selecting text.
85.It Va Thumb/Button area
86The lower 15% of the trackpad will not affect the mouse cursor position.
87This allows for high precision clicking, by controlling the cursor with the
88index finger and pushing/holding the pad down with the thumb.
89.It Va Trackpad button
90Push physical button.
91The left two thirds of the pad issues a LEFT button event.
92The upper right corner issues a MIDDLE button event.
93The lower right corner issues a RIGHT button.
94Optionally, tap to click can be enabled (see below).
95.El
96.Pp
97On a system using
98.Xr device.hints 5 ,
99these values are configurable for
100.Nm :
101.Bl -tag -width "hint.cyapa.%d.addr"
102.It Va hint.cyapa.%d.at
103target
104.Xr iicbus 4 .
105.It Va hint.cyapa.%d.addr
106.Nm
107i2c address on the
108.Xr iicbus 4 .
109.El
110.Sh SYSCTL VARIABLES
111These
112.Xr sysctl 8
113variables are available:
114.Bl -tag -width 8n
115.It Va debug.cyapa_idle_freq
116Scan frequency in idle mode, the default is 1.
117.It Va debug.cyapa_slow_freq
118Scan frequency in slow mode, the default is 20.
119.It Va debug.cyapa_norm_freq
120Scan frequency in normal mode, the default is 100.
121.It Va debug.cyapa_minpressure
122Minimum pressure to detect a finger, the default is 12.
123.It Va debug.cyapa_enable_tapclick
124Controls tap to click.
125Possible values:
126.Bl -tag -width 8n
127.It 0
128Tap to click is disabled.
129This is the default value.
130.It 1
131Tap to click always generates a left mouse button event.
132.It 2
133Tap to click generates left mouse button event if the left 2/3rds of the pad
134are tapped and a right mouse button event otherwise.
135.It 3
136Tap to click generates mouse button events as if the physical button was
137pressed (see
138.Sx DESCRIPTION
139above).
140.El
141.It Va debug.cyapa_tapclick_min_ticks
142Minimum tap duration in ticks to create a click, the default is 1.
143.It Va debug.cyapa_tapclick_max_ticks
144Maximum tap duration in ticks to create a click, the default is 8.
145.It Va debug.cyapa_move_min_ticks
146Minimum ticks before cursor movement occurs, the default is 4.
147.It Va debug.cyapa_scroll_wait_ticks
148Ticks to wait before starting to scroll, the default is 0.
149.It Va debug.cyapa_scroll_stick_ticks
150Ticks while preventing cursor movement on single finger after scroll,
151the default is 15.
152.It Va debug.cyapa_thumbarea_percent
153Size of bottom thumb area in percent, the default is 15.
154.It Va debug.cyapa_debug
155Setting this to a non-zero value enables debug output to console and syslog,
156the default is 0.
157.It Va debug.cyapa_reset
158Setting this to a non-zero value reinitializes the device.
159The sysctl resets to zero immediately.
160.El
161.Sh FILES
162.Nm
163creates
164.Pa /dev/cyapa0 ,
165which presents the mouse as an
166.Ar IntelliMouse PS/2
167device.
168It supports
169.Xr moused 8
170levels 0 through 2, level 1 is used by default.
171.Sh EXAMPLES
172To use
173.Nm
174with
175.Xr moused 8 ,
176add the following lines to the
177.Xr rc.conf 5
178file:
179.Pp
180.Dl moused_enable="YES"
181.Dl moused_port="/dev/cyapa0"
182.Pp
183If vertical scrolling is not desired, add
184.Pp
185.Dl moused_flags="-l0"
186.Pp
187to
188.Xr rc.conf 5 .
189.Pp
190Enable tap to click for the left and the right mouse button and
191disable the thumb area by adding these lines to the
192.Xr sysctl.conf 5
193file:
194.Pp
195.Dl debug.cyapa_thumbarea_percent=0
196.Dl debug.cyapa_enable_tapclick=2
197.Sh SEE ALSO
198.Xr ig4 4 ,
199.Xr iicbus 4 ,
200.Xr sysmouse 4 ,
201.Xr moused 8
202.Sh AUTHORS
203.An -nosplit
204The original
205.Nm
206driver was written for DragonFly BSD by
207.An Matthew Dillon .
208.Pp
209It has been ported, modified, and enhanced for
210.Fx
211by
212.An Michael Gmelin Aq Mt freebsd@grem.de .
213.Pp
214This manual page was written by
215.An Michael Gmelin Aq Mt freebsd@grem.de .
216.Sh BUGS
217The
218.Nm
219driver detects the device from the I2C address.
220This might have unforeseen consequences if the initialization sequence
221is sent to an unknown device at that address.
222