Skip to content

Proper device names in IPTS driver #4

Closed

Description

@qzed

My little concern is that we cannot distinguish touch devices by name anymore:

# before
$ libinput list-devices | grep ipts
Device:           ipts 1B96:005E UNKNOWN
Device:           ipts 1B96:005E
Device:           ipts 1B96:005E Touchscreen
Device:           ipts 1B96:005E Mouse

# after
$ libinput list-devices | grep ipts
Device:           ipts 1B96:005E
Device:           ipts 1B96:005E

No impact on functionality, though.
I hope we can change the name by IPTS driver side rather than patching to hid-multitouch.c at some point, like ipts 1B96:005E Pen and ipts 1B96:005E Touchscreen (for human).

(The ipts 1B96:005E UNKNOWN device was a single-touch device.)
(I don't know what was the purpose of the ipts 1B96:005E Mouse. It seems to be not used by any input for me.)

Originally posted by @kitakar5525 in #3 (comment)

Activity

  1. qzed commented on Sep 21, 2019

    @qzed
    MemberAuthor

    @kitakar5525 Right, we should probably use better device names for this. For classical USB devices, the name is (as far as I know) supplied by the device attached to the bus. It would also be nice if we could get some naming that is properly understandable for non-developers (e.g. Microsoft Surface IPTS Touchscreen and Microsoft Surface IPTS Stylus), where the prefix would ideally be supplied by attached the device itself somehow (or maybe the firmware files?).

  2. added
    C: enhancementCategory: New feature or request
    P: lowPriority: Low priority
    on Sep 21, 2019
  3. qzed commented on Sep 21, 2019

    @qzed
    MemberAuthor

    Names are set here:

    https://github.com/qzed/linux-surface-kernel/blob/1d902b5208160d98d1e35f690d3c47d97c2193fc/drivers/misc/ipts/ipts-hid.c#L284-L285

    Edit: I am currently not sure how this creates multiple input devices and how we can give them different names.

  4. StollD commented on Sep 21, 2019

    @StollD
    Member

    Edit: I am currently not sure how this creates multiple input devices and how we can give them different names.

    IPTS creates one single hid_device and uses it to forward all (hardware-generated) HID events to the kernels hid subsystem. There, they are split into multiple hid_inputs (using the HID descriptor I believe), which are then processed by hid-multitouch etc.

    The IPTS driver is not much more than a relay for those messages. If we wanted to split them into two seperate devices that can be controlled from IPTS we would have to reprocess the HID messages coming from the hardware / firmware.

  5. qzed commented on Sep 21, 2019

    @qzed
    MemberAuthor

    @StollD Thanks, makes sense. So we don't have direct control over the suffix, at least without changing hid system internals, which then would probably involve some convincing of the upstream maintainers if we ever get to upstream this.

  6. 285 remaining items

  7. added a commit that references this issue on Oct 8, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    A: IPTSArea: Issue in IPTS driverC: enhancementCategory: New feature or requestP: lowPriority: Low priority

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions