Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp3223762pxf; Mon, 15 Mar 2021 04:52:40 -0700 (PDT) X-Google-Smtp-Source: ABdhPJysmwoHT5XLXnqeOIvWvj8QotMsEwT3QOIQ1FC4OLuDIV17kmn0pfQJ/68cJos8jE8IH5n0 X-Received: by 2002:a17:906:27c7:: with SMTP id k7mr23311050ejc.13.1615809160024; Mon, 15 Mar 2021 04:52:40 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1615809160; cv=none; d=google.com; s=arc-20160816; b=QCcCxTwvjV04DWW/Wu2bWtqqZ/HBDL5aZQC/O2yNRdWUXq9IKXXtYWX98raqvfP/tC s3juJz7YPYNrwiFhAsSa3K6Ia1vpb93eDj6cM96nk9lz/AUlYLbggzHsKYbFpJysaDnM 2erL1rhr8qVxXHaMKbY9rvM736orNRXZSIGDZz3/nUk89A58HT6FqX9GtwJIPaKGfWgS Wua24Ybh90pRwhSYfmd+bXnQJZ3/bCM+7NyzaD9K2B+/XTJz20A43JcWZK7rMtKIU/b+ 64CkPD699wUSHbx7Dga9ZjCk0LtbU75eWJfsA324PonCMwPDR+ioBCeQF21RihNg/Pir 3I5A== 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=6/tbb5uj4681SWyhhrmuL/6qunzyARmCLyV1aVfCta0=; b=j8lr4Su6i2mTFNAZgaj/Hs1GNdlASAbtMr9nWT69g+ZdUnxpS51GxtWYOa9RiGKSeb zvzosK60JyxCHsx6lb0cLQUcl3xuhCihPGzRE4bB6UXlrV80pgy3+yltHqD+YLBZCG+p ucWh/3hj+k6/NGP2tV0HIkkQfIN/o2dguAE0OgczgBmBbFV1/wi+r7D1m5u92aSIMprj xXJBetatMt3UPZfvwPDUZNPkE4WCdjK/5Euez7Alplva57kKjOTM5tGem8l5dm2KMCwG KFmr1GEfXmGCBw1IDnGU7oRN0XmUlMOmckbkNIiMcP+QZuQ1rdNvaLXN/nU0Fbvtn6X/ K3hQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id de13si10358340edb.525.2021.03.15.04.52.17; Mon, 15 Mar 2021 04:52:40 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230252AbhCOLtr (ORCPT + 99 others); Mon, 15 Mar 2021 07:49:47 -0400 Received: from jabberwock.ucw.cz ([46.255.230.98]:47712 "EHLO jabberwock.ucw.cz" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230186AbhCOLtc (ORCPT ); Mon, 15 Mar 2021 07:49:32 -0400 Received: by jabberwock.ucw.cz (Postfix, from userid 1017) id 0C7F81C0B78; Mon, 15 Mar 2021 12:49:30 +0100 (CET) Date: Mon, 15 Mar 2021 12:49:29 +0100 From: Pavel Machek To: Henning Schild Cc: linux-kernel@vger.kernel.org, linux-leds@vger.kernel.org, platform-driver-x86@vger.kernel.org, linux-watchdog@vger.kernel.org, Srikanth Krishnakar , Jan Kiszka , Gerd Haeussler , Guenter Roeck , Wim Van Sebroeck , Mark Gross , Hans de Goede Subject: Re: [PATCH 2/4] leds: simatic-ipc-leds: add new driver for Siemens Industial PCs Message-ID: <20210315114929.GA17127@duo.ucw.cz> References: <20210302163309.25528-1-henning.schild@siemens.com> <20210302163309.25528-3-henning.schild@siemens.com> <20210302205452.GA32573@duo.ucw.cz> <20210303141052.30641e6b@md1za8fc.ad001.siemens.net> <20210303193134.GB8720@amd> <20210303214810.511ad65a@md1za8fc.ad001.siemens.net> <20210303215615.64e45720@md1za8fc.ad001.siemens.net> <20210305192555.34f7ea0f@md1za8fc.ad001.siemens.net> <20210306135453.6dc186d2@md1za8fc.ad001.siemens.net> <20210306140633.57f28b05@md1za8fc.ad001.siemens.net> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="vtzGhvizbBRQ85DL" Content-Disposition: inline In-Reply-To: <20210306140633.57f28b05@md1za8fc.ad001.siemens.net> User-Agent: Mutt/1.10.1 (2018-07-13) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --vtzGhvizbBRQ85DL Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Hi! > > I would also be happy to include a fix to that script. My suggestion > > would be to allow bus=3Dplatform, in which case a "devicename" will be > > required and is allowed to have any value. >=20 > Furthermore it might be good to catch that in the led core instead of > that script. Maybe warn() on dev registration when function/color/name > seem off. Could later become "return -EINVAL" I'm not sure if we want to change _existing_ funny names. Would document such as below be helpful? Could you describe the LEDs you have in similar format? Best regards, Pavel -*- org -*- It is somehow important to provide consistent interface to the userland. LED devices have one problem there, and that is naming of directories in /sys/class/leds. It would be nice if userland would just know right "name" for given LED function, but situation got more complex. Anyway, if backwards compatibility is not an issue, new code should use one of the "good" names from this list, and you should extend the list where applicable. Bad names are listed, too; in case you are writing application that wants to use particular feature, you should probe for good name, first, but then try the bad ones, too. * Keyboards =20 Good: "input*:*:capslock" Good: "input*:*:scrolllock" Good: "input*:*:numlock" Bad: "shift-key-light" (Motorola Droid 4, capslock) Set of common keyboard LEDs, going back to PC AT or so. Good: "platform::kbd_backlight" Bad: "tpacpi::thinklight" (IBM/Lenovo Thinkpads) Bad: "lp5523:kb{1,2,3,4,5,6}" (Nokia N900) Frontlight/backlight of main keyboard. Bad: "button-backlight" (Motorola Droid 4) Some phones have touch buttons below screen; it is different from main keyboard. And this is their backlight. * Sound subsystem Good: "platform:*:mute" Good: "platform:*:micmute" LEDs on notebook body, indicating that sound input / output is muted. * System notification Good: "status-led:{red,green,blue}" (Motorola Droid 4) Bad: "lp5523:{r,g,b}" (Nokia N900) Phones usually have multi-color status LED. * Power management Good: "platform:*:charging" (allwinner sun50i) * Screen Good: ":backlight" (Motorola Droid 4) --=20 http://www.livejournal.com/~pavelmachek --vtzGhvizbBRQ85DL Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iF0EABECAB0WIQRPfPO7r0eAhk010v0w5/Bqldv68gUCYE9JyQAKCRAw5/Bqldv6 8qL1AJ9fhBVoLp9LZkPwJCXTzhKG7oDscwCgvQjgYrt6l9FPpZiyYene5dzSDLY= =vid5 -----END PGP SIGNATURE----- --vtzGhvizbBRQ85DL--