Acer C720 Chromebook Cypress Trackpad

From: Matthias Apitz <guru_at_unixarea.de>
Date: Fri, 08 Sep 2023 09:35:40 UTC
It seems that something has changed in cyapa.ko how the (not existing)
three buttons of the trackpad are emulated. In FreeBSD 13.0-CURRENT r368166
I used only the cyapa.ko module and some xinput commands in .xinitrc
to get button1, button2 and button3 as shown in the small "grafic"
below. This was not working anymore and it took me some hours of
testing, until I got it working again with loading the additional kmod 
chromebook_platform.ko. Now the three buttons are there as expected.

I add this here if someone runs into the same problem (or if someone has
comments on this):

$ cat ~/.xinitrc
...
# Trackpad section
#
# old (pre 14-CURRENT) section:
#
# device="Cypress APA I2C Trackpad"
#
# xinput set-prop "$device" "libinput Tapping Enabled" 1
#
# for those who like "natural" scrolling:
#
# xinput set-prop "$device" "libinput Natural Scrolling Enabled" 1
#
# this gives three buttons in the lower part of the TP:
#
# xinput set-prop "$device" "libinput Middle Emulation Enabled"  0
#
# 14.0-CURRENT, September 2023 section:
# we also load now in /boot/loader.conf not only the cyapa.ko,
# but also chromebook_platform.ko; and access to the device has
# slightly changed to id=11 and id=12, resp.
#
xinput set-prop 11 "libinput Natural Scrolling Enabled" 1
xinput set-prop 12 "libinput Natural Scrolling Enabled" 1
xinput set-prop 11 "libinput Tapping Enabled" 1
xinput set-prop 12 "libinput Tapping Enabled" 1

# Trackpad layout:
#
# +------------------------------------+
# |                                    |
# |             main area              |
# |                                    |
# |                                    |
# +------------------------------------+
# |  button1   |  button2  |  button3  | ~10mm in high
# +------------------------------------+
#
# see also:
# https://wayland.freedesktop.org/libinput/doc/latest/clickpad-softbuttons.html
#
# end of Trackpad section
...

	matthias

-- 
Matthias Apitz, ✉ guru@unixarea.de, http://www.unixarea.de/ +49-176-38902045
Public GnuPG key: http://www.unixarea.de/key.pub