Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp1605561yba; Thu, 4 Apr 2019 14:17:51 -0700 (PDT) X-Google-Smtp-Source: APXvYqyFuuuvXpTyUl9l6hiR1G9as09hBRkNQPcL+orglMSzR9AnPHGsw2W8u7DfokD14v61fcuj X-Received: by 2002:a17:902:a7:: with SMTP id a36mr8900521pla.267.1554412671887; Thu, 04 Apr 2019 14:17:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1554412671; cv=none; d=google.com; s=arc-20160816; b=xnRX7Uu4UI13JI90dIL8RQT/UbB4TEnNjHPULCOlLd3a7NcsLKYRoY2EAWdo5UmFmM D+Tn8cZlNDGAGq1IqBWrSqEcPcqPjhJHEEh1796dBjmhGszLRbHx7EJOxVe1iAAtRrj+ 4ODa0LMM9/jiSPrLjknHLmZF+RxBQJxmYzN4T9lO0xHrpyWzjNj+FoIq1Y4aYnYLAMjN 8g1FBoRmnPgjD+dfTHWGRtDfB8b2IwBC7yTwW3wXATywLeUD3dO3Tv3p0NVTkkzMK59y uRNobIteF4TI8I/A6raTUi1xlt3viBggVgwPVZ0JxZ6p9e5fWBtOIisqrdQpbqSIOWkM mh1A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=dp1Y9Dv5GK630BR2v0clibblX4rr7K4ynMZz4d+Iw/8=; b=pe5GuOsCD9GoyQSohMnPbNaovyBFpWW0CQZf37Rbywl8ibGs+RBpO4EllmFmQb8l0i 42O+4u1PZ893mjcNDApsNArGgx7DbyD9r85t84+KVladPKmc4lHXuR4NuTbinqaXAN1X DN4NrmN6DvjmWwVaywtS1uTqWN5KxpoBrlKtS0gnRzGCnNVjaVOhrp/d9OcwC3eZkwQf W+TRpHOEUTnzFl/naUvmiYSuYHTNpSrgrg6qOl0GEPEUMhpNKnu2Tf7+KOcBJhpQcW+x SC+E2ArTWW6SFaIMxHJhVCksmo6O1BLhhAYWe1+g2+yuCXLNP1A2CL72T4JkUB2NtmsV Qyeg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=K8Iaaphp; 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=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id d14si17927597pln.404.2019.04.04.14.17.36; Thu, 04 Apr 2019 14:17:51 -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; dkim=pass header.i=@google.com header.s=20161025 header.b=K8Iaaphp; 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=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730847AbfDDU0t (ORCPT + 99 others); Thu, 4 Apr 2019 16:26:49 -0400 Received: from mail-lf1-f67.google.com ([209.85.167.67]:39921 "EHLO mail-lf1-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729701AbfDDU0t (ORCPT ); Thu, 4 Apr 2019 16:26:49 -0400 Received: by mail-lf1-f67.google.com with SMTP id m13so2752056lfb.6 for ; Thu, 04 Apr 2019 13:26:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc:content-transfer-encoding; bh=dp1Y9Dv5GK630BR2v0clibblX4rr7K4ynMZz4d+Iw/8=; b=K8IaaphpikRsNexVl3wgZLY/JMVAKJ5G67c8zuE2BC6Uf9275KJvoN7xkhJ4z/MRN7 MbvfkeCVogYxyRuU9QWbibGKatbH8RB5d3UPo1G/7UJePlMY/H6lDxc+QESATdB5lfr6 dSdLuNxXGQhc1TtbaDSCBDwXgNzb5t5bBpYq2QCcnDD+J/h0Fq/VG5a3r9hphrETRq40 RmJMPpOZsU0U8zV9vWVfSvHcYIqHfj8AR/Ju64CGxwiIfb4GOrsIKRIfsRLYzOS5pxAO nab8OW6cK6U5pu+5TyiQcgCAv1TE4V5A/JvPY7i4iFDNbZ6WCMWyNfq1y7D+00bLK7Iw ySuA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=dp1Y9Dv5GK630BR2v0clibblX4rr7K4ynMZz4d+Iw/8=; b=paa+nN4M3L2Jb54BrPBqMs1cb3VKQ58tQJTk379GA7A0tb/Rx5e08frwgZKk6j0OtK jiBEMqJSrX7T8QEpaPw6BXqqUzgvp0r1bGONLHHOkuAFZ4x46/mqJnRC4tl5nLVaWa+Z xIxdXhOCIUQK/ps6H+7KiIIR+F21j/+uJZHRz05MpCz0pZVuELxLu8UNkXl0lp8faMND zWVEJeZX69vU1K+WGsEcC0GmtPP77X5VNW+YKm9ofRG42KgN0V83FDNuSxWH/5Vupl6K mIqQNrsGx12B2E3lGprZaRb9EyyrkOsJwMLD7SlbgL9PRtO35ig8PPDg0i1oGDdUIedA ahsA== X-Gm-Message-State: APjAAAWe7/BXvQikZVSgyCHWz9K7L4FRZr19ML6nPvnCRGk+4ChJCfyA vzY6qmvAfMrmEQGwaXAk3Hk70EH906DsOh3CShnj7Q== X-Received: by 2002:ac2:5108:: with SMTP id q8mr3971924lfb.99.1554409606022; Thu, 04 Apr 2019 13:26:46 -0700 (PDT) MIME-Version: 1.0 References: <20190404185919.GB27340@amd> <20190404191931.GA29984@amd> <20190404200658.GD29984@amd> <20190404202042.GF29984@amd> In-Reply-To: <20190404202042.GF29984@amd> From: Dmitry Torokhov Date: Thu, 4 Apr 2019 13:26:35 -0700 Message-ID: Subject: Re: [PATCH v5 3/3] platform/chrome: Standardize Chrome OS keyboard backlight name To: Pavel Machek Cc: Nick Crews , Guenter Roeck , Enric Balletbo i Serra , Benson Leung , linux-leds@vger.kernel.org, Jacek Anaszewski , Alexandre Belloni , Alessandro Zummo , linux-rtc@vger.kernel.org, linux-kernel , Duncan Laurie , Simon Glass Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Apr 4, 2019 at 1:20 PM Pavel Machek wrote: > > On Thu 2019-04-04 13:13:34, Dmitry Torokhov wrote: > > On Thu, Apr 4, 2019 at 1:06 PM Pavel Machek wrote: > > > > > > Hi! > > > > > > > > > It is *function* and maybe color that userspace is interested i= n, and > > > > > > here we have proper standardization in form of "kbd_backlight".= Device > > > > > > name is, well, device name. It should uniquely identify the dev= ice led > > > > > > is attached to, but otherwise is rarely interesting. If userspa= ce is > > > > > > really concerned what kind of keyboard backlight it is it shoul= d > > > > > > investigate parent device(s) and see what they end up with. > > > > > > > > > > That does not work. Userspace wants to know if it is internal key= board > > > > > or USB keyboard, not what kind of i2c controller the LED is conne= cted > > > > > to. > > > > > > > > Why does userspace want to know it? > > > > > > For example to turn off backlight on internal keyboard when the lid i= s closed. > > > > Would you not want to turn off external as well? > > Not really. If I'm using machine with lid closed, external monitor and > USB keyboard attached, I want to control backlight of USB keyboard, > but backlight of internal keyboard can stay off. > > > And what to do if internal keyboard is not platform but USB? Like > > Google "Whiskers"? (I am not sure why you decided to drop my mention > > of internal USB keyboards completely off your reply). > > I don't have answers for everything. Even if you have USB keyboard, you'l= l > likely still have backlight connected to embedded controller. If not, > then maybe you have exception userland needs to know about. > > Still better than making everything an exception. You do not need to make everything exception. You just need to look beyond the name, and see how the device is connected. And then apply your exceptions for "weird" devices. > > > > > > grep for platform::mic_mute . > > > > > > > > > > (And platform is even pretty good match for how the LED is connec= ted > > > > > in your case). > > > > > > > > Until we get a secondary interface that is also "platform"... > > > > > > How would that happen? > > > > It won't happen on Wilco, but you can't imagine that several blocks > > get reused in the same device and they end up clashing? > > In the end, there will be just one internal keyboard backlight, right? =C2=AF\_(=E3=83=84)_/=C2=AF Maybe. Maybe not. Who knows what HW designers w= ill come up with. Thanks. --=20 Dmitry