--- v4
+++ v2
@@ -2,53 +2,24 @@
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.
+I would like to share an updated version of the hid-playstation driver.
+This new revision is very similar to the original release, but with
+various small changes and minor improvements. Thanks to everyone who
+provided feedback through the mailing list or privately.
-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.
-
+Changes since v1:
+- Export ps_devices table using MODULE_DEVICE_TABLE.
+- Uses 'width - 1' and 'height - 1' for touchpad ABS_MT_POSITION_X/Y.
+- Uses 'sysfs_emit' instead of 'snprintf' in sysfs show functions.
+- Switched to devm_device_add_group to manage attribute groups.
+- Changed player LED lookup to use pointer calculations instead of a loop.
+- Added readonly mute set_brightness call to silence ENOTSUP.
+- Lightbar is not dynamically allocated and now allocated as part of 'struct dualsense'
+- Size checking on hid_hw_raw_request for calibration, firmware and mac addrees info.
+- Replaced magic constants with defines e.g. for HID version or output report values.
+- Minor code changes e.g. const changes.
+- Uses container_of to retrieve 'struct ps_device' from 'struct dualsense'.
+- Added an explicit module_init/module_exit to clean up the player IDA.
Thanks,
@@ -71,11 +42,12 @@
HID: playstation: report DualSense hardware and firmware version.
MAINTAINERS | 6 +
- drivers/hid/Kconfig | 21 +
+ drivers/hid/Kconfig | 20 +
drivers/hid/Makefile | 1 +
drivers/hid/hid-ids.h | 1 +
- drivers/hid/hid-playstation.c | 1485 +++++++++++++++++++++++++++++++++
- 5 files changed, 1514 insertions(+)
+ drivers/hid/hid-playstation.c | 1448 +++++++++++++++++++++++++++++++++
+ drivers/hid/hid-quirks.c | 4 +
+ 6 files changed, 1480 insertions(+)
create mode 100644 drivers/hid/hid-playstation.c
--