Received: by 2002:a89:d88:0:b0:1fa:5c73:8e2d with SMTP id eb8csp1349232lqb; Sat, 25 May 2024 18:26:36 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCWCcd78omcrA7IfOZqN2KGTLmqdybRSVAtHMKqJxg+Kd7yuUa5bwzmkDSSwXdmgnV9f+Xb7M6eHdmqUoHKcVuMIRQdYpAk91uykVlyhpQ== X-Google-Smtp-Source: AGHT+IEdE7l3LWpu/kO3FqxenTIolUlEnrHG9j67mvCHNJK4sUGBj6gUXryO5DCLCIHjczQeCXaT X-Received: by 2002:ae9:f116:0:b0:793:1c6:1dcc with SMTP id af79cd13be357-794ab094402mr541478085a.39.1716686796140; Sat, 25 May 2024 18:26:36 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1716686796; cv=pass; d=google.com; s=arc-20160816; b=NLZBxkjo7R3HUJkISFuahSqqo8dQiVqE2/P5O0ddn5zhpzDDR0i1UHHSxYZWfzQegr QLymEybq1AK/LyaBkkOLoN88A2Ne49TzlsBx42ymnltb/Zl9D/de88mQws5a13fOuHSf 6JXvTbkt8ocLkwCcRInHqNN8nY0oDDsecLVhIgH7aVOGB6UxwCnTfDsOBVlWVzfmFdeE maBtgl7T1KRTWRqsB74zdPMf2g6VtLIjk9TlpZ57t5Q586PnZTnhY+d/aIkAFHITZ48u NMNjSCHL21lUNcbZ8jFqiuibcAMCmZTnS0x5q6RH2WV/FOtne92IldOL2M6caJMtqHXV GNRw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:message-id:subject:cc :to:from:date:dkim-signature; bh=tN2S8NozwC07wPJJOKhyNWFcs7ytDiO56artnFoG6Is=; fh=O7W32hzrxLioy2lU7cq0myUffGADZNPHRUPmOpshY3A=; b=Km1P5sj9iX9rRObpkUGxed0jLUYWojdYYCpa8hD03ishtfHsxhMLXyVeTzzvqKPV/g Z27SjLMClB3xpUqO7LhR9eQOxd7GJ3Q6HuDVvR9cPQil06+hvXa2nINhUa//GMjLusP3 nqi3kxP1CBF33RJ8qYQ1vHPqvZgnp6pO4MVXf0VNQXNamehoA2XIv43cdj7msEHDMi/X D4vSczcvWECpDcJRNKX/OEN4t2jLFcTaThMMKah24iQMnXl/3Z8ymkQgVlfaIqxeuRj8 sYIq5xlnip3z2gqWVQgJFDRKqTPqHZ9j+AWOXv4cjLJODz0K0qUNvgkDuoGCdQ9blSDm 6frQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=NjxfSiic; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-189582-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-189582-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. [147.75.199.223]) by mx.google.com with ESMTPS id af79cd13be357-794abcacbd4si503993585a.54.2024.05.25.18.26.35 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 25 May 2024 18:26:36 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-189582-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=NjxfSiic; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-189582-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-189582-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 C82101C20C91 for ; Sun, 26 May 2024 01:26:35 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id B04D1EC4; Sun, 26 May 2024 01:26:30 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="NjxfSiic" 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 CCF59387; Sun, 26 May 2024 01:26:29 +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=1716686789; cv=none; b=CgzpcwugGc32EQi9U4oUGCPTd7rVhHEi0xetVU0cjBawKU9btiQcHUULOg4S2uxcGzxh8gUKEQGvNVuF1GSPMw8/GD8DxiRyPc7cZDClCDZkCjWMI7LUYI3J0Eoy7vH+qf7hTvb0nmZ+L64XxA6PvmFHQ6UxBEU73PKH92jqaWI= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716686789; c=relaxed/simple; bh=hliK7wtfdTHGdpCX/b8c2sgRKOvc0CvTg9bJ/aDLsWs=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=mgLuo2JRyNPY/KAJtf18b1TsG9XW/ikC1Px7uxQ6XRY3OzBlp/0u+HC2eiYTaDtoAfP8M88ybvNFWJAFrPlIT9EWup8UwASqLSpjqD4gBnw7ogK8z9mGotgN56vUspO6tFrvec8xilch+S1+sP7kgyHCR8mi5uZGlgtDUxtZrFQ= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=NjxfSiic; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 0137CC2BD11; Sun, 26 May 2024 01:26:27 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1716686789; bh=hliK7wtfdTHGdpCX/b8c2sgRKOvc0CvTg9bJ/aDLsWs=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=NjxfSiickapoyY7GKSUZthmQ87dXNQZgqEWNvEzdt/zAoe808W7MTmVfYldr/2qOH 2CF3apqhm41ZbeI7cDckO4g2O1eokvacv1ZJCzhPpjMBA10v9/mfRWy0HT55VHlYgf yJWN/TCIs1vuV6UcxXdQG4VZHvBgj0I5PkObTrKlK87+4anNbmCUSUvECv1KB4aGjv xUHKw6mLF357XqPhOZIXtHwJeJDgSgp1SpDj/ew/i9/tCxXp4o40Sa1I8rzQbRph+S L1ur/01mD5Hg4wyJAfQMxNkkqrF6/2sWRhb7UjgNhK9yIbIYDECTc6tc6zVhp38zfE EhN/EHSlOW21A== Date: Sun, 26 May 2024 01:26:26 +0000 From: Tzung-Bi Shih To: Ben Walsh Cc: Benson Leung , Guenter Roeck , "Dustin L. Howett" , Kieran Levin , Thomas =?iso-8859-1?Q?Wei=DFschuh?= , Mario Limonciello , chrome-platform@lists.linux.dev, linux-kernel@vger.kernel.org Subject: Re: [PATCH 5/6] platform/chrome: cros_ec_lpc: Correct ACPI name for Framework Laptop Message-ID: References: <20240515055631.5775-1-ben@jubnut.com> <20240515055631.5775-6-ben@jubnut.com> <87jzjk1ibr.fsf@jubnut.com> <87cypb12j9.fsf@jubnut.com> 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=us-ascii Content-Disposition: inline In-Reply-To: <87cypb12j9.fsf@jubnut.com> On Fri, May 24, 2024 at 07:35:22PM +0100, Ben Walsh wrote: > Tzung-Bi Shih writes: > > > From the context you provided, instead of matching "PNP0C09" in the driver, > > it makes more sense to me (for Framework EC): > > > > * Mainly use DMI match. > > * Add a quirk for looking up (acpi_get_devices()?) and binding > > (e.g. ACPI_COMPANION_SET()) the `adev` in cros_ec_lpc_probe(). > > Sorry, I don't think I provided enough context. There is already a > platform device /sys/bus/platform/devices/PNP0C09:00 with a companion > acpi device /sys/bus/acpi/devices/PNP0C09:00. I think it makes sense to > bind the driver to the existing platform device. > > I could add a new quirk which provides an alternative ACPI match table > to be used instead of the default. In the default case the match_table > will contain only "GOOG0004" as before. But in the Framework EC case the > match table will be "PNP0C09". I think it doesn't work as the current quirk is handling in cros_ec_lpc_probe() which is after matching. My original idea: would it be possible to get the `adev` in cros_ec_lpc_probe() via any lookup API? If yes, it could still use DMI match and get `adev` if required.