From: Mika Westerberg <mika.westerberg@linux.intel.com>
To: Lukas Wunner <lukas@wunner.de>
Cc: "Rafael J. Wysocki" <rafael.j.wysocki@intel.com>,
Mark Brown <broonie@kernel.org>,
Ronald Tschalaer <ronald@innovation.ch>,
Federico Lorenzi <florenzi@gmail.com>,
Andy Shevchenko <andriy.shevchenko@linux.intel.com>,
Leif Liddy <leif.liddy@gmail.com>,
Daniel Roschka <danielroschka@phoenitydawn.de>,
linux-acpi@vger.kernel.org, linux-spi@vger.kernel.org
Subject: Re: [PATCH v2 3/4] ACPI / scan: Recognize Apple SPI and I2C slaves
Date: Thu, 29 Jun 2017 10:34:20 +0300 [thread overview]
Message-ID: <20170629073420.GZ629@lahna.fi.intel.com> (raw)
In-Reply-To: <9f06a7ce1cc6dd4cb33004c7d37adc1a5c0f80e2.1498636759.git.lukas@wunner.de>
On Wed, Jun 28, 2017 at 07:20:19PM +0200, Lukas Wunner wrote:
> SPI and I2C slaves are enumerated by their respective parents rather
> than the ACPI core. They are recognized by presence of _CRS resources,
> which however are missing on Macs. Check for presence of device
> properties instead.
>
> Cc: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
> Cc: Mika Westerberg <mika.westerberg@linux.intel.com>
> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
> Cc: Federico Lorenzi <florenzi@gmail.com>
> Reported-and-tested-by: Ronald Tschalär <ronald@innovation.ch>
> Signed-off-by: Lukas Wunner <lukas@wunner.de>
> ---
> Changes v1 -> v2:
> - Newly inserted patch in v2 to fix an enumeration issue. (Ronald)
>
> drivers/acpi/scan.c | 6 ++++++
> 1 file changed, 6 insertions(+)
>
> diff --git a/drivers/acpi/scan.c b/drivers/acpi/scan.c
> index d4ff2cd1f738..c565e74bd2dd 100644
> --- a/drivers/acpi/scan.c
> +++ b/drivers/acpi/scan.c
> @@ -1444,6 +1444,12 @@ static bool acpi_is_spi_i2c_slave(struct acpi_device *device)
> struct list_head resource_list;
> bool is_spi_i2c_slave = false;
>
> + /* Macs use device properties in lieu of _CRS resources */
> + if (IS_ENABLED(CONFIG_X86) && dmi_match(DMI_SYS_VENDOR, "Apple Inc.") &&
Do we really need these checks?
> + (device_property_present(&device->dev, "spiSclkPeriod") ||
> + device_property_present(&device->dev, "i2cAddress")))
> + return true;
> +
> INIT_LIST_HEAD(&resource_list);
> acpi_dev_get_resources(device, &resource_list, acpi_check_spi_i2c_slave,
> &is_spi_i2c_slave);
> --
> 2.11.0
next prev parent reply other threads:[~2017-06-29 7:34 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-06-28 17:20 [PATCH v2 0/4] Apple SPI properties Lukas Wunner
2017-06-28 17:20 ` [PATCH v2 2/4] ACPI / property: Support Apple _DSM properties Lukas Wunner
2017-06-28 18:53 ` Andy Shevchenko
2017-07-02 11:07 ` Lukas Wunner
[not found] ` <20170702110719.GA825-JFq808J9C/izQB+pC5nmwQ@public.gmane.org>
2017-07-03 22:47 ` Rafael J. Wysocki
2017-06-29 7:45 ` Mika Westerberg
[not found] ` <cover.1498636759.git.lukas-JFq808J9C/izQB+pC5nmwQ@public.gmane.org>
2017-06-28 17:20 ` [PATCH v2 3/4] ACPI / scan: Recognize Apple SPI and I2C slaves Lukas Wunner
2017-06-29 7:34 ` Mika Westerberg [this message]
2017-06-29 8:46 ` Lukas Wunner
[not found] ` <20170629084604.swuzzxsdiiosqurz-JFq808J9C/izQB+pC5nmwQ@public.gmane.org>
2017-06-29 9:22 ` Mika Westerberg
2017-06-28 17:20 ` [PATCH v2 1/4] ACPI / property: Don't evaluate objects for devices w/o handle Lukas Wunner
2017-06-29 7:30 ` Mika Westerberg
2017-06-28 17:20 ` [PATCH v2 4/4] spi: Use Apple device properties in absence of ACPI resources Lukas Wunner
2017-06-28 18:27 ` Mark Brown
[not found] ` <bca7fb9e406bbfa9ee7e8457cacd34418ef689be.1498636759.git.lukas-JFq808J9C/izQB+pC5nmwQ@public.gmane.org>
2017-06-28 19:14 ` Andy Shevchenko
2017-06-29 7:54 ` 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=20170629073420.GZ629@lahna.fi.intel.com \
--to=mika.westerberg@linux.intel.com \
--cc=andriy.shevchenko@linux.intel.com \
--cc=broonie@kernel.org \
--cc=danielroschka@phoenitydawn.de \
--cc=florenzi@gmail.com \
--cc=leif.liddy@gmail.com \
--cc=linux-acpi@vger.kernel.org \
--cc=linux-spi@vger.kernel.org \
--cc=lukas@wunner.de \
--cc=rafael.j.wysocki@intel.com \
--cc=ronald@innovation.ch \
/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).