Received: by 2002:a89:288:0:b0:1f7:eeee:6653 with SMTP id j8csp372546lqh; Tue, 7 May 2024 01:29:52 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCUHoEPANsf+rsYMU+fypuDRRWc8bKhwR2kfDIzQCBn5UW5Kb5SBWjZQEvQbNeAeKpuVhZKZwjdTrcZvq133Omio5JAzyYcR5DEgitZckg== X-Google-Smtp-Source: AGHT+IHmNy28ZpcJnB2uWmfmDGckzCMrFkQEtRr4iIoyqnhcG6Hhbx9sTOjmQa02Y49WzTptvbYR X-Received: by 2002:a05:6a20:d485:b0:1af:8fa8:3125 with SMTP id im5-20020a056a20d48500b001af8fa83125mr12188694pzb.8.1715070592045; Tue, 07 May 2024 01:29:52 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1715070592; cv=pass; d=google.com; s=arc-20160816; b=DzkilAjH6No6LXjKpg13oE4OwIVVOmztRXEfuxKnX7Nsgxn8t20HaQaiGe2SBf/116 vj3Mv9rSW10+ZGZKFc3F9nY7ryIaldu+uAqmJWt2aVLHdRpJd5zHkADoJ4Ms8HTIiXkt u6pGGSrx190Kuv7FG9Rd1MqQWI7K+C7uA4IDyimjg7ErxEuLYVECI8vAb7WezEj+YPvY 8pisCyJ4XjYVvOrpQUqPy9Hb1qodQ2Jfz4gOyJf7eg445aapIJYHz6SFoMxa1gQOPeA3 b4/jje7myg8JQi2hOxNkhbu2nZkiPbXEJGoFRPrj5O5uoJrOXfGhJu+KVTgiqU7scEHw NN0Q== 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=sjdOtoY6Mut04jfGDfZa/FpJ69XA9G6rU4j8ISRNYQ8=; fh=qmKFrNge7+/n5Et2Ge8+urRJv7CRPsJ8BOBanpNgSeE=; b=p/zb+YLQZ5J2c0LwgzuBtmYs13r1NxZX6LzqApiPU0Kdt08YiuNLfrKg33iIxMh57V jKrO4clmScW5I2lua2xgzTC8SaFgeU+xkabOexHFvWY5TipP4cKUwMpQgy9pQTxWQXo/ oE2bPG645Z+pAMho4a6UdoCleg8AW5dthPyppEMJn/XoGFP6d+CwzTGul2Ksi6Jk0Pkr nIW+v/x5/CGbLn2+UFmuVs8FTwlJrS//WOwd9OCdO5OwOUsLA5xxkIOjLqwtyT/E1Czq 9Mvp1t6SUSeaSbqpIhWV0caPUGEGTCamOAyyHfDVvPxsZh/JrF4a8OcxI2nlxiQOSVE8 BQnw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=jLY8b90e; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-170874-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-170874-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [147.75.48.161]) by mx.google.com with ESMTPS id h6-20020a170902f54600b001eb5175fe69si10474807plf.81.2024.05.07.01.29.51 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 07 May 2024 01:29:52 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-170874-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) client-ip=147.75.48.161; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=jLY8b90e; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-170874-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-170874-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 sy.mirrors.kernel.org (Postfix) with ESMTPS id 8E610B22B78 for ; Tue, 7 May 2024 08:29:19 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id B3DBA13C906; Tue, 7 May 2024 08:29:13 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="jLY8b90e" 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 C12CF13CA9A; Tue, 7 May 2024 08:29:11 +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=1715070551; cv=none; b=IrXl597jjdt8/J0oKmT/HZNVcxCDOwKkPMcDnXApAXiHIRONeadL9nH4ywDpj1klJ/aIfDWgVpdsyd50qPjo1eMaNVPVSLP+AOPmYcf6xDQqU+jZ7AUdvh09RdALGCPw0kN8eSUqaUV44Ie8bP4duobIlN+P1swpUvEfpM8DiMc= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715070551; c=relaxed/simple; bh=0zdeGPhU3mRbeeDOlmnBus9pw50/Ln9j0NVn9XT83/8=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=i6/cBRqM1u/XlZwQVhMKqQnao3yUZCi7n2x+v3tUac4nsW9YUeeV7UKrA5Eaq5M09ImY49QgwBflBFpSDCvQ/fVxJjpQ5+binOYO2rG9720WWqdUnHf4HQKL7tJ3SmE9Ao8NmYPprWMC++FOzUzZoBwBJwZ8Gdm5GNyOXgwV0wI= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=jLY8b90e; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 4081EC2BBFC; Tue, 7 May 2024 08:29:09 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1715070551; bh=0zdeGPhU3mRbeeDOlmnBus9pw50/Ln9j0NVn9XT83/8=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=jLY8b90ezp9Eh9A9WQ7NBVrog04p5SnAcxA3nZB+VzJ7zi32nA5GLOZHrMiftSf+S 3YFKA+fmjb/UWBHEkfBM/cYr1HcVaZzgv7EhzcAQEbphlWxG9sOYFGY4iVKuJ+UZ7B 6TheLefgs8nojtQP6mnn7Ib3w3RPrc2ExovheJX8wG7yE2v08azTO/tDJrrqXK+ZpG gQXjPiDB1uYrUOu7HLKdCAf+7BZIbG3YCvdl/uGC5BnNcXajOlOvHoD/ytg7W7iFCS jVCf+rjqa+CJSJ2q6J1zSgSE9nCvx0UeoYcjofbcTULBaIcgcWc+QIkXh5zJRGa098 4UTSsfsf05xFQ== Date: Tue, 7 May 2024 09:29:06 +0100 From: Lee Jones To: Thomas =?iso-8859-1?Q?Wei=DFschuh?= Cc: Benson Leung , Guenter Roeck , Tzung-Bi Shih , chrome-platform@lists.linux.dev, linux-kernel@vger.kernel.org, Dustin Howett , Mario Limonciello Subject: Re: [PATCH] platform/chrome: cros_kbd_led_backlight: enable probing through EC_FEATURE_PWM_KEYB Message-ID: <20240507082906.GU1227636@google.com> 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: <20240505-cros_ec-kbd-led-framework-v1-1-bfcca69013d2@weissschuh.net> On Sun, 05 May 2024, 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. > > Extend the cros_ec MFD device to also load cros_kbd_led_backlight > when the EC reports EC_FEATURE_PWM_KEYB. > > Tested on a Framework 13 AMD, Bios 3.05. > > Signed-off-by: Thomas Weißschuh > --- > This is based on > https://git.kernel.org/pub/scm/linux/kernel/git/chrome-platform/linux.git for-next > > The helper keyboard_led_is_mfd_device is a bit iffy, but I couldn't find > a nicer way. > > * driver_data from platform_device_id is overwritten by the mfd platform data > * Setting the driver_data in drivers/mfd/cros_ec_dev.c would expose the > internals of cros_kbd_led_backlight > --- > drivers/mfd/cros_ec_dev.c | 9 ++++++ Split this out please. > drivers/platform/chrome/cros_kbd_led_backlight.c | 41 +++++++++++++++++++++++- > 2 files changed, 49 insertions(+), 1 deletion(-) -- Lee Jones [李琼斯]