Received: by 2002:ab2:6991:0:b0:1f7:f6c3:9cb1 with SMTP id v17csp1025090lqo; Thu, 9 May 2024 02:29:09 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCWRjKvYH7+zJFO6Zmt9dBm6VziN6VBUVD0+0/dDw/f22z86XPFrNT1tm7ll01W1t2mYo+XVMXkKOUl1yLIb6QmnJ6Dq5ZOTm8h6++v+bg== X-Google-Smtp-Source: AGHT+IG1LmikigQIVp984ywoOJ9/rYtD1PEa1KAz1SAhXyfuTxh2DS4kUCkgu3qbYqb4qb18s3i2 X-Received: by 2002:a05:620a:838a:b0:790:88d6:7982 with SMTP id af79cd13be357-792b27ccf2cmr630517585a.29.1715246948847; Thu, 09 May 2024 02:29:08 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1715246948; cv=pass; d=google.com; s=arc-20160816; b=YBPoA/l8r1hyYx3uc39zpZmxQTPq6Ejr1kCRzkmJepyTEIyzgkk2IkXYbod9ArKwI+ 1AmzeMsip6cEQkBdotPe0+4d92Sophe3zohW2Z1GvnAuZfQrQp93IA54OsFc3owm9NjD nNhg/lHvv5xC3hdJyicpC/qnh07ICgZj6J/Rzhf0TYEFGJ8KSRFoFL+oyjzd6NDmDC7J sI6FpLXe19qrfTzaayRQYFPk2HM3ylgaZvke7xLfJCUxXGIJAYslxM6FKkZe/LtL374R QFPzSuz93B2HTyY8OJKiTo9/cQvrqsW7e0Y7+YByr+ScycLlrku/Srv5ayGvilZ6cxs5 IcfA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-transfer-encoding:content-disposition :mime-version:list-unsubscribe:list-subscribe:list-id:precedence :references:message-id:subject:cc:to:from:date:dkim-signature; bh=XfZyZI2eBSp7cYgl21x+JLs7xFuuLYd0ob17LlUesqk=; fh=JeBRcOeJvFYLROExGjM5NkiDFxas/T4d1cHwrxPrf+g=; b=XJeW/lP4B8VkEETPSDBz1aKbN8asnRYKzeNxCIYfAuEMuQPS/Cc8DMfDAK5Xr7/ew4 vB4iAOv9Wj4m5cz0ZkRwPeB42mbp2EzMcoNWFadH58Hid77vtzEnYjbnH6ydc2lpBYoN 4D3bosZWedQAMaGjy1JbEdKjBaD4nFUJmOrgSTG+n0DSXbEe+PjpCt/R7BhYgBLrYdf1 eiWrPNUFeCZyWB4+JKZ6W4h4zvtA87HiktUkETdJTdIStWXpvAjAMl4OmNiP5wcHJPEI 8PSYsPzkFslQn1kSkeLYDa2/PsINgGXPEsoPnJV2AezFPYDrzwT+IA8DtNSea1Jw7Z5X oJnQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=lBw4nxwF; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-174348-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-174348-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id af79cd13be357-792bf277875si94396385a.119.2024.05.09.02.29.08 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 09 May 2024 02:29:08 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-174348-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=lBw4nxwF; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-174348-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-174348-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id 91DFE1C21560 for ; Thu, 9 May 2024 09:29:08 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id D41DF14A61E; Thu, 9 May 2024 09:29:02 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="lBw4nxwF" Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 07591D528; Thu, 9 May 2024 09:29:01 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715246942; cv=none; b=pAqtuVWIPN4jvezq/5LbtPWuqcxlwEJmd5K4GrNlefPmHex/uVoBO6vrz7aXTOujOX9j613eIWRBrnqI2rU73hiSJV9EvunIryqjpqX4jHIhoFIgfuqp4SJHnkDZIOLy9+5A+ADDDaWrUZDKI4F3d6tAaLN8dwl/pTId6vlSVoI= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715246942; c=relaxed/simple; bh=wZKrO8+x5D6FuMJ5ZBvR3E+b5O6QBa7DkTruok+Onyo=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=EOCcp85zUd8WGGVBmnIh+HGlsOC0ZIb4Mb1jSsQqt/NM2hAh6u1W7r/YvpxHn9cE68RiPja8+aHqLwZbL/dBx8qss9FPZU358B6nMc+ykexqenWEw3EFbgvPqaAh5wOwbi6YNh2nj6o2o4VDtzHJ+uP/nNMiob0ufaQEwXvMrag= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=lBw4nxwF; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 3ECD5C116B1; Thu, 9 May 2024 09:29:00 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1715246941; bh=wZKrO8+x5D6FuMJ5ZBvR3E+b5O6QBa7DkTruok+Onyo=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=lBw4nxwFm5vXM+XYMQ269h/KD+KGBB94ZKz2nVikiFUIzg32j5yyaDN8aVcahigay im91cM6Yuj13adOrCWAIHPvolZdLGlBIZN47UW5j2KT/kz28njMS2l2FXF2d7DxVbe ky4rS3hNNLKH9DOR8Rs4ALDWDbNLWXq39nYIIkGQ8GeyDYcNHLmRF+VVO68cptDoY2 OBJ7RdC9xlrAujTjW8FGMVMThKxIuAXCmQZWxPw0PtkXATDSqhA/U4s/utBpDxOXxU YqpIKsGjQ2dP4EbKSjmk6WifDuK7V4tau8b8aqwEnyr/N45Epa4QTe92iQ0g5y+JSu ZVCrXLFSFMg0g== Date: Thu, 9 May 2024 17:28:58 +0800 From: Tzung-Bi Shih To: Thomas =?iso-8859-1?Q?Wei=DFschuh?= Cc: Mario Limonciello , Lee Jones , Benson Leung , Guenter Roeck , chrome-platform@lists.linux.dev, linux-kernel@vger.kernel.org, Dustin Howett Subject: Re: [PATCH] platform/chrome: cros_kbd_led_backlight: enable probing through EC_FEATURE_PWM_KEYB Message-ID: References: <20240505-cros_ec-kbd-led-framework-v1-1-bfcca69013d2@weissschuh.net> <9b594929-a827-4682-b4aa-98a2c85a536b@t-8ch.de> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <9b594929-a827-4682-b4aa-98a2c85a536b@t-8ch.de> On Thu, May 09, 2024 at 10:13:37AM +0200, Thomas Wei?schuh wrote: > On 2024-05-09 12:25:01+0000, Tzung-Bi Shih wrote: > > On Mon, May 06, 2024 at 07:38:09PM +0200, Thomas Wei?schuh wrote: > > > On 2024-05-05 08:42:21+0000, Mario Limonciello wrote: > > > > On 5/5/2024 04:41, Thomas Wei?schuh wrote: > > > > > The ChromeOS EC used in Framework laptops supports the standard cros > > > > > keyboard backlight protocol. > > > > > However the firmware on these laptops don't implement the ACPI ID > > > > > GOOG0002 that is recognized by cros_kbd_led_backlight and they also > > > > > don't use device tree. > > > > If implementing ACPI ID GOOG0002 is not an option, how about adding a new ACPI > > ID? For the new ACPI ID, it can use EC PWM for setting the brightness. > > Adding a new ACPI ID would be easier than a full-blown ACPI interface. > This would still need changes to the drivers probing setup, however. > > What are the advantages of the ACPI ID aproach over EC_FEATURE_PWM_KEYB? > The EC feature also automatically works on device-tree platforms and > without any work from system vendors. Perhaps no advantages but just following its original design. The driver uses ACPI table for matching devices since it appears. We shouldn't remove the ACPI matching anyway as some existing devices may rely on it. In addition, adding a new ACPI ID sounds more reasonable than using keyboard_led_is_mfd_device() to me. > Adding ACPI ID only for signalling without using ACPI for > communication on the other hand seems weird. I have a different view: using a new ACPI ID and another driver data fits current framework better. I'm not sure if the reason is strong enough for applying a new ACPI ID though. We could wait to see if others in the mailing list may have more inputs. > > > > Something I'd wonder is if the GOOG0002 ACPI ID can go away entirely with > > > > this type of change. Presumably the Chromebooks with ChromeOS EC /also/ > > > > advertise EC_FEATURE_PWM_KEYB. > > > > > > Sounds good to me in general. It would make the code cleaner. > > > > > > But I have no idea how CrOS kernels are set up in general. > > > If they are not using CONFIG_MFD_CROS_EC_DEV for some reason that > > > wouldn't work. > > > > > > If the CrOS folks agree with that aproach I'll be happy to implement it. > > > > I would say NO as some existing devices (with legacy firmware and kernel) may > > rely on it. > > Ack, makes sense. > > You mention legacy kernels, but these would not be affected. We never know if a device would run legacy firmware with new kernel in some day.