Bug 102493

Summary: DualShock 4 related fixes
Product: upower Reporter: Bastien Nocera <bugzilla>
Component: generalAssignee: Richard Hughes <richard>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: medium CC: bugzilla
Version: unspecified   
Hardware: Other   
OS: All   
Whiteboard:
i915 platform: i915 features:
Attachments: linux: Add test for wireless joypad connected via USB
lib: Add UP_DEVICE_KIND_GAMING_INPUT for gaming devices
linux: Detect joysticks as gaming input devices
linux: Move function to prepare for new use
linux: Grab model name from device if unavailable from battery
linux: Grab model name from device if unavailable from battery

Description Bastien Nocera 2017-08-31 14:20:58 UTC
That was the test device, but it applies to a lot of similar devices.
Comment 1 Bastien Nocera 2017-08-31 14:21:48 UTC
Created attachment 133904 [details] [review]
linux: Add test for wireless joypad connected via USB

Mostly for the type of device rather than the connections.
Comment 2 Bastien Nocera 2017-08-31 14:21:51 UTC
Created attachment 133905 [details] [review]
lib: Add UP_DEVICE_KIND_GAMING_INPUT for gaming devices

Joypads, joysticks, dance mats, paddles, Wiimotes, steering wheels,
tractor cabin simulators, pedals, yokes, breathing controllers, and,
hmm, etc.
Comment 3 Bastien Nocera 2017-08-31 14:21:55 UTC
Created attachment 133906 [details] [review]
linux: Detect joysticks as gaming input devices
Comment 4 Bastien Nocera 2017-08-31 14:22:04 UTC
Created attachment 133907 [details] [review]
linux: Move function to prepare for new use

Move up_device_supply_get_sibling_with_subsystem() so we can use
it in up_device_supply_refresh_device()
Comment 5 Bastien Nocera 2017-08-31 14:22:08 UTC
Created attachment 133908 [details] [review]
linux: Grab model name from device if unavailable from battery

The "model_name" and "serial_number" information that upower exports for
batteries that supply a laptop or UPS are supposed to be that of the
battery. But that's very unlikely to happen for devices, such as
wireless mice, keyboards or joysticks.

Look for a sibling input device if a device battery does not contain
model information so as to avoid generic names in UIs.
Comment 6 Bastien Nocera 2017-09-04 12:05:31 UTC
Created attachment 133959 [details] [review]
linux: Grab model name from device if unavailable from battery

The "model_name" and "serial_number" information that upower exports for
batteries that supply a laptop or UPS are supposed to be that of the
battery. But that's very unlikely to happen for devices, such as
wireless mice, keyboards or joysticks.

Look for a sibling input device if a device battery does not contain
model information so as to avoid generic names in UIs.
Comment 7 Bastien Nocera 2017-09-04 12:12:14 UTC
Attachment 133904 [details] pushed as 1dc2b96 - linux: Add test for wireless joypad connected via USB
Attachment 133905 [details] pushed as 5ccd4fe - lib: Add UP_DEVICE_KIND_GAMING_INPUT for gaming devices
Attachment 133906 [details] pushed as 320cc87 - linux: Detect joysticks as gaming input devices
Attachment 133907 [details] pushed as 623a6bf - linux: Move function to prepare for new use
Attachment 133959 [details] pushed as 2ef05c4 - linux: Grab model name from device if unavailable from battery

Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.