Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp1689726yba; Thu, 4 Apr 2019 16:24:20 -0700 (PDT) X-Google-Smtp-Source: APXvYqwgvQYWf4mBTDpr9gQc2sdRGKdjdJa9bRziqAUo6AmJEEKMxtJmWFCuX2a4nOuckM0KL42p X-Received: by 2002:a17:902:8d97:: with SMTP id v23mr9387199plo.298.1554420260101; Thu, 04 Apr 2019 16:24:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1554420260; cv=none; d=google.com; s=arc-20160816; b=yCoyQXLBXXBlR5sXkdOB7YdGv86VMF+u+k9f08yPjvu6QS9b99lVce0SIPuRYyBqNk KGOAJ37uQ/jQV717nkd84bYC7lTcxLuypYpCwiG1cJTVycDnLh3aT2LqJRhHdoVlpEBo V/gT4lITwhJtahu2bxHYbixJ+5Nys63IQlsGiSMSR8P/XhUdDKTwwFaZmrxZdihMq6lD /L/b9LmgSWNx5+iT2oP5a+Pbj4JH2IS7dQXjd96VO+3ExRjX5v6Kxv36GfoCUcAYgDdg gXmCSd3o5xL6XN1X+qHv8q7WFTZeq39geliQ0MhK03x+6qrCGRZpuotrybCXYJin5pOJ FNNA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=61QcS1XaF8rISpIrfzv8F98PUZe7iaNJHTu+xZl/mz8=; b=yEN4dBGIgBkSPpLTLWBiuGGMYZ9Vvyn5V0irbbgq/qpShtK0sZ+ll/75T9WYMZqvLN gvwZh/rsNoXAIl0F2FfRNTb2yCp6GKQ6IUHZjBlr2bZ2VD9k9ltwo2YiAlyK4nxkqgeM ZfpjIyJuejG/2B+aMngqNkGkmGXNIX8POr8tiWdxqYnfbOPMy2UmobUqdB3BJLyywvRF S7RRf5hT5T689v8j6KYQO1XRLHQHj1uF2W9Dxz/wz7ilooRtlkojXR81JT5q3NTRPdGe PQnIVmj9Ocstw+4gRwezxPYNR+36FEPYI/f70elE6OOPiKByooFSuD9lcBQF4kKP70NV ULPw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=XHbNTv+W; 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 d19si20810749pfm.1.2019.04.04.16.24.04; Thu, 04 Apr 2019 16:24:20 -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=XHbNTv+W; 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 S1730403AbfDDWm3 (ORCPT + 99 others); Thu, 4 Apr 2019 18:42:29 -0400 Received: from mail-yw1-f67.google.com ([209.85.161.67]:40094 "EHLO mail-yw1-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730291AbfDDWm2 (ORCPT ); Thu, 4 Apr 2019 18:42:28 -0400 Received: by mail-yw1-f67.google.com with SMTP id p64so1617160ywg.7 for ; Thu, 04 Apr 2019 15:42:28 -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; bh=61QcS1XaF8rISpIrfzv8F98PUZe7iaNJHTu+xZl/mz8=; b=XHbNTv+WHgdO6QncIaQtXkLWCN/ThEmFWDRuL+cPsIxaAh38/zokY9qbE636Twt083 BqiilbDUVskuuOmVhhcVr0NnPH5uUZWypYPAQHhqa1FTR8HVq0hDbt44jNQeGtLq1rn3 EMH/MaBTX+KDpC3EVSZV6q0LTgZGhZbQuO5ktd7+MFtydWW1uM1VR4JWUKuTRpNxRYnf ftuZM4wc3lC2P0TRoGDcMslwmo+k3GyTAAr2NcXzTUFxCC964s6OkPgIYZpWn2LNkfN3 zT80khl98ZCRWrRC8A9II7ouUuSdVoq+3szA+l79oWEZlNclk+9PnYIWlOdl3K+YIXde eYLg== 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; bh=61QcS1XaF8rISpIrfzv8F98PUZe7iaNJHTu+xZl/mz8=; b=JSpyg3qygO5K8GhGqKFlG/L1vKni1syyQUdJ7tqhdaA6rXsKxJ4JZOyEcZzIFkb0NJ 7Gbl65Ps2Y1BmeMNSheYLAM/V9fquJNl1ss9K2HM4MMzXaGtJaKCebBIEjzLi5ASFDSs 3fSOHi4j48MJPzWg9GafhQ4vcR6zlxvOGdwX/deS5FM28rKJPnJD4RhWvhiCmi8ouqLD +ZjlEMNBj3A55uq+4NoVZURhH2aXd5jLWtPp5MNnEI0KQ8aXZsjd8G7jlDbHltnLlq/l jspGXXvHqOP969uduuwDPpIpycfyn/lAlIvCeOjyuWn4uLBEhycwDo8md9fGVqjbRd7i X89A== X-Gm-Message-State: APjAAAV9ZZSZ9+LScu+iz0HkvPAlLcRLzu9n3LDnEB/gg/z7ktw3GUuq WSQATBkIMYlaKApi1Ct5nBTI4ZyJbjMmiabFSQ7vdw== X-Received: by 2002:a81:3c14:: with SMTP id j20mr7228426ywa.367.1554417747586; Thu, 04 Apr 2019 15:42:27 -0700 (PDT) MIME-Version: 1.0 References: <20190404185919.GB27340@amd> <20190404191931.GA29984@amd> <20190404200658.GD29984@amd> <20190404202042.GF29984@amd> <20190404204207.GH29984@amd> <20190404220509.GA14690@amd> In-Reply-To: <20190404220509.GA14690@amd> From: Guenter Roeck Date: Thu, 4 Apr 2019 15:42:15 -0700 Message-ID: Subject: Re: [PATCH v5 3/3] platform/chrome: Standardize Chrome OS keyboard backlight name To: Pavel Machek Cc: Dmitry Torokhov , Nick Crews , 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" 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 3:05 PM Pavel Machek wrote: > > On Thu 2019-04-04 14:48:35, Dmitry Torokhov wrote: > > On Thu, Apr 4, 2019 at 1:42 PM Pavel Machek wrote: > > > > > > Hi! > > > > > > > > > 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'll > > > > > 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. > > > > > > "Where it is connected" is not interesting to the userland. "Is it > > > backlight for internal keyboard" is the right question. It may be > > > connected to embedded controller or some kind of controller over > > > i2c... my shell scripts should not need to know about architecture of > > > every notebook out there. > > > > Then your scripts will be failing for some setups. > > Well, yes. Do you want to guess what "lp5523:kb3" is? > Oh, please. The discussion is about the driver name part, which you want to overload with some string to mean "internal", which in turn is, if anything, part of the functionality. With "platform", you'll at some point have two "platform::kbd_backlight" entries. Remind me to send you a "told you so" when that happens. Guenter > > > But I don't see why I should do additional work when its trivial for > > > kernel to just name the LED in an useful way. > > > > > > "platform::kbd_backlight" has no disadvantages compared to > > > "wilco::kbd_backlight" ... so lets just use it. > > > > It has disadvantages because it promises more than it can deliver IMO. > > If device name != "platform::kbd_backlight" it does not mean that it > > is not internal keyboard. > > My promise is if "platform::kbd_backlight" exists, it is backlight for > internal keyboard. (And second half is "if it is easy for kernel, we > name backlight for internal keyboard platform::kbd_backlight"). > > > And you still have not resolved how you will > > handle cases when there is more than one deice that can be considered > > internal and may have a backlight. > > Is that realistic? How would that device look like? > > Pavel > -- > (english) http://www.livejournal.com/~pavelmachek > (cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html