Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp2453741rwb; Fri, 16 Dec 2022 02:11:33 -0800 (PST) X-Google-Smtp-Source: AMrXdXv3wNanSjZZS2vK4rp3jMgmpZCRTIpGHt4U8p1DvM0h+NI29RKagjDCxxM4VuaRzTe50QKt X-Received: by 2002:a05:6402:4021:b0:472:c7fe:475e with SMTP id d33-20020a056402402100b00472c7fe475emr9112703eda.27.1671185493408; Fri, 16 Dec 2022 02:11:33 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1671185493; cv=none; d=google.com; s=arc-20160816; b=zkmoJR+xjIAUqMFXHCJ/2tePYjALExjDlZLyvne52iquo1Q0y2zvw3v0LjCkyZmH+O ou1lGweVaK3m1OO37V3g6F4ufafojj+nx3W6s0hoMfTG55y39gPlkAZ2RAwn65ZybBlW QtrgjQMlt/g/YygS79vRk3qOYVR7cuBZkdrvkUaf5WnVJ09IoDgInalvJRQEOzq2rFP1 gy4gT7HpiShu251uzT6TMGyFOfaLPLG0JeZEg8GK4RgSYTzg+W5x1rjMZfGhOV2sXevl vzkCPxO0FZrFOigQ9S+mAjHaIXY9Kp/GIxladiK0Sql3Lnr3DeagY8KfUfYkdCmbx99w XY4g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:user-agent:references:in-reply-to :date:to:from:subject:message-id; bh=QwXwbKJSviRg9w1Ra9kMwIdg8y8aYFv7yWVTeCdYYQE=; b=hCllCVfQhlPZmSXHlYZb+HDNTLwZY1MzP7TUz12nnf2drrdQ7kTpQ8ARcMY6uK0iW2 a9DuCWBMe68oUIlHS7hJfJsEl71U6VuDX1o1ZuZW/YSnVp7aWosc4JQ3qQKqM15SzA4q p13UCZZh8blb+KgqsTz6Z3mNWd8Zy7YzvmU5bkHjng7JtJBUjSRWfB1WzWpDxVzbM5Qj xDClXqRv+fRl148sA6+/ZcA4czZIUDWsscclAbwQLMmIcer+BeHucH2ilfp2PTnmezbR 7KCrJWJTsGUyQbk9/yY9xSwEv/d1CJ/n/iDBQYfC3Lw0Vn1BA50fVaXT5+7mOVyXDsC0 k1Ow== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id q13-20020a056402518d00b00461c0fd2597si2440973edd.89.2022.12.16.02.11.15; Fri, 16 Dec 2022 02:11:33 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230319AbiLPJyL (ORCPT + 69 others); Fri, 16 Dec 2022 04:54:11 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42306 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230326AbiLPJxs (ORCPT ); Fri, 16 Dec 2022 04:53:48 -0500 Received: from relay5-d.mail.gandi.net (relay5-d.mail.gandi.net [IPv6:2001:4b98:dc4:8::225]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id EC79950D79; Fri, 16 Dec 2022 01:53:41 -0800 (PST) Received: (Authenticated sender: hadess@hadess.net) by mail.gandi.net (Postfix) with ESMTPSA id 2D56D1C000D; Fri, 16 Dec 2022 09:53:37 +0000 (UTC) Message-ID: <8f00ae9463b07fbd789af3840cd59a9e99caff34.camel@hadess.net> Subject: Re: [PATCH] hid: Support for Litra Glow From: Bastien Nocera To: Andreas Bergmeier , Jiri Kosina , Benjamin Tissoires , Filipe =?ISO-8859-1?Q?La=EDns?= , linux-input@vger.kernel.org, linux-kernel@vger.kernel.org Date: Fri, 16 Dec 2022 10:53:37 +0100 In-Reply-To: <9fca69c7-cc24-63d0-98f6-80c28fc69a5@9300> References: <9fca69c7-cc24-63d0-98f6-80c28fc69a5@9300> Content-Type: multipart/mixed; boundary="=-Sr8f35irKMU9aZI4Whjo" User-Agent: Evolution 3.46.2 (3.46.2-1.fc37) MIME-Version: 1.0 X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_LOW, SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --=-Sr8f35irKMU9aZI4Whjo Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Thu, 2022-12-15 at 22:09 +0100, Andreas Bergmeier wrote: > Tries to implement as general support for Illumination Light as > possible. Note that it is singular, which means by Logitech spec we > are > fine off with just handling one capability/device. Your email client absolutely trashed the patch's indentation, it's unreadable as-is. > Implementation currently only exposes Brightness and On/Off controls. > Does currently not expose Color Temperature because LEDs does not > support it. >=20 > Introduces HIDPP_QUIRK_CLASS_SIMPLE_START to prevent reconnect on > startup. Could not get Glow to work with that. I'd really rather we didn't introduce a new quirk, but instead fixed the fact that we need to restart the HID transport to support 3 (!) devices. Would something like the attached patch work? I haven't tested it yet, but if it works for you, I'll test it on the devices I have here. Cheers --=-Sr8f35irKMU9aZI4Whjo Content-Disposition: attachment; filename*0=0001-HID-logitech-hidpp-Don-t-restart-communication-if-no.pat; filename*1=ch Content-Type: text/x-patch; name="0001-HID-logitech-hidpp-Don-t-restart-communication-if-no.patch"; charset="UTF-8" Content-Transfer-Encoding: base64 RnJvbSBlZDY2NmIwMjk4MzZiNjVjODJmNjFiN2EyMTE3YzJjMTQ0ZTJiZTVkIE1vbiBTZXAgM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