public inbox for linux-acpi@vger.kernel.org
 help / color / mirror / Atom feed
From: Mika Westerberg <mika.westerberg@linux.intel.com>
To: R Ha <rha051117@gmail.com>
Cc: wsa+renesas@sang-engineering.com, linux-i2c@vger.kernel.org,
	linux-acpi@vger.kernel.org, trivial@kernel.org
Subject: Re: [PATCH 1/1] Force ELAN06FA touchpad I2C bus freq to 100KHz
Date: Sun, 5 Jan 2025 10:33:58 +0200	[thread overview]
Message-ID: <20250105083358.GU3713119@black.fi.intel.com> (raw)
In-Reply-To: <CACHtJB-rZ6SKF3d3xTsbJ=zQ+fPVcCcYxXLX_yMRdpE_4tyYYw@mail.gmail.com>

On Fri, Jan 03, 2025 at 05:46:27PM -0600, R Ha wrote:
> Hello,
> 
> Thanks for reading my patch!
> 
> On Fri, Jan 3, 2025 at 3:33 AM Mika Westerberg
> <mika.westerberg@linux.intel.com> wrote:
> > What are those "some devices" and "some controllers"?
> 
> The "Some Devices" are the Lenovo V15 G4 IRU, which I use, and
> potentially the Lenovo V15 G4 AMN and Lenovo Ideapad Slim 3 15IAH8 as
> well (based on issue reports from other users [1]).
> The "Some Controllers" are the Designware I2C controller.
> 
> Sorry for not putting this in the commit message; I had tried to
> follow the comments for the quirk I copied in Commit 7574c0db2e68c
> ("i2c: acpi: Force bus speed to 400KHz if a Silead touchscreen is
> present"), which left them out.

In general it is good to follow the existing changelogs but in this case I
would prefer to add the details of the system in question (so we know what
systems the quirk is applied to).

> On Fri, Jan 3, 2025 at 3:33 AM Mika Westerberg
> <mika.westerberg@linux.intel.com> wrote:
> > Can you add the ACPI table snippet here too for reference?
> 
> I believe this is the correct snippet in my ACPI table (Again, V15 G4
> IRU). Tried to edit it down as much as I could, hopefully this tells
> everything. Please let me know how I should attach a longer snippet or
> the full ACPI table if needed.

Okay thanks for sharing. I don't see the "SPED" beeing assigned in the
below snipped though. I would expect this works in Windows? Have you
checked if it uses 100 kHz or 400kHz there?

> Scope (_SB.PC00.I2C1)
> {
>     [...]
>     Device (TPD0)
>     {
>         [...]
>         CreateWordField (SBFB, \_SB.PC00.I2C1.TPD0._Y53._ADR, BADR)
> // _ADR: Address
>         CreateDWordField (SBFB, \_SB.PC00.I2C1.TPD0._Y53._SPE, SPED)
> // _SPE: Speed
>         CreateWordField (SBFG, 0x17, INT1)
>         CreateDWordField (SBFI, \_SB.PC00.I2C1.TPD0._Y54._INT, INT2)
> // _INT: Interrupts
>         Method (_INI, 0, NotSerialized)  // _INI: Initialize
>         {
>             If ((OSYS < 0x07DC))
>             {
>                 SRXO (0x09080011, One)
>             }
> 
>             INT1 = GNUM (0x09080011)
>             INT2 = INUM (0x09080011)
>             If ((TPTY == One))
>             {
>                 _HID = "ELAN06FA"
>                 _SUB = "ELAN0001"
>                 BADR = 0x15
>                 HID2 = One
>                 Return (Zero)
>             }
>             [...]
>         }
> 
>         Name (_HID, "XXXX0000")  // _HID: Hardware ID
>         Name (_CID, "PNP0C50" /* HID Protocol Device (I2C bus) */)  //
> _CID: Compatible ID
>         Name (_SUB, "XXXX0000")  // _SUB: Subsystem ID
>         Name (_S0W, 0x03)  // _S0W: S0 Device Wake State
>         Method (_DSM, 4, Serialized)  // _DSM: Device-Specific Method
>         {
>             If ((Arg0 == HIDG))
>             {
>                 Return (HIDD (Arg0, Arg1, Arg2, Arg3, HID2))
>             }
> 
>             If ((Arg0 == TP7G))
>             {
>                 Return (TP7D (Arg0, Arg1, Arg2, Arg3, SBFB, SBFG))
>             }
> 
>             Return (Buffer (One)
>             {
>                  0x00                                             // .
>             })
>         }
>         [...]
>         Method (_CRS, 0, NotSerialized)  // _CRS: Current Resource Settings
>         {
>             If ((OSYS < 0x07DC))
>             {
>                 Return (SBFI) /* \_SB_.PC00.I2C1.TPD0.SBFI */
>             }
> 
>             If ((TPDM == Zero))
>             {
>                 Return (ConcatenateResTemplate (I2CM (I2CX, BADR, SPED), SBFG))
>             }
> 
>             Return (ConcatenateResTemplate (I2CM (I2CX, BADR, SPED), SBFI))
>         }
>         [...]
>     }
> }
> 
> For comparison, the properties for a device that I think did set a
> proper speed was like this:
> If ((TPNP == 0xD64D))
> {
>     _HID = "GTCH7503"
>     HID2 = One
>     BADR = 0x10
>     SPED = 0x000F4240
>     Return (Zero)
> }
> 
> [1]: https://bbs.archlinux.org/viewtopic.php?id=297092

  reply	other threads:[~2025-01-05  8:34 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-01-03  5:16 [PATCH 0/1] Force I2C bus freq to 100KHz for ELAN06FA touchpad Randolph Ha
2025-01-03  5:16 ` [PATCH 1/1] Force ELAN06FA touchpad I2C bus freq to 100KHz Randolph Ha
2025-01-03  9:33   ` Mika Westerberg
2025-01-03 23:46     ` R Ha
2025-01-05  8:33       ` Mika Westerberg [this message]
2025-01-06  1:28         ` [PATCH] " Randolph Ha
2025-01-06  9:00         ` [PATCH 1/1] " R Ha
2025-01-07  7:27           ` Mika Westerberg
2025-01-07 12:16             ` R Ha
2025-01-08  5:51               ` Mika Westerberg
2025-01-08  9:29                 ` R Ha
2025-01-09 11:19                   ` Mika Westerberg
2025-01-10  8:31                     ` R Ha
2025-01-10 11:26                       ` Mika Westerberg
2025-01-10 11:45                         ` Jarkko Nikula
2025-01-10 12:07                           ` Mika Westerberg
2025-01-11 15:57                             ` [PATCH] " Randolph Ha
2025-01-13  6:48                               ` Mika Westerberg
2025-01-13 19:52                                 ` Randolph Ha
2025-01-14 11:58                                   ` Wolfram Sang
2025-01-15 19:39                                     ` R Ha
2025-01-11 16:05                             ` [PATCH 1/1] " R Ha
2025-01-13  6:49                               ` Mika Westerberg
2025-01-06  9:08         ` R Ha

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=20250105083358.GU3713119@black.fi.intel.com \
    --to=mika.westerberg@linux.intel.com \
    --cc=linux-acpi@vger.kernel.org \
    --cc=linux-i2c@vger.kernel.org \
    --cc=rha051117@gmail.com \
    --cc=trivial@kernel.org \
    --cc=wsa+renesas@sang-engineering.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