Received: by 2002:a05:6a10:2726:0:0:0:0 with SMTP id ib38csp1148088pxb; Thu, 24 Mar 2022 13:46:40 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzZDJHkDSqr9TbP7ZsITWu1XfajnuEMM1lkIR55/PseAaLSA3jTeQzDQBbHuCH4ijcpr8yX X-Received: by 2002:a17:902:c951:b0:154:38b8:aa30 with SMTP id i17-20020a170902c95100b0015438b8aa30mr7847855pla.145.1648154799729; Thu, 24 Mar 2022 13:46:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1648154799; cv=none; d=google.com; s=arc-20160816; b=x4403uSQAhURyUsIeAleyACCGsHj/ThtgRTpVLKImO66WLnLiSpXUwJrGAOGbxw28x Vg1rHQz/6hC/BtiEb9Vy2ieOF55rrmCzmrMnmZ9qnexGxknAdAtZBxESbW0Bj7eYDNUk 3hODNZkelIDLd8ta4g8LYlzwUpjqnrURmGAdMBzLICQbAvuHEHi8GerkI4r6Cm0E/cmN Pjck7yh/CpBf47shOvh1lMDwOvefgT3BZb9Sz4oLr7HDWpwxL6HA/zeEFGIy6bp8rzMr L5BhLVGsokQm0zioVIFiQRepqON1tOwA/BfxG7ukyFIez9zYQD1cWc4x3PlXx3ZafRL5 74Bg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date; bh=WcZe4V1ZrGgGt4WnAkBMy7mG69Us3oPTi0U3R2atkUA=; b=ZqPq7RGAaYbjio16SVP6bDAlNcdfidDkG4OkUa6Jcdbhuw9yoXNWVtfDC21coG2U9X GdJyDLjfRfp5oTzg0CGoJrEfGgHv+OIZkap6ytuyPP+aA8sqE4m+vpSmnhwqGgfdH4k7 TiCZz+Z2iXhRyZeI7Coomwpb5iGipF6wPgCBvth5Mssb+Z5UExBRc6pPZdH3lAXj34w6 B9IlxCvBOeRP6h3J2MgBPl35DJn90QX6ofGyTUk8nf9v0MwYG3eGJ2rumn4R8aZFHvoP 5okPMHfdwK7TPppm0G87KPTXnlYfS7qPmza+bcCv0XJLk+eQovUFDMtQZrOdfHAefNw6 oVcw== 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 t23-20020a63b257000000b003816043f136si311706pgo.811.2022.03.24.13.46.25; Thu, 24 Mar 2022 13:46:39 -0700 (PDT) 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 S1344856AbiCWVGC (ORCPT + 99 others); Wed, 23 Mar 2022 17:06:02 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59270 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1344844AbiCWVF6 (ORCPT ); Wed, 23 Mar 2022 17:05:58 -0400 Received: from jabberwock.ucw.cz (jabberwock.ucw.cz [46.255.230.98]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1DEE911C1C; Wed, 23 Mar 2022 14:04:26 -0700 (PDT) Received: by jabberwock.ucw.cz (Postfix, from userid 1017) id 313FB1C0B87; Wed, 23 Mar 2022 22:04:24 +0100 (CET) Date: Wed, 23 Mar 2022 22:04:23 +0100 From: Pavel Machek To: Manuel =?iso-8859-1?Q?Sch=F6nlaub?= Cc: lains@riseup.net, jikos@kernel.org, benjamin.tissoires@redhat.com, linux-input@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] HID: logitech-hidpp: support Color LED feature (8071). Message-ID: <20220323210423.GA10741@duo.ucw.cz> References: MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="W/nzBZO5zC0uMSeA" Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.10.1 (2018-07-13) X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,SPF_HELO_NONE, SPF_NONE,T_SCC_BODY_TEXT_LINE 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 --W/nzBZO5zC0uMSeA Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Hi! > The HID++ protocol allows to set multicolor (RGB) to a static color. > Multiple of such LED zones per device are supported. > This patch exports said LEDs so that they can be set from userspace. >=20 > Signed-off-by: Manuel Sch=F6nlaub Please cc LEDs stuff to the LED lists. > +static int hidpp_mc_led_register(struct hidpp_device *hidpp_dev, > + struct led_classdev_mc *mc_dev, > + int zone) > +{ > + struct hid_device *hdev =3D hidpp_dev->hid_dev; > + struct mc_subled *mc_led_info; > + struct led_classdev *cdev; > + int ret; > + > + mc_led_info =3D devm_kmalloc_array(&hdev->dev, 3, > + sizeof(*mc_led_info), > + GFP_KERNEL | __GFP_ZERO); > + if (!mc_led_info) > + return -ENOMEM; > + > + mc_led_info[0].color_index =3D LED_COLOR_ID_RED; > + mc_led_info[1].color_index =3D LED_COLOR_ID_GREEN; > + mc_led_info[2].color_index =3D LED_COLOR_ID_BLUE; > + > + mc_dev->subled_info =3D mc_led_info; > + mc_dev->num_colors =3D 3; > + > + cdev =3D &mc_dev->led_cdev; > + cdev->name =3D devm_kasprintf(&hdev->dev, GFP_KERNEL, > + "%s:rgb:indicator-%d", hdev->uniq, zone); So this is keyboard backlight? We should add the documentation at the very least, so that other drivers use same name. Best regards, Pavel --=20 People of Russia, stop Putin before his war on Ukraine escalates. --W/nzBZO5zC0uMSeA Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iF0EABECAB0WIQRPfPO7r0eAhk010v0w5/Bqldv68gUCYjuLVwAKCRAw5/Bqldv6 8kx0AJ9oRQqFcCr56nwvRNMMN+qF5d6glgCfbBf5ZasT2VlWCFhfy+uI65wakSk= =ru61 -----END PGP SIGNATURE----- --W/nzBZO5zC0uMSeA--