From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.6 required=3.0 tests=DKIMWL_WL_MED,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_PASS,USER_IN_DEF_DKIM_WL autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id C6430C4360F for ; Thu, 4 Apr 2019 21:48:50 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 81DA820882 for ; Thu, 4 Apr 2019 21:48:50 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b="eFJEuK5l" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730168AbfDDVsu (ORCPT ); Thu, 4 Apr 2019 17:48:50 -0400 Received: from mail-lj1-f196.google.com ([209.85.208.196]:43799 "EHLO mail-lj1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726418AbfDDVsu (ORCPT ); Thu, 4 Apr 2019 17:48:50 -0400 Received: by mail-lj1-f196.google.com with SMTP id f18so3418716lja.10 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=ajlXZcE/zUwdRAlaD5/iB5qH8UCu8TXKDf7EZn4UKJELnAkgmRYjhYCMCnJXcTZO/t RNviECsaqva1x893OUaFWaPM8oFDaAsAIu3BCIPrQa+tla4qcqqd0r0bo0L6kM83LQ4m a2UA29dCvQpzdBEAqn8immdGKxfIsuvuDm/+hC3KGkND9AT5i3viRnGmtzVwfis14X+l nNbvqQNoW8owYOqJScZKKnzP6ey+e7F/TFxI9NdcEgEsin3b8gB5is+y8H/agwg5FgUi dlHlkx5IBufaQcoy3aSESZeEnppzLgFQJYvwRRQLL/qVuZBRc0G8lnenA8t2TsJtQ39U sdgA== X-Gm-Message-State: APjAAAXF9oWWT+VWg3kpohg85cHKBF3aYrT6o4PNCGoTGqgVM6io9YHQ ChGM4BLa21dqfHKeQCAR49naEBu+Y/u+8aWcDMhXEA== X-Google-Smtp-Source: APXvYqxOQfjKUkDoK2/pSa46o0UhiU889gur1wcFNVmJf+0Uc7RPOjnz9LkRJQdNeLNC0mBdhwKdC8pPxEY7mpNpyhg= 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-rtc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-rtc@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