See example js.c in the joystick loadable kernel module package.
<linux/joystick.h>
ioctl calls: JS_SET_CAL, JS_GET_CAL, JS_SET_TIMEOUT, JS_GET_TIMEOUT,
JS_SET_TIMELIMIT, JS_GET_TIMELIMIT, JS_GET_ALL, JS_SET_ALL.
A read operation on /dev/jsn will return the struct JS_DATA_TYPE.