linux-input.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v4 00/13] HID: new driver for PS5 'DualSense' controller
@ 2021-01-17 23:44 Roderick Colenbrander
  2021-01-17 23:44 ` [PATCH v4 01/13] HID: playstation: initial DualSense USB support Roderick Colenbrander
                   ` (13 more replies)
  0 siblings, 14 replies; 17+ messages in thread
From: Roderick Colenbrander @ 2021-01-17 23:44 UTC (permalink / raw)
  To: Jiri Kosina, Benjamin Tissoires
  Cc: linux-input, Chris Ye, Roderick Colenbrander

From: Roderick Colenbrander <roderick.colenbrander@sony.com>

Hi,

This is the same code as v3. Due to a misstake during a last minute
rebase, the touchpad and sensors patch got combined while fixing a conflict.
The new v4 corrects that issue. There are no additional code changes.

This new revision contains a few bug fixes, but mostly features small
code changes and minor improvements relative to v2.

In terms of bugs there were bugs in the sensor code. There was an overflow
issue and EV_MSC/MSC_TIMESTAMP were not set on the device. In addition,
the ps_device spinlock was not initialized.

The biggest change in the driver was the addition of a new 'ps_get_report'
helper function. It handles GET_FEATURE report retrieval and any error handling
including CRC checks for PlayStation Bluetooth devices. This greatly simplified
all the functions (dualsense_get_mac_address, dualsense_calibration_info, ..)
dealing, which used their own report handling and error checking.

Aside for these changes, there were mostly little code style changes like defining
magic constants, cleaning up comments, cleaning up log messages, static_assert
checks etcetera.

Thanks to everyone who provided feedback through the mailing list or privately.

Changes since v3:
- Separated touchpad and sensors into separate patches due to rebase misstake.

Changes since v2:
- Removed !Expert setting for hid-playstation from Kconfig.
- Removed DualSense from hid-quirks table.
- Added report size checks to dualsense_parse_report.
- Moved mac address endianess comment to struct ps_device.
- Added static_asserts for packed structure size checks.
- Improved readability of battery capacity calculation using 'min'.
- Added spin_lock_init to dualsense_create to initialize ps_device lock. 
- Fixed sensors timestamp overflow.
- Fixed missing MSC_TIMESTAMP and EV_MSC capabilities in ps_sensors_create.
- Used DIV_ROUND_CLOSEST for timestamp calculations to minimize rounding errors.
- Switched to devm_kmalloc_array for lightbar allocation.
- Added CRC32 and NEW_LEDS dependency to Kconfig.
- Added defines for crc32 seed constants.
- Added crc32 check for dualsense_get_mac_address and increased report size to 20.
- Added new ps_get_report call to obtain feature reports.
- Switched to ARRAY_SIZE in dualsense_parse_reports for touch points, accel and gyro data.
- Changed touch point parse loop to use "struct dualsense_touch_point".
- Improved consistency of info and error messages.
- Unified comment style.


Thanks,

Roderick Colenbrander
Sony Interactive Entertainment, LLC

Roderick Colenbrander (13):
  HID: playstation: initial DualSense USB support.
  HID: playstation: use DualSense MAC address as unique identifier.
  HID: playstation: add DualSense battery support.
  HID: playstation: add DualSense touchpad support.
  HID: playstation: add DualSense accelerometer and gyroscope support.
  HID: playstation: track devices in list.
  HID: playstation: add DualSense Bluetooth support.
  HID: playstation: add DualSense classic rumble support.
  HID: playstation: add DualSense lightbar support
  HID: playstation: add microphone mute support for DualSense.
  HID: playstation: add DualSense player LEDs support.
  HID: playstation: DualSense set LEDs to default player id.
  HID: playstation: report DualSense hardware and firmware version.

 MAINTAINERS                   |    6 +
 drivers/hid/Kconfig           |   21 +
 drivers/hid/Makefile          |    1 +
 drivers/hid/hid-ids.h         |    1 +
 drivers/hid/hid-playstation.c | 1485 +++++++++++++++++++++++++++++++++
 5 files changed, 1514 insertions(+)
 create mode 100644 drivers/hid/hid-playstation.c

-- 
2.26.2


^ permalink raw reply	[flat|nested] 17+ messages in thread

end of thread, other threads:[~2021-01-28 17:09 UTC | newest]

Thread overview: 17+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-01-17 23:44 [PATCH v4 00/13] HID: new driver for PS5 'DualSense' controller Roderick Colenbrander
2021-01-17 23:44 ` [PATCH v4 01/13] HID: playstation: initial DualSense USB support Roderick Colenbrander
2021-01-17 23:44 ` [PATCH v4 02/13] HID: playstation: use DualSense MAC address as unique identifier Roderick Colenbrander
2021-01-17 23:44 ` [PATCH v4 03/13] HID: playstation: add DualSense battery support Roderick Colenbrander
2021-01-17 23:44 ` [PATCH v4 04/13] HID: playstation: add DualSense touchpad support Roderick Colenbrander
2021-01-17 23:44 ` [PATCH v4 05/13] HID: playstation: add DualSense accelerometer and gyroscope support Roderick Colenbrander
2021-01-28 14:48   ` Benjamin Tissoires
2021-01-28 17:07     ` Roderick Colenbrander
2021-01-17 23:44 ` [PATCH v4 06/13] HID: playstation: track devices in list Roderick Colenbrander
2021-01-17 23:44 ` [PATCH v4 07/13] HID: playstation: add DualSense Bluetooth support Roderick Colenbrander
2021-01-17 23:44 ` [PATCH v4 08/13] HID: playstation: add DualSense classic rumble support Roderick Colenbrander
2021-01-17 23:44 ` [PATCH v4 09/13] HID: playstation: add DualSense lightbar support Roderick Colenbrander
2021-01-17 23:44 ` [PATCH v4 10/13] HID: playstation: add microphone mute support for DualSense Roderick Colenbrander
2021-01-17 23:44 ` [PATCH v4 11/13] HID: playstation: add DualSense player LEDs support Roderick Colenbrander
2021-01-17 23:44 ` [PATCH v4 12/13] HID: playstation: DualSense set LEDs to default player id Roderick Colenbrander
2021-01-17 23:44 ` [PATCH v4 13/13] HID: playstation: report DualSense hardware and firmware version Roderick Colenbrander
2021-01-28  8:31 ` [PATCH v4 00/13] HID: new driver for PS5 'DualSense' controller Benjamin Tissoires

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).