Received: by 2002:ab2:6991:0:b0:1f7:f6c3:9cb1 with SMTP id v17csp993565lqo; Thu, 9 May 2024 01:13:52 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCUSOY+1FlXoxyoibA5XDzdYyxD29/622dxA2bxBFvjcnl0qQ7oNn++Mng8Wwm+j3kTpyMdbjKsPDGGCuUEpOOFbeeFp2gZeStseBe67Yw== X-Google-Smtp-Source: AGHT+IHMQCoXsNo1wSI94lM75Tbhxvk7DTiGid3W4morUOpAv5M+Ito0G0ZxV7SeU/qU/TI8ULBM X-Received: by 2002:a05:6a20:9e4d:b0:1a8:e79a:2b0a with SMTP id adf61e73a8af0-1afc8ae9414mr6098099637.0.1715242432223; Thu, 09 May 2024 01:13:52 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1715242432; cv=pass; d=google.com; s=arc-20160816; b=X5FxBlGwY8ll+YnzBK8CTWQ7zoFlx31x4lEW8BFwRgyreYKXWJA+RIxRV7w13P5eH9 i5AH3yKZ/5GJOB98VigUZ6mpcTS9LfqMgmlT8erHnpuZ2CTHllFTM9pC2YuOkkIhli28 EdGVFEL7J/xG9fE7y/MKjkbV3fU723OMSnwOsFYgfy48nVGhBWAhU8tublods35r5OVP N3B7893PugPjYES6e6gdKVNQXW0tOuyu+evZkZlFr1td1G6ep/6GOuhVf5o8U5HX0ewj H3M0CmcwNUS6SHbvSWOXW2F730g205q7iaLjOHSmWJK8adzkxZmshg1FKVjzbA46VhpB j8ng== 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=y2F1G/O/IccRluZkGufUkmbWNE2frUjZHm8FPLby838=; fh=NumKtA6cceUxuVm9nQBnDEY7mIPDjL1IKGmyRC+oRq8=; b=NfB8DI1tmcR4dk0uHBw6PXDDSPvyFHiIuUZQg0dYJN92W69NqLvZIdIdEL1eOAVAys lUUzlNcl3aGnWkM7FZdOZ3ulCRgVVA3HtES39AQgYIgNFT7IS2AypfNJfOYqGzWNQ+tj wsbEHwpBPWeY+ZehwZoeBvbTZjxMKNm6niJAFiy5WZ/UQwuZ+yv8zwLARGdda2m++cLj U7LL6QfQ1YvxYm7+KA/sBJfCFi5LGjr+oQbfzB1/56hZHHv5/qg2mJ7j0Sj3CWP+yLQa pAQdPGaF79uqZdAwOXe5PCDLO8sZ3ljN+FDdAk9nzL9+TSoVyPQUaj0NXC9IOqNtgv1O IA6g==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@weissschuh.net header.s=mail header.b="h/Btutn7"; arc=pass (i=1 spf=pass spfdomain=weissschuh.net dkim=pass dkdomain=weissschuh.net); spf=pass (google.com: domain of linux-kernel+bounces-174264-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-174264-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id 41be03b00d2f7-63412f13ebfsi876177a12.777.2024.05.09.01.13.51 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 09 May 2024 01:13:52 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-174264-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; dkim=pass header.i=@weissschuh.net header.s=mail header.b="h/Btutn7"; arc=pass (i=1 spf=pass spfdomain=weissschuh.net dkim=pass dkdomain=weissschuh.net); spf=pass (google.com: domain of linux-kernel+bounces-174264-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-174264-linux.lists.archive=gmail.com@vger.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 sv.mirrors.kernel.org (Postfix) with ESMTPS id BD72E283B5C for ; Thu, 9 May 2024 08:13:51 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 2BFD7149DE0; Thu, 9 May 2024 08:13:49 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=weissschuh.net header.i=@weissschuh.net header.b="h/Btutn7" Received: from todd.t-8ch.de (todd.t-8ch.de [159.69.126.157]) (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 BF657149C73 for ; Thu, 9 May 2024 08:13:45 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=159.69.126.157 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715242428; cv=none; b=n6Ff8qwQMm+E0gPMUPKvLxWOCkOkAjVI2E9OhX+Vb2DabRQoxrU7vx/mwU7Lrq+9TFuP3M/+woY3v2wCOB1vGIPxpUmA4Eqh850jIEMAxPCYbaf7VU1A4xJEdO0iWsWI6TNN2cdPoy/UNK++SbfaGTRE93e8s0vNWeJx8anMDAU= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715242428; c=relaxed/simple; bh=lHKi0i+Sh9dU0tv5mcRO6DSSVX4y5N1Jy0QuwxVUbw8=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=sepUGA8pN6SK98vy0TQoXrUomZ7V0nHu45PzaA1egHZ5PpISC6nKTAsza6TTmuKshVmLYGlWineDBeNDK2crumPgehkLkQ+bUnl2Lvk/xPvUz2paiXqiGa+P7fShnFxafE1c4+WyEAmb6lVamREsmn7Ip2WYreWQ+9irzaEKRgc= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=weissschuh.net; spf=pass smtp.mailfrom=weissschuh.net; dkim=pass (1024-bit key) header.d=weissschuh.net header.i=@weissschuh.net header.b=h/Btutn7; arc=none smtp.client-ip=159.69.126.157 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=weissschuh.net Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=weissschuh.net DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=weissschuh.net; s=mail; t=1715242418; bh=lHKi0i+Sh9dU0tv5mcRO6DSSVX4y5N1Jy0QuwxVUbw8=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=h/Btutn7RgorRwF1FYvdhvD4IemNLoebxsAr3nteozWA+iTGmbeXj125qfCfW0mVW 80qmmrYxTZfZmr+SPH5PpX38ROPzwd6ATsNfwykn8VKXlkvtKTRRH0hOY+Me7ZOD0f 0cVa39mwR/LukIGUagygLWqOrBI5wkRrl7/zvNTE= Date: Thu, 9 May 2024 10:13:37 +0200 From: Thomas =?utf-8?Q?Wei=C3=9Fschuh?= To: Tzung-Bi Shih 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: <9b594929-a827-4682-b4aa-98a2c85a536b@t-8ch.de> References: <20240505-cros_ec-kbd-led-framework-v1-1-bfcca69013d2@weissschuh.net> 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=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: 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. Adding ACPI ID only for signalling without using ACPI for communication on the other hand seems weird. Also with MFD the device hierarchy is much better. > > > 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.