Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp1634193yba; Thu, 4 Apr 2019 15:00:31 -0700 (PDT) X-Google-Smtp-Source: APXvYqxTN9IcvI/sJ6f2l6XjXf49W/g4x+hHFUsXqQtnMKOcazzcQTVX/EuDykjD3zvgID+f6JYA X-Received: by 2002:a17:902:758d:: with SMTP id j13mr8987390pll.44.1554415231302; Thu, 04 Apr 2019 15:00:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1554415231; cv=none; d=google.com; s=arc-20160816; b=KtEC6MyJWnBkBfYFhse1rHeLCVAD3q5aRiXzIgKR/qOQfXwiObvKaSHvhSPA3qCeGB GkP4hmwUGKwgNxmrMmAbmMWXsrkgpjGc2SCzmh9oNg8pSuqCFrZzhXBR+JPxIRkJl4Sk NhZRpbK7U+kqOa4dyRoJvOByd7qm4UdGe2psdcel2bm5Y0x94juqiwJBdptkBtYky58K Dm2Npp8GwEs92pEJ9eZ9QneBvM0V5QcolbpvpKeXmf4sDX9AujF2zPlyrMczIsUEd/HK fvWamnU/F6j1UBvg6Y5hLhy8wp6yndRpWdQAdEK7Qjj9lsGIvHTvt9TQzgStpeR0yLJu jEWQ== 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=nYCaefQYUTkhk2hWXuHW21QRYmTnkr+usMeFrkI/Fak=; b=H23mK4wHoBOeTkmZl0KsTnZ0Rxo4MxLgrA1h7tlBGTgjjajS0Btw5aV+geuWNnmzlp RNuK9pVXoBUuFqwr3H0ZbKXuwSNc6inS+ABliUeIl4ieuwj1FlM56O0prgm5ruw5Q+EW L1fpBJvrK7IebBNPBv9kzHLIWlGe2bBX6nsgHs6l+kvSfjslNfyVrJq1zj5vdOu1pGXX eoGotUE0IZ4Si7a0HOkrTnHhspWa9ygZztseY6+14JH0spNQz/5ROK219TE9lsHpPaBs aF+I9Ilp1nWUpynRzyu+RpVYH2UEc4sfnqBfRYXBU8az5wrprYflnc0vd65nef2elpeg AYog== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=eFJEuK5l; 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 v6si17116102pgk.320.2019.04.04.15.00.15; Thu, 04 Apr 2019 15:00:31 -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=eFJEuK5l; 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 S1730227AbfDDVsu (ORCPT + 99 others); Thu, 4 Apr 2019 17:48:50 -0400 Received: from mail-lj1-f195.google.com ([209.85.208.195]:38108 "EHLO mail-lj1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729833AbfDDVsu (ORCPT ); Thu, 4 Apr 2019 17:48:50 -0400 Received: by mail-lj1-f195.google.com with SMTP id p14so3437099ljg.5 for ; Thu, 04 Apr 2019 14:48:48 -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=nYCaefQYUTkhk2hWXuHW21QRYmTnkr+usMeFrkI/Fak=; b=eFJEuK5lUvJaRMPIS60AhxuGynYUV3SfCTEl65TCK9AEOEoiPTnvOTeu31B7Zgmykj ywBmCfcmHGBB5ozRmnd6wUF76AKNQx6KM/RWEo6j48QcfxR6GsJh3O+bcCOI7ME36u1c ZV01n2KEvwYDeKlMKiy9mZus82Fx1ccSY7vt8LRgVZ5jcE+J1MYQNkFdaVZ7uHGv/NxO 5DdiKvNC/P9qTpYZ7Kj2+79Doa7ocpdtXSQbBS/H17HwrX23ocec9Kb6/4CW0IwQWCss XG8fs1caHmlLEX/bw4YO9/WpPZX1HOF1t6rh7xN0DqaLzTydZl8gAPmaihqbL49E4PSn OF0g== 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=nYCaefQYUTkhk2hWXuHW21QRYmTnkr+usMeFrkI/Fak=; b=IBWdcxgxTBmT1rb+yl7XRdcM3vq7k0s3Bu9S9Dd6fskGUmzg3CbWTbxJ9bK7gEfUt3 0hD827D2E8NHSxqAyol1lz1dDW4VDGcEQUNARWM8ZaoTvptMUSGGZThVDvy12++KyBUf ORiXQhLI1/nMuCF/iHHjPjhS9/6A15T2XX63xth9qa7f+bTsjNRTQ7td30Yr0VLJGF2x TxQsYMzeVlvV1WEHUIEBS1EQsGLJHWJd6nTyELSf+f41sDUjVNpU24d+jNUAq6iUc6z4 KlpfcYgYPp/aM6p/tGBpHjdErt3MGty7wGVFOAaagHD2tToHch0TO5hU7gelS4Av+8Jp bB0A== X-Gm-Message-State: APjAAAUem5BpADwzKV7VKuTAadvTa/V4ARkpriXbjeO5J4r5sWnIFwUt 9ntrr4r/hWPTn1d+Bx3cy1JCEqNIRuXKaho7P2Mdjg== X-Received: by 2002:a2e:9655:: with SMTP id z21mr4759282ljh.60.1554414527400; Thu, 04 Apr 2019 14:48:47 -0700 (PDT) MIME-Version: 1.0 References: <20190404185919.GB27340@amd> <20190404191931.GA29984@amd> <20190404200658.GD29984@amd> <20190404202042.GF29984@amd> <20190404204207.GH29984@amd> In-Reply-To: <20190404204207.GH29984@amd> From: Dmitry Torokhov Date: Thu, 4 Apr 2019 14:48: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" 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: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. > > 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. 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. Thanks. -- Dmitry