From: Wolfram Sang <wsa@the-dreams.de>
To: Hans de Goede <hdegoede@redhat.com>
Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com>,
Darren Hart <dvhart@infradead.org>,
Mika Westerberg <mika.westerberg@linux.intel.com>,
Takashi Iwai <tiwai@suse.de>,
linux-i2c@vger.kernel.org, platform-driver-x86@vger.kernel.org
Subject: Re: [PATCH v5 2/4] i2c: core: Add new i2c_acpi_new_device helper function
Date: Sun, 16 Apr 2017 22:08:24 +0200 [thread overview]
Message-ID: <20170416200824.qbpcqsqplnzixa3z@ninjato> (raw)
In-Reply-To: <20170404220335.9815-3-hdegoede@redhat.com>
[-- Attachment #1: Type: text/plain, Size: 2623 bytes --]
On Wed, Apr 05, 2017 at 12:03:33AM +0200, Hans de Goede wrote:
> By default the i2c subsys creates an i2c-client for the first I2cSerialBus
> resource of an acpi_device, but some acpi_devices have multiple
> I2cSerialBus resources and we may want to instantiate i2c-clients for
> the others.
>
> This commit adds a new i2c_acpi_new_device function which can be used to
> create an i2c-client for any I2cSerialBus resource of an acpi_device.
>
> Note that the other resources may even be on a different i2c bus, so just
> retrieving the client address is not enough.
>
> Here is an example DSDT excerpt from such a device:
>
> Device (WIDR)
> {
> Name (_HID, "INT33FE" /* XPOWER Battery Device */)
> Name (_CID, "INT33FE" /* XPOWER Battery Device */)
> Name (_DDN, "WC PMIC Battery Device")
> <snip>
> Name (RBUF, ResourceTemplate ()
> {
> I2cSerialBusV2 (0x005E, ControllerInitiated, 0x000186A0,
> AddressingMode7Bit, "\\_SB.PCI0.I2C7",
> 0x00, ResourceConsumer, , Exclusive,
> )
> I2cSerialBusV2 (0x0036, ControllerInitiated, 0x000186A0,
> AddressingMode7Bit, "\\_SB.PCI0.I2C1",
> 0x00, ResourceConsumer, , Exclusive,
> )
> I2cSerialBusV2 (0x0022, ControllerInitiated, 0x00061A80,
> AddressingMode7Bit, "\\_SB.PCI0.I2C1",
> 0x00, ResourceConsumer, , Exclusive,
> )
> I2cSerialBusV2 (0x0054, ControllerInitiated, 0x00061A80,
> AddressingMode7Bit, "\\_SB.PCI0.I2C1",
> 0x00, ResourceConsumer, , Exclusive,
> )
> GpioInt (Level, ActiveLow, Exclusive, PullNone, 0x0000,
> "\\_SB.PCI0.I2C7.PMI5", 0x00, ResourceConsumer, ,
> )
> { // Pin list
> 0x0012
> }
> GpioInt (Edge, ActiveLow, ExclusiveAndWake, PullNone, 0x0000,
> "\\_SB.GPO1", 0x00, ResourceConsumer, ,
> )
> { // Pin list
> 0x0005
> }
> GpioInt (Level, ActiveLow, Exclusive, PullNone, 0x0000,
> "\\_SB.PCI0.I2C7.PMI5", 0x00, ResourceConsumer, ,
> )
> { // Pin list
> 0x0013
> }
> })
> Method (_CRS, 0, NotSerialized) // _CRS: Current Resource Settings
> {
> Return (RBUF) /* \_SB_.PCI0.I2C7.WIDR.RBUF */
> }
> <snip>
> }
>
> Signed-off-by: Hans de Goede <hdegoede@redhat.com>
> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Applied to for-next, thanks!
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
next prev parent reply other threads:[~2017-04-16 20:08 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-04-04 22:03 [PATCH v5 0/4] i2c-core improvements for acpi devices + ACPI INT33FE driver Hans de Goede
2017-04-04 22:03 ` [PATCH v5 1/4] i2c: core: Allow getting ACPI info by index Hans de Goede
2017-04-16 20:08 ` Wolfram Sang
2017-04-04 22:03 ` [PATCH v5 2/4] i2c: core: Add new i2c_acpi_new_device helper function Hans de Goede
2017-04-16 20:08 ` Wolfram Sang [this message]
2017-04-04 22:03 ` [PATCH v5 3/4] i2c: core: Allow drivers to disable i2c-core irq mapping Hans de Goede
2017-04-05 13:31 ` Andy Shevchenko
2017-04-16 20:08 ` Wolfram Sang
2017-04-04 22:03 ` [PATCH v5 4/4] platform/x86: Add Intel Cherry Trail ACPI INT33FE device driver Hans de Goede
2017-04-05 13:52 ` Andy Shevchenko
2017-04-05 15:41 ` Darren Hart
2017-04-16 20:08 ` Wolfram Sang
2017-04-17 22:40 ` Darren Hart
2017-04-13 19:09 ` [PATCH v5 0/4] i2c-core improvements for acpi devices + ACPI INT33FE driver Darren Hart
2017-04-14 12:34 ` Hans de Goede
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=20170416200824.qbpcqsqplnzixa3z@ninjato \
--to=wsa@the-dreams.de \
--cc=andriy.shevchenko@linux.intel.com \
--cc=dvhart@infradead.org \
--cc=hdegoede@redhat.com \
--cc=linux-i2c@vger.kernel.org \
--cc=mika.westerberg@linux.intel.com \
--cc=platform-driver-x86@vger.kernel.org \
--cc=tiwai@suse.de \
/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