Skip to content

JiriKalvoda/linux-gpio-ps2

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 

Repository files navigation

This has been superseded by a driver included in the kernel, drivers/input/serio/ps2-gpio.c


PS/2 over GPIO for Linux

A simple kernel module that allows connecting a PS/2 keyboard using GPIO (one input for data and one for clock).

This can be used e.g. to connect and old PS/2 keyboard to a Raspberry PI or a similar SBC and thus save one USB port.

The implementation is a bit quick-and-dirty so you probably shouldn't use it in production.

Requirements

Your kernel should contain KEYBOARD_ATKBD, SERIO_PCIPS2, SERIO_LIBPS2 and SERIO_APBPS2. (I'm not sure If only some subset is not enough)

Standard Raspbian kernel don't have this parts. You can build your own kernel following this manual: https://www.raspberrypi.com/documentation/computers/linux_kernel.html and enable this parts of kernel in config.

Installation guide

make
make install

Create module configuration file modprobe.d/linux-gpio-ps2.conf (fill your pin numbers in GPIO/BCM pin numbering):

options gpio-ps2-serio gpio_clk=17
options gpio-ps2-serio gpio_data=27

Load the module automatically:

echo gpio-ps2-serio > modules-load.d/gpio-ps2.conf

Then reboot.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C 90.3%
  • Makefile 9.7%