Handling controllers that can be used separately and together

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,
I'm looking into making a driver for the Nintendo switches joycon, they are two separate controllers that can be used together or separately but most of the time they are used together as one controller.
Each of them is presented as a separate Bluetooth hid device so I'm not sure the best way to represent them to user space. Should I have a new input device for each separate joycon or create a new input device for every pair of l+r joycon?

Another question I have is that they can be docked to the switch where they swap from using Bluetooth hid to using UART. Is it okay for me to add support for that in hid driver? I was thinking of adding a DT compatible that will make the driver register a serdev and when it receives a packet saying the joycon is connected it will register the input devices and in the serdev receive buffer function it'll call a common function that handles packet for both hid and UART. Does that sound okay?

I'll send an rfc driver in a few weeks based of comments to this?




[Index of Archives]     [Linux Media Devel]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Linux Wireless Networking]     [Linux Omap]

  Powered by Linux