Received: by 10.223.185.116 with SMTP id b49csp1684420wrg; Thu, 22 Feb 2018 01:08:07 -0800 (PST) X-Google-Smtp-Source: AH8x225VvMU+C+8zyWS3sivfzX1Fr/X0qrrLYoIXYirxF3W3NgA1I9H7zl/OBKSkPwpguA2nOJd9 X-Received: by 10.99.96.199 with SMTP id u190mr5087518pgb.231.1519290487853; Thu, 22 Feb 2018 01:08:07 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1519290487; cv=none; d=google.com; s=arc-20160816; b=nFC7a7iF7HUERxfYebykcgqmIjIlLZOfFPm0xgpCY3apP0H/P4qWChrVfxYot7Cezt gW268mpCs3eObMmBtgFTdansGhrbUxfo7hDDkYa9LTHEF0egcbW9aGNmzW9W/hzCmBwR 6Wxip/FIZSpnLb7WOEu9iStPe88V4/we6fnALcph+orCB7L2zYj9dE515tdBt2uBv0Mi baUKhnqMYt8KZ2RRGD7ZqdC0/cW1pUbEcZ6zK4Lwv/FRMldULhZ32BzrHWk/fR67y3rg 33xWmlc4rsVK7ImVVBeHXIfAL+Q+IwAuWqjYn9kIcX+eEkK/3GS8tZ5oeEchdl+WZR8p tnIQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :references:in-reply-to:mime-version:dkim-signature :arc-authentication-results; bh=n7U1CF36NzPM+HvZ+FZfR+X3yjTDWnbt9+DeRPbPoZg=; b=SvNRNQvw3v5OOv0xffXrdiDERKTFjClNSGA1gfe2skTs5Q642KxVcF9bAz9/2giPHT 4PFGEaW06ILcxaOzarKOD5uCbFRV+v+x9sZhgvBWitirlO6B9EC6BZMImwMKjg8FE5v+ F4nmHW/i0TozMQatLCPccepn9jf09Rh7LJSz3f0hjCLxby8t1lzbKXRucomaz4dA7YEn b62rsZNcNgXLsWISICBLC+A4vX/yq71UTfmejWGe501JB4wODRIJPYGtm0NI9tRHTf2T IzzwdjmSkF6WS0y4J0rY/MXI+84lu4kfOE+EIPyc1vJB1YbWGPVVRJl05sbNnVKcFeSB 7RJA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=dJeWw1bW; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id g9-v6si579444pln.818.2018.02.22.01.07.53; Thu, 22 Feb 2018 01:08:07 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=dJeWw1bW; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752910AbeBVJGC (ORCPT + 99 others); Thu, 22 Feb 2018 04:06:02 -0500 Received: from mail-io0-f196.google.com ([209.85.223.196]:39827 "EHLO mail-io0-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752643AbeBVJGA (ORCPT ); Thu, 22 Feb 2018 04:06:00 -0500 Received: by mail-io0-f196.google.com with SMTP id b34so5251024ioj.6; Thu, 22 Feb 2018 01:06:00 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=n7U1CF36NzPM+HvZ+FZfR+X3yjTDWnbt9+DeRPbPoZg=; b=dJeWw1bWbp1O+PC2hfFOljfvf/BZhATw4iywuQVRqC9A0rYqgjXvumBeVhd5k41sUf wTx07sklNlJ4Q2rChWUNtAuhm9q62As7j9x7/TbhgePRrQkSPRhD+ykeZ/xi2oZJzvdU 8gCC1hS+jff/A2SGuoNWwbZ5uhXBOa8/YjoT1QP734hnUqQI1BVK7jtMXuCQUEwi0rgE 3sbByue1IjD8F6v9I2WS3V7CzI2hbpZrYCyXV+e37ypC9iCktkGRHVu+ZMSc33qZ2iEn 5/t6A27rNX8Yn7KC0zaSeY7MSv63KX3KWaZhBu4LNfltX16eVlEn1lYrCqjNmVUjQktW a4fQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=n7U1CF36NzPM+HvZ+FZfR+X3yjTDWnbt9+DeRPbPoZg=; b=FF9dDgimKd67UW3fHLPLqRukmmr4Ek/uOpuLndGP9BuxOsdfdGaQk5hg/N6iPmdzda j4S1uWCZsGJiEiUrEdJgp89jgBIUkjWvnTldP6c5Ad17hB1PI0QPI2liittE6DNjprXs 6U3mfGrA+Rm7nfwlWY8NnFMR2La5WRFBemhmYW/8tR/dMMuOfz+6a5SC1TOnVtJX1zcR mmI9B41Pfakr/aH5o0fMfhsju7wzpAu4PI4R/PTgHHyDbXb6lQdy1s1kMOo2qWOdAR0p j/gvl2wJluDWt5SRopAi7+8BezVfGjFEMS3mk3v1jVK3KZm5diI2R/GLDQ98fhyXGx2D rqMA== X-Gm-Message-State: APf1xPB3yRw8urOKXjpOYIcpsM0QIy4RcW3TAjO6kP8CzK8HfUL5AWyO fQKIXX5t8WozXRgOB9GBGI7mkz4LxcDounld89s= X-Received: by 10.107.58.86 with SMTP id h83mr7829137ioa.284.1519290360112; Thu, 22 Feb 2018 01:06:00 -0800 (PST) MIME-Version: 1.0 Received: by 10.79.225.144 with HTTP; Thu, 22 Feb 2018 01:05:59 -0800 (PST) In-Reply-To: <77b62733-a1ed-16f2-f942-39c27c0f5924@valvesoftware.com> References: <20180220193306.28748-1-rodrigorivascosta@gmail.com> <673a2510-7d82-1b24-1085-9f5aa2bb9998@valvesoftware.com> <20180220232035.GA28798@casa> <52b10af3-d93b-34b2-e6ba-22621511b16f@valvesoftware.com> <20180221202107.GA21140@casa> <77b62733-a1ed-16f2-f942-39c27c0f5924@valvesoftware.com> From: =?UTF-8?Q?Cl=C3=A9ment_VUCHENER?= Date: Thu, 22 Feb 2018 10:05:59 +0100 Message-ID: Subject: Re: [PATCH v2 0/3] new driver for Valve Steam Controller To: "Pierre-Loup A. Griffais" Cc: Rodrigo Rivas Costa , Jiri Kosina , Benjamin Tissoires , linux-kernel@vger.kernel.org, linux-input Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 2018-02-22 1:13 GMT+01:00 Pierre-Loup A. Griffais : > > On 02/21/2018 12:21 PM, Rodrigo Rivas Costa wrote: >> >> Related to that, Benjamin Tissoires replied to 1/3: >>>> >>>> --- a/drivers/hid/hid-quirks.c >>>> +++ b/drivers/hid/hid-quirks.c >>>> @@ -629,6 +629,10 @@ static const struct hid_device_id >>>> hid_have_special_driver[] = { >>>> #if IS_ENABLED(CONFIG_HID_SPEEDLINK) >>>> { HID_USB_DEVICE(USB_VENDOR_ID_X_TENSIONS, >>>> USB_DEVICE_ID_SPEEDLINK_VAD_CEZANNE) }, >>>> #endif >>>> +#if IS_ENABLED(CONFIG_HID_STEAM) >>>> + { HID_USB_DEVICE(USB_VENDOR_ID_VALVE, >>>> USB_DEVICE_ID_STEAM_CONTROLLER) }, >>>> + { HID_USB_DEVICE(USB_VENDOR_ID_VALVE, >>>> USB_DEVICE_ID_STEAM_CONTROLLER_WIRELESS) }, >>>> +#endif >>> >>> >>> In addition to the discussion in 0/3, I wonder if you should not >>> remove this hunk. Unless having hid-generic binding the device before >>> your hid-steam driver, it would be better not force the Steam boxes to >>> use your driver. >> >> >> I don't really see the point on that. If we do that I'll have to unbind >> and bind the device manually, and that is a pain, and impossible without >> root (my ultimate goal is to use this controller with my Tizen TV ;-P). >> >> And anyway this driver is mostly harmless, the only visible changes from >> userspace are the new input and power devices, and that the virtual >> keyboard/mouse are no more. If the virtual devices are really missed we >> could use: >> >> hid_hw_start(hdev, HID_CONNECT_DEFAULT); >> >> on them, maybe with a module parameter? Note that one of the first >> things the Steam Client does is to disable the virtual devices (with a >> command to the device). >> (TBH I always had the impression that those virtual devices are there >> to move the Grub menu...) >> >> If Valve people really feel that this driver is not needed for SteamOS, >> because the Steam Client is always running, then SteamOS can always do >> CONFIG_HID_STEAM=n. > > > Yes, certainly; that isn't really the usecase I'm worried about. What I'm > worried about is behavior changing for existing users of the controller on > normal desktop distributions. Currently the Steam client will program these > pieces of state (enable/disable direct keyboard/mouse HID functionality, > enable/disable gyro/accel) based on the user's configuration, and a user > getting a kernel update that includes a driver that also programs that > without their intervention is bound to affect the behavior. If there was a > way to make it so the states won't be programmed until it's pretty clear the > user is trying to use that driver's functionality, that would feel safer. hid_have_special_driver is no longer required (see patch "HID: core: remove the absolute need of hid_have_special_driver[]" [1]). If I understand Benjamin's intent correctly, the driver will still be used, but if you have a conflict you can simply unload/blacklist the special driver module and hid-generic will handle the device. This way there is no need to recompile the kernel to disable the special driver while keeping standard HID features working. User-space driver packagers (e.g. steam packagers) could simply add a modprobe conf file to blacklist the module and avoid conflicts. [1]: https://patchwork.kernel.org/patch/10066303/