Commit Graph

29 Commits (0ad08ac623778ffa2608e30bd4953b5d5acd6f22)

Author SHA1 Message Date
nirenjan 0ad08ac623 Merge pull request #3 from nirenjan/deprecated-macros
Replace err/dbg macros with pr_err/pr_debug
2014-10-19 05:23:05 +00:00
nirenjan e54dfd94d2 Use dev_err/dev_dbg when device is available
Previous commit used pr_err/pr_debug because it mistakenly assumed that
the device pointer was not available. This ensures that the driver uses
the dev_err and dev_dbg functions wherever it can.
2014-10-17 14:43:22 +00:00
nirenjan b752c3e46b Replace err/dbg macros with pr_err/pr_debug
err macro has been removed entirely from the Linux kernel starting from
around v3.5, while the dbg macro has been deprecated. Since the lines
that were using err/dbg did not have access to the device, simply log as
a generic kernel log.
2014-10-17 14:22:57 +00:00
nirenjan 46f9995959 Add X52 key mappings and moved pages document 2013-07-04 15:38:50 -07:00
nirenjan 84774018bf Add X52 MFD pages document
This document describes the API to update pages on the MFD.
2013-01-17 22:04:30 -08:00
Nirenjan Krishnan 2fd5f29ade Correct handling of URB for stick axes - closes #1
The le32_to_cpu function doesn't quite work for some reason. Manually
writing the 32-bit conversion seems to fix the axes reporting for
ABS_X, ABS_Y and ABS_RZ.
2012-10-25 00:01:05 -07:00
nirenjan 75346c745a Fix params to input_set_abs_params - should fix #1
This still could use a bit of investigation to see why
input_set_abs_params called with non-zero values for fuzz and flat
causes axis motion to be ignored, although it may be a driver
subsystem issue in Linux.
2012-10-24 15:14:33 -07:00
Nirenjan Krishnan 223331342e Add libx52 API files
Initial frmework of libx52. This library allows the user to write to
the X52 joystick MFD and LEDs.
2012-10-14 18:02:57 -07:00
Nirenjan Krishnan 76aaf6a6d8 Rename driver folder to kernel_module
Due to plans to scrap the kernel module approach and go with a full-fledged
userspace application, this commit renames the driver folder to kernel_module
so the folder contents are clear.
2012-10-14 12:55:52 -07:00
Nirenjan Krishnan 827c13bf85 Merge branch 'experimental'
This brings in changes to make the kernel module act like an input
device. However, this version does have one flaw, in that the axes
input for all the centered axes does not work. This is most likely
due to a bug in the invocation of input_set_abs_params. Only the
throttle and slider axes work, as does the hat. The other (minor)
issue is that the hat values show up as -32767 and +32767 instead
of -1 and +1 like the usbhid driver.
2012-10-11 21:10:26 -07:00
Nirenjan Krishnan a69ea22457 Fix bug where input is not getting reported
Because the joystick type was never set, the input irq handler never
called the x52pro_decode_urb function. This fixes that issue, however,
it still needs verification that the changes work.
2012-10-11 20:58:59 -07:00
Nirenjan Krishnan 0274c329a6 Add udev rules for making hidraw permissions 0644
This allows the programs that read hidraw for the X52 joystick to
not need root permissions.
2012-10-08 19:37:49 -07:00
Nirenjan Krishnan 7db56ee069 Rename driver name to 'saitek_x52'
This avoids any confusion with other devices named X52.
2012-10-08 18:37:27 -07:00
Nirenjan Krishnan a4ef90d3c1 Support for input devices - still experimental
This change adds an input device for the Saitek X52 pro flight control
system. However, with this change, there is some bug which causes a
kernel crash. Still debugging, but committing so that I don't lose data.
2012-10-08 16:21:24 -07:00
Nirenjan Krishnan a217fa486e Make driver more flexible for other devices
This adds a list of supported devices with flags for each device.
The flags control whether the MFD and/or LED are supported for
each supported device.

This also changes the deadzone structure to be more compliant with
the fuzz and flat parameters for absolute input.
2012-10-07 22:25:39 -07:00
Nirenjan Krishnan ebb4cc9042 Move common definitions to their own file
This change moves the common definitions to their own file so
that we can later rewrite the driver to accept the structure
as input.

A caveat with this approach is that it does prevent shell scripts
from updating the joystick, however, it eases the burden of
verification in the kernel, and it's not too hard to write
wrapper programs to write kernel structures to the files.
2012-10-07 00:08:40 -07:00
Nirenjan Krishnan dc6ef6fae0 Prevent rmmod while joystick is plugged in
Earlier versions of the module could be rmmod'ed while the X52 joystick
was still plugged in and running. Unplugging the joystick after the
module was removed resulted in a kernel crash.
2012-10-06 23:21:21 -07:00
Nirenjan Krishnan ce53d65021 Add blink LED support to driver
This commit also takes care of removing the device files when the
joystick is disconnected. Also, the line API files are renamed to
mfd_line[123].
2012-10-06 00:08:49 -07:00
Nirenjan Krishnan f1fdbe9c6a Move USB control messages to their own file
With this change, the X52 USB control API is moved to it's own
file in order to better separate the code and make it cleaner.

This change also renames the kernel module to saitek_x52.
2012-10-05 23:21:56 -07:00
Nirenjan Krishnan 60ff5826dd Add LED support to x52 joystick driver
This commit adds sysfs files to enable or disable the LEDs on the
X52 Pro joystick. This also fixes a minor bug with the brightness
API which was always complaining not-supported.
2012-10-05 10:38:34 -07:00
Nirenjan Krishnan d1dec19b95 Fix report format 2012-10-04 23:51:26 -07:00
Nirenjan Krishnan e57e8ced7f Update with HID raw output format
Tools folder now contains a program to read and dump the raw HID output
2012-10-03 01:02:21 -07:00
Nirenjan Krishnan 9006404f90 Move readjoy to its own folder under tools 2012-10-02 11:55:12 -07:00
Nirenjan Krishnan a32cc47097 Add readjoy to read joystick events from userspace
Also fix a bit of formatting in the joystick driver file.
2012-09-30 19:17:46 -07:00
Nirenjan Krishnan 9ac96dae97 Add README and GPL license file 2012-09-30 15:38:46 -07:00
Nirenjan Krishnan 5add6a544d Add sysfs files to control LED and MFD brightness
This also fixes the issue with the text display on the MFD.
2012-09-30 15:23:35 -07:00
Nirenjan Krishnan 02a7c326c7 Update x52 driver with write to MFD code.
This still has a bug in that the text is not written correctly. It
shows up as garbage. For now, I'm committing it so that I can work
on it later after the brightness configuration is set up.

Also add the commands header file.
2012-09-30 14:28:51 -07:00
Nirenjan Krishnan 42642d5905 Add initial version of X52pro joystick driver
This is pretty much bare bones code to get a basic sysfs filesystem
in place. It has only code to create sysfs files for the 3 MFD lines.

Right now, this needs to be enabled by unplugging the joystick,
insmod'ing the x52joy.ko module, rmmod'ing the usbhid module and
replugging the joystick. We don't yet have a /dev/input/ interface
and there's no interrupt message handling yet.
2012-09-30 12:38:29 -07:00
Nirenjan e9bfeb0f02 Add controller information 2012-09-30 11:54:34 -07:00