public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Tzung-Bi Shih <tzungbi@kernel.org>
To: Ben Walsh <ben@jubnut.com>
Cc: "Benson Leung" <bleung@chromium.org>,
	"Guenter Roeck" <groeck@chromium.org>,
	"Dustin L. Howett" <dustin@howett.net>,
	"Kieran Levin" <ktl@frame.work>,
	"Thomas Weißschuh" <linux@weissschuh.net>,
	"Mario Limonciello" <mario.limonciello@amd.com>,
	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
Date: Tue, 28 May 2024 03:08:36 +0000	[thread overview]
Message-ID: <ZlVKtL7GUHRWkFpf@google.com> (raw)
In-Reply-To: <877cff2kpb.fsf@jubnut.com>

On Mon, May 27, 2024 at 07:06:40PM +0100, Ben Walsh wrote:
> Tzung-Bi Shih <tzungbi@kernel.org> writes:
> 
> > On Fri, May 24, 2024 at 07:35:22PM +0100, Ben Walsh wrote:
> 
> >> 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.
> 
> I was thinking of a new quirk called CROS_EC_LPC_QUIRK_ACPI_MATCH, and
> putting it in cros_ec_lpc_init(), not cros_ec_lpc_probe(). Do we have to
> do all quirk handling in cros_ec_lpc_probe()?

No, but there is already code in cros_ec_lpc_probe() for handling quirks and
we would like to reuse them if we could.

Also a possible issue: MODULE_DEVICE_TABLE() wouldn't work if the table changes
during runtime.

> 
> > 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.
> 
> That works; I've tested it.
> 
> In this scenario we're not using the existing PNP0C09 platform device,
> which means I can't look at
> /sys/bus/acpi/devices/PNP0C09\:00/physical_node/driver and see the
> driver. Is this OK?
> 
> (Note that ACPI_COMPANION_SET() doesn't fix this. You can use
> acpi_bind_one() but that seems more like internal plumbing).

As long as ACPI_COMPANION() in the driver can get the correct `adev`, I guess
it's fine.  Otherwise, put the `adev` to somewhere device specific (e.g.
struct cros_ec_lpc) should also work.

  reply	other threads:[~2024-05-28  3:08 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-05-15  5:56 [PATCH 0/6] Fix MEC concurrency problems for Framework Laptop Ben Walsh
2024-05-15  5:56 ` [PATCH 1/6] platform/chrome: cros_ec_lpc: MEC access can return error code Ben Walsh
2024-05-20  9:45   ` Tzung-Bi Shih
2024-05-15  5:56 ` [PATCH 2/6] platform/chrome: cros_ec_lpc: MEC access can use an AML mutex Ben Walsh
2024-05-20  9:46   ` Tzung-Bi Shih
2024-05-15  5:56 ` [PATCH 3/6] platform/chrome: cros_ec_lpc: Pass driver_data in static variable Ben Walsh
2024-05-20  9:46   ` Tzung-Bi Shih
2024-05-15  5:56 ` [PATCH 4/6] platform/chrome: cros_ec_lpc: Add a new quirk for AML mutex Ben Walsh
2024-05-15  5:56 ` [PATCH 5/6] platform/chrome: cros_ec_lpc: Correct ACPI name for Framework Laptop Ben Walsh
2024-05-20  9:47   ` Tzung-Bi Shih
2024-05-23 18:42     ` Ben Walsh
2024-05-24  2:26       ` Tzung-Bi Shih
2024-05-24 18:35         ` Ben Walsh
2024-05-24 18:39           ` Dustin Howett
2024-05-24 18:45             ` Ben Walsh
2024-05-26  1:26           ` Tzung-Bi Shih
2024-05-27 18:06             ` Ben Walsh
2024-05-28  3:08               ` Tzung-Bi Shih [this message]
2024-05-15  5:56 ` [PATCH 6/6] platform/chrome: cros_ec_lpc: Add AML mutex " Ben Walsh

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=ZlVKtL7GUHRWkFpf@google.com \
    --to=tzungbi@kernel.org \
    --cc=ben@jubnut.com \
    --cc=bleung@chromium.org \
    --cc=chrome-platform@lists.linux.dev \
    --cc=dustin@howett.net \
    --cc=groeck@chromium.org \
    --cc=ktl@frame.work \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux@weissschuh.net \
    --cc=mario.limonciello@amd.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox