For anyone stumbling upon this thread using one of the newer MacBook Pros (2016 and later) which need the applespi driver to make the keyboard and touchpad work, here's how to make this work, as I couldn't find any other thread explaining this for newer Macs.
As far as I understand, the driver effectively replaces the role of the hid_apple module, so the files to edit are slightly different.
First, to verify that you are using the applespi driver and not the hid_apple driver, check which of these commands (using the terminal) returns something. Whichever does will tell you which driver you are currently using:
# If this returns "applespi", you are using applespi
ls /sys/module | grep applespi
# If this returns "hid_apple", you are using hid_apple
ls /sys/module | grep hid_apple
To test settings temporarily (settings will be reset after a reboot):
echo 2 > /sys/module/applespi/parameters/fnmode
To apply the changes permanently (persist with reboots):
# Add the option for the fn key
echo options applespi fnmode=2 | sudo tee -a /etc/modprobe.d/applespi.conf
# Update initramfs bootfile
sudo update-initramfs -u -k all
# Reboot to test (optional)
For older MacBook Pros using the hid_apple module, use "hid_apple" rather than "applespi" in the commands.