On Tue, Jan 15, 2019 at 08:49:57PM -0600, Daniel Ogorchock wrote: > On Tue, Jan 15, 2019 at 9:50 AM Billy Laws <blaws05@xxxxxxxxx> wrote: > > > I think the general conscious was to use one input device for each > > joycon and let user space games/apps handle the mapping themselves. > > > If the consensus is for treating them as separate inputs, I'll make > that modification. It should make the driver itself a lot cleaner and > remove an extra layer of abstraction. I agree that having them as separate input devices is going to be better in the long run. There are already cases where a single physical device has multiple inputs, so userspace has to deal with that anyway. And in this case they can be used separately. > Another discussion may be the handling of using the Joy-Cons > horizontally. Right now the driver permits the user to hold the SR and > SL triggers at the same time to handle this use case. It maps the > relevant buttons to NORTH, SOUTH, EAST, and WEST to match the gamepad > orientation in the kernel documentation. It also flips around the > negative/positive ranges of the analog stick and its X/Y axes to be > consistent with the normal orientation. > > Would it be preferable to take this functionality out of the driver > completely and to rely on userspace to handle it as needed? I could > map the SR and SL triggers to the same BTNs as the normal triggers. It > appeals to me to keep the reorientation, but this does limit how > flexibly userspace can deal with the controller. Please don't add this to the kernel, let userspace handle it. Makes the kernel simpler and less headaches in userspace. > > Also, I'm not sure of the name, hid-joycon or hid-nintendo-switch > > might work better, as the name switchcon has never been used > > officially. > > On Tue, Jan 15, 2019 at 11:01 AM Roderick Colenbrander > <thunderbird2k@xxxxxxxxx> wrote: > > > > I agree naming wise, I'm not sure if I really like the name swithcon > > either. I would almost considered naming it "hid-switch" or > > "hid-joycon", though the last one is maybe strange as the Switch Pro > > Controller is quite different. For me maybe "hid-switch", I probably > > call JoyCon specific functions "joycon_" and something else for the > > Switch Pro controller. Not sure how much I like "procon_" though, > > maybe "swpro" or some other acronym with pro. > > > > Thanks, > > Roderick > > The reason I didn't initially go with hid-switch was that I thought it > could sound like something more generic than a game controller, almost > like it is some physical device performing switching for hid devices > (whatever that would mean). Even so, it might be the most accurate > name. I came to the same conclusion as you for hid-joycon, although I > do think it's the name that sounds the best. hid-nintendo-switch? There's no year 2038-like limit on module names, right? :) Cheers, Peter