CYAPA(4)

πŸ“¦ version 15.1, in freebsd 14.5, freebsd 15.1, nixpkgs unstable

✨ CYAPA ✨

okay so bestie, you found the cyapa page in the Kernel Interfaces Manual and it's literally all about the Cypress APA trackpad with I2C interface driver πŸ’… like yes, the touchpad in your Chromebook. buckle up, she's iconic.


🌸 NAME 🌸

cyapa β€” the Cypress APA trackpad with I2C interface driver. that's her. that's the whole vibe. πŸŽ€


πŸ¦‹ SYNOPSIS πŸ¦‹

so if you wanna compile this driver into the kernel (main character energy, no modules), you drop these lines into the kernel configuration file:

device cyapa
device ig4
device iicbus

OR β€” and this is lowkey the easier route β€” load it as a module at boot time by putting this in loader.conf(5):

cyapa_load="YES"
ig4_load="YES"

✨ and here's the tea: on many Chromebook models this driver can be automatically configured with the help of the chromebook_platform(4) driver. so like, it handles itself. slay.

But if you're built different and wanna do it manually, you configure it in /boot/device.hints:

hint.cyapa.0.at="iicbus0"
hint.cyapa.0.addr="0xCE"
hint.cyapa.1.at="iicbus1"
hint.cyapa.1.addr="0xCE"

πŸ’– DESCRIPTION πŸ’–

The cyapa driver provides support for the Cypress APA trackpad. It emulates the IntelliMouse PS/2 protocol πŸ–±οΈ β€” and it supports basic mouse ioctls, so that moused(8) is supported properly. no cap, it just works.

πŸŽ€ Trackpad layout πŸŽ€

okay bestie, here's the map. memorize it, there will be a quiz:

                       2/3               1/3
              +--------------------+------------+
              |                    |   Middle   |
              |                    |   Button   |
              |       Left         |            |
              |      Button        +------------+
              |                    |   Right    |
              |                    |   Button   |
              +--------------------+............|
              |     Thumb/Button Area           | 15%
              +---------------------------------+

🌈 Trackpad features 🌈

  • Two finger scrolling β€” Use two fingers for Z axis scrolling. two fingers, one vibe 🫢
  • Button down/second finger β€” While one finger clicks and holds down the touchpad, the second finger can be used to move the mouse cursor. This can be useful for drawing or selecting text. honestly kind of a superpower ✨
  • Thumb/Button area β€” The lower 15% of the trackpad will not affect the mouse cursor position. This allows for high precision clicking, by controlling the cursor with the index finger and pushing/holding the pad down with the thumb. precision queen behavior πŸ‘‘
  • Trackpad button β€” Push physical button. The left two thirds of the pad issues a LEFT button event. The upper right corner issues a MIDDLE button event. The lower right corner issues a RIGHT button. Optionally, tap to click can be enabled (see below). three buttons, one pad, we love to see it πŸ’…

On a system using device.hints(5), these values are configurable for cyapa:

  • hint.cyapa.%d.at β€” target iicbus(4).
  • hint.cyapa.%d.addr β€” cyapa i2c address on the iicbus(4).

⭐ SYSCTL VARIABLES ⭐

These sysctl(8) variables are available, and honestly there's a lot of them, so let's go:

  • debug.cyapa_idle_freq β€” Scan frequency in idle mode, the default is 1.
  • debug.cyapa_slow_freq β€” Scan frequency in slow mode, the default is 20.
  • debug.cyapa_norm_freq β€” Scan frequency in normal mode, the default is 100.
  • debug.cyapa_minpressure β€” Minimum pressure to detect a finger, the default is 12.
  • debug.cyapa_enable_tapclick β€” Controls tap to click. Possible values:
    • 0 β€” Tap to click is disabled. This is the default value.
    • 1 β€” Tap to click always generates a left mouse button event.
    • 2 β€” Tap to click generates left mouse button event if the left 2/3rds of the pad are tapped and a right mouse button event otherwise.
    • 3 β€” Tap to click generates mouse button events as if the physical button was pressed (see β€œDESCRIPTION” above).
  • debug.cyapa_tapclick_min_ticks β€” Minimum tap duration in ticks to create a click, the default is 1.
  • debug.cyapa_tapclick_max_ticks β€” Maximum tap duration in ticks to create a click, the default is 8.
  • debug.cyapa_move_min_ticks β€” Minimum ticks before cursor movement occurs, the default is 4.
  • debug.cyapa_scroll_wait_ticks β€” Ticks to wait before starting to scroll, the default is 0.
  • debug.cyapa_scroll_stick_ticks β€” Ticks while preventing cursor movement on single finger after scroll, the default is 15.
  • debug.cyapa_thumbarea_percent β€” Size of bottom thumb area in percent, the default is 15.
  • debug.cyapa_debug β€” Setting this to a non-zero value enables debug output to console and syslog, the default is 0.
  • debug.cyapa_reset β€” Setting this to a non-zero value reinitializes the device. The sysctl resets to zero immediately.
🫢 tiny heads up bestie: that last one resets itself immediately, so don't go thinking it stays set. it does not.

πŸ“ FILES πŸ“

cyapa creates /dev/cyapa0, which presents the mouse as an IntelliMouse PS/2 device. It supports moused(8) levels 0 through 2, level 1 is used by default. cute, consistent, no notes.


πŸ”₯ EXAMPLES πŸ”₯

To use cyapa with moused(8), add the following lines to the rc.conf(5) file:

moused_enable="YES"
moused_port="/dev/cyapa0"

If vertical scrolling is not desired (wild, but okay), add

moused_flags="-l0"

to rc.conf(5).

Wanna enable tap to click for the left and the right mouse button and also disable the thumb area? add these lines to the sysctl.conf(5) file:

debug.cyapa_thumbarea_percent=0
debug.cyapa_enable_tapclick=2

🧚 SEE ALSO 🧚

chromebook_platform(4), ig4(4), iicbus(4), sysmouse(4), moused(8)


πŸ’œ AUTHORS πŸ’œ

  • The original cyapa driver was written for DragonFly by Matthew Dillon. legend behavior.
  • It has been ported, modified, and enhanced for FreeBSD by Michael Gmelin <freebsd@grem.de>. icon.
  • This manual page was written by Michael Gmelin <freebsd@grem.de>.

πŸ’€ BUGS πŸ’€

ngl, here's the cautionary tale: the cyapa driver detects the device from the I2C address. This might have unforeseen consequences if the initialization sequence is sent to an unknown device at that address. so like… be aware bestie, don't go poking random addresses πŸ™ˆ


🌟 this lil page is from Debian, dated December 18, 2018 β€” and that's the whole trackpad story, mwah πŸ’‹βœ¨
πŸ“¦ where this page comes from