All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ben Gardner <gardner.ben@gmail.com>
To: Mika Westerberg <mika.westerberg@linux.intel.com>
Cc: linux-acpi@vger.kernel.org
Subject: Re: ACPI: Can I use I2cSerialBus with a PCI I2C controller?
Date: Thu, 22 Oct 2015 11:19:16 -0500	[thread overview]
Message-ID: <CAE7DoPY8+zw4xw0hWTmPoG4iPgC=2JRCT4bHqeqqaH+BywTWpw@mail.gmail.com> (raw)
In-Reply-To: <20151022080157.GI1526@lahna.fi.intel.com>

>> Is there a way to see PCI to ACPI associations?
>
> Yes, the PCI device has a symlink "firmware_node" which points to the
> ACPI device.
>
> Here an example from Skylake system (which uses PCI mode for LPSS
> devices):
>
> # ls -l /sys/bus/pci/devices/0000\:00\:15.1/firmware_node
> lrwxrwxrwx    1 root     root             0 Oct 22 08:00 /sys/bus/pci/devices/0000:00:15.1/firmware_node -> ../../LNXSYSTM:00/LNXSYBUS:00/PNP0A08:00/device:6f
>
> # cat /sys/bus/pci/devices/0000\:00\:15.1/firmware_node/path
> \_SB_.PCI0.I2C1

I see the problem now.
Your I2C controller is under the PCI0 device on your Skylake system,
mine was not.

So, I moved the definition of all the PCI devices that are on PCI bus
0 to under PCI0.
After that, all the PCI devices found their ACPI companion and the
firmware_node symlink is present and correct.
I2C-core creates a symlink for the attached device on the right controller.
/sys/bus/i2c/devices/i2c-24C02:00 ->
../../../devices/pci0000:00/0000:00:18.3/i2c-3/i2c-24C02:00
So that part is solved. (And I'll have to send a patch to coreboot...)

The next issue is that the I2C-core isn't matching the device to the
"at24" driver, which has the alias "24c02".

I used to instantiate the device from user space with:
# echo 24c02 0x57 > /sys/bus/i2c/devices/i2c-3/new_device
That now shows the address is busy, so it is creating the device, just
not linking it to the driver.

I'll dig further and see what I can see.

Thanks for your help.
Ben

  reply	other threads:[~2015-10-22 16:19 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-10-20 19:47 ACPI: Can I use I2cSerialBus with a PCI I2C controller? Ben Gardner
2015-10-21  8:50 ` Mika Westerberg
2015-10-21 23:14   ` Ben Gardner
2015-10-22  8:01     ` Mika Westerberg
2015-10-22 16:19       ` Ben Gardner [this message]
2015-10-22 17:17         ` Ben Gardner
2015-10-23  8:20           ` Mika Westerberg
2015-10-23  9:43             ` Mika Westerberg
2015-10-23 17:24             ` Ben Gardner
2015-10-26 19:56               ` Ben Gardner
2015-10-27 10:49                 ` Mika Westerberg
2015-10-27 21:11             ` Dustin Byford
2015-10-28  9:01               ` Mika Westerberg
2015-10-30 16:51                 ` Ben Gardner
2015-11-02 10:25                   ` Mika Westerberg

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='CAE7DoPY8+zw4xw0hWTmPoG4iPgC=2JRCT4bHqeqqaH+BywTWpw@mail.gmail.com' \
    --to=gardner.ben@gmail.com \
    --cc=linux-acpi@vger.kernel.org \
    --cc=mika.westerberg@linux.intel.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.