Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp2695966yba; Mon, 8 Apr 2019 02:42:07 -0700 (PDT) X-Google-Smtp-Source: APXvYqwfvevEPJ5EdJ3wmEKp8RLBM4B3MUXjk2NAUDRIWF1Zlf3q6vB+zO9I3Rk4HuusIPaM/iZC X-Received: by 2002:a62:ab14:: with SMTP id p20mr28718569pff.23.1554716527222; Mon, 08 Apr 2019 02:42:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1554716527; cv=none; d=google.com; s=arc-20160816; b=CLJyszUqugo+c21kUJX70P10j3V2h9xc3oyUw8dCuplTDW7xEYwGyAhqN38SjUxDqa EF3fvbFbi0t9VJ61kUVAP0vb2Nfi7AkxQSu8RvItAfSRDIYahR8CEA5rfsXZcwzUexc3 GJ2n6fpnz4efv9vkHAsHuHDM21/Z9AtQi52qc8lbgPlLioVF/DWgtpDDImOGlNQ8i3g8 5LiMeWhyXz8z4ahSnOFkZNkQWkQ1Mhu7yUvm2Zs6RFqADVBSN/TyfrQS6LQO/qDXBRFJ qiNEoEyTnr4LY8sDjF3thrHjenMl2/0ZG/ojjlFzA9gkHq/yoRoRRA0SiPO+LHmB4zla cuJg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=DlZjHbWT2ULgUvY5yZ5BzdAtnFqo69f1BTAuyNajEjc=; b=hOSc7AQffcJkr8RYDsBfahVF6aJ5sHekKLZhPQna7KMNxxqpaZMS2raTpO/2oNfsP0 nxHJqnp7LlLpXyLKnkeLOijwrhVr6bZl6+bqyMjEKSiJoOuZoe4StMKwZs/1/IPIfOHP MkQ/QTXZYaemucpl3WY8i6H8/JFjNTGLuiyYaPcidnhi7WC0OBw8zvW/Oez+xR0s+aOi kiXfIJENGPY2ofW+bw+xpEtiubXf0ImeN8TmfqIiNvQfSWgwSGpNx2rxeSKDRkAv+dm6 wHSDUFUXbwhG5PyJeOQvPAQqK7GOzsBgI6IAF+r3dfJ4H+V5Fs6wGGDGuLtqnJGOwHBQ ivGA== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id w5si10001165pfi.214.2019.04.08.02.41.51; Mon, 08 Apr 2019 02:42:07 -0700 (PDT) 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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726513AbfDHJlP (ORCPT + 99 others); Mon, 8 Apr 2019 05:41:15 -0400 Received: from atrey.karlin.mff.cuni.cz ([195.113.26.193]:59577 "EHLO atrey.karlin.mff.cuni.cz" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726212AbfDHJlO (ORCPT ); Mon, 8 Apr 2019 05:41:14 -0400 Received: by atrey.karlin.mff.cuni.cz (Postfix, from userid 512) id 2F56C80477; Mon, 8 Apr 2019 11:41:02 +0200 (CEST) Date: Mon, 8 Apr 2019 11:41:13 +0200 From: Pavel Machek To: Dmitry Torokhov Cc: Guenter Roeck , Nick Crews , enric.balletbo@collabora.com, Benson Leung , linux-leds@vger.kernel.org, jacek.anaszewski@gmail.com, alexandre.belloni@bootlin.com, Alessandro Zummo , linux-rtc@vger.kernel.org, lkml , dlaurie@chromium.org, sjg@google.com, Guenter Roeck Subject: Keyboard backlight LED naming was Re: [PATCH v5 2/3] platform/chrome: Add Wilco EC keyboard backlight LEDs support Message-ID: <20190408094113.GB30958@amd> References: <20190404171007.160878-1-ncrews@chromium.org> <20190404171007.160878-2-ncrews@chromium.org> <20190405201534.GA4426@roeck-us.net> <20190406084157.GA27043@amd> <20190407221846.GB6327@amd> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="NDin8bjvE/0mNLFQ" Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --NDin8bjvE/0mNLFQ Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Hi! > > > > > This document also states "The naming scheme above leaves scope > > > > > for further attributes should they be needed". It does not permit, > > > > > however, to redefine one of the fields to mean "location", much l= ess > > > > > the declaration that a devicename of "platform" shall refer to an > > > > > "internal" backlight, or that there shall be no more than one > > > > > "internal" backlight in a given system. > > > > > > > > "platform" is as good devicename as "wilco" or "chromeos". > > > > > > No, because "platform" is not a device, it is something that you are > > > trying to assign a magic meaning to. > > > > "chromeos" is not a device, either. >=20 > I agree, it is not a device name. We do not assign any specific > meaning to it though. We could change it to "cros_ec" if so desired > and nothing should break. Yes. And you can also change it to "platform" and nothing will break :-). Can we end the discussion here? If not, lets take a look at existing names: =2E/drivers/platform/x86/asus-laptop.c: cdev->name =3D "asus::kbd_backligh= t"; =2E/drivers/platform/x86/samsung-laptop.c: samsung->kbd_led.name =3D "sams= ung::kbd_backlight"; =2E/drivers/platform/x86/thinkpad_acpi.c: .name =3D "tpacpi::kbd_backligh= t", =2E/drivers/platform/x86/toshiba_acpi.c: dev->kbd_led.name =3D "toshiba::k= bd_backlight"; =2E/drivers/platform/x86/asus-wmi.c: asus->kbd_led.name =3D "asus::kbd_bac= klight"; =2E/drivers/platform/x86/dell-laptop.c: .name =3D "dell::kbd_back= light", =2E/drivers/platform/chrome/cros_kbd_led_backlight.c: cdev->name =3D "chrom= eos::kbd_backlight"; =2E/drivers/hwmon/applesmc.c: .name =3D "smc::kbd_backlight", =2E/drivers/hid/hid-asus.c: drvdata->kbd_backlight->cdev.name =3D "asus::kb= d_backlight"; =2E/drivers/hid/hid-google-hammer.c: kbd_backlight->cdev.name =3D "hammer::= kbd_backlight"; =2E/drivers/input/misc/ims-pcu.c: "pcu%d::kbd_backlight", pcu->device_no); asus, samsung, toshiba, asus, dell, chromeos... Those are really not device names, either. But in these cases, LED is probably controlled by EC, or by ACPI BIOS talking to the EC. People usually call such devices "platform devices". (Linux Platform Device Driver - CodeProject =EF=BF=BChttps://www.codeproject.com/tips/1080177/linux-platform-device-dri= ver A platform device is one which is hardwired on the board and hence not hot-pluggable. ) You can take a look at discussion around micmute LED. Thus "platform" is quite suitable name in your case, and incidentaly, it will be more useful for userspace than "cros_ec". Pavel --=20 DENX Software Engineering GmbH, Managing Director: Wolfgang Denk HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany --NDin8bjvE/0mNLFQ Content-Type: application/pgp-signature; name="signature.asc" Content-Description: Digital signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iEYEARECAAYFAlyrFzkACgkQMOfwapXb+vJlgwCguCID6XvkjcM8i9lF5T/C4qOa CNQAn1xrrUlWgNG+JX2gh9qDIDpJ0ckJ =oyOJ -----END PGP SIGNATURE----- --NDin8bjvE/0mNLFQ--