From: Mika Westerberg <mika.westerberg@linux.intel.com>
To: Dustin Byford <dustin@cumulusnetworks.com>
Cc: Ben Gardner <gardner.ben@gmail.com>, linux-acpi@vger.kernel.org
Subject: Re: ACPI: Can I use I2cSerialBus with a PCI I2C controller?
Date: Wed, 28 Oct 2015 11:01:40 +0200 [thread overview]
Message-ID: <20151028090140.GL1548@lahna.fi.intel.com> (raw)
In-Reply-To: <20151027211111.GA6011@cumulusnetworks.com>
On Tue, Oct 27, 2015 at 02:11:11PM -0700, Dustin Byford wrote:
> Hi Mika,
>
> On Fri Oct 23 11:20, Mika Westerberg wrote:
>
> > You should either use proper _HID/_CID for the device or put "PRP0001"
> > to the _HID and let the match happen with DT .compatible strings. I've
> > attached a hack that I use locally.
>
> I have a similar hack over here. I have a question though:
>
> > The corresponding ASL fragment would look like:
> >
> >
> > Device (AT24)
> > {
> > Name (_HID, "PRP0001")
> >
> > Method (_CRS, 0, Serialized) {
> > Name (UBUF, ResourceTemplate () {
> > I2cSerialBus (0x50, ControllerInitiated, 0x00061A80,
> > AddressingMode7Bit, "\\_SB.I2C6",
> > 0x00, ResourceConsumer)
> > })
> > Return (UBUF)
> > }
> >
> > Name (_DSD, Package () {
> > ToUUID("daffd814-6eba-4d8c-8a91-bc9bbf4aa301"),
> > Package () {
> > Package () {"compatible", "atmel,24c02"},
>
> The "c02" in 24c02 also indicates the size. I've always found it a
> little awkward when you could have a compatible string that disagrees
> with firmware properties. Should we do something about that?
>
> For example, is the more generic string, "atmel,at24" better? I'm not
> sure I like that approach in general, but it works well for the at24
> devices. at25 does it the same way.
I think DT version actually identifies this if the device node is called
"at24". I'm not sure if we can do that with ACPI though.
I agree that we could use "atmel,at24" here but that requires
corresponding binding to be added to
Documentation/devicetree/bindings/i2c/trivial-devices.txt and review
from DT folks. Definitely worth doing.
Alternatively we may use the same _HID "INT3499" as Andy is doing in his
series with the below properties.
> > Package () {"size", 256},
> > Package () {"pagesize", 32},
> > Package () {"abs-value", 1},
> > },
> > })
> >
> > Method (_STA, 0, NotSerialized)
> > {
> > Return (0xF)
> > }
> > }
>
> --Dustin
next prev parent reply other threads:[~2015-10-28 9:01 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
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 [this message]
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=20151028090140.GL1548@lahna.fi.intel.com \
--to=mika.westerberg@linux.intel.com \
--cc=dustin@cumulusnetworks.com \
--cc=gardner.ben@gmail.com \
--cc=linux-acpi@vger.kernel.org \
/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;
as well as URLs for NNTP newsgroup(s).