From: Lukas Wunner <lukas@wunner.de>
To: "Rafael J. Wysocki" <rafael.j.wysocki@intel.com>
Cc: Ronald Tschalaer <ronald@innovation.ch>,
Federico Lorenzi <florenzi@gmail.com>,
Mika Westerberg <mika.westerberg@linux.intel.com>,
Andy Shevchenko <andriy.shevchenko@linux.intel.com>,
Lv Zheng <lv.zheng@intel.com>, Leif Liddy <leif.liddy@gmail.com>,
Daniel Roschka <danielroschka@phoenitydawn.de>,
Mark Brown <broonie@kernel.org>,
linux-acpi@vger.kernel.org, linux-spi@vger.kernel.org
Subject: [PATCH v3 0/6] Apple SPI properties
Date: Fri, 14 Jul 2017 00:36:19 +0200 [thread overview]
Message-ID: <cover.1499983092.git.lukas@wunner.de> (raw)
Retrieve device properties on Macs with an Apple-specific _DSM and
use them in lieu of _CRS data upon SPI slave initialization, v3.
Please refer to the cover letters of v1 and v2 for further details:
http://www.spinics.net/lists/linux-acpi/msg75537.html
http://www.spinics.net/lists/linux-acpi/msg75735.html
Special thanks to Ronald Tschalär for patient testing/debugging
and Andy Shevchenko for equally patient reviewing on GitHub.
Changes v2 -> v3:
Patch 1 + 2:
- Newly inserted patches in v3 to avoid repeated DMI checks for Apple
hardware: The result of the first DMI check in osi.c is cached.
Two other existing DMI checks are converted to use the result.
Because one of them is in a module (sbs.ko), the bool is_apple_system
needs to be exported. On non-x86, the DMI checks and Apple-specific
code are omitted altogether. (Andy, Rafael)
Patch 4:
- Use bitmap to keep track of valid properties. Move to x86/apple.c
to avoid cluttering up generic ACPI code. (Andy, Rafael)
Patch 5:
- Use fwnode_property_present() instead of device_property_present(),
the latter doesn't work as the fwnode pointer of the struct device
embedded in a struct acpi_device is always NULL. (Ronald)
Patch 6:
- Check buffer length for extra safety. Rename "o" to "obj",
use 32 bit division to calculate max_speed_hz. (Andy)
Thanks,
Lukas
Lukas Wunner (6):
ACPI / osi: Exclude x86 DMI quirks on other arches
ACPI / x86: Consolidate Apple DMI checks
ACPI / property: Don't evaluate objects for devices w/o handle
ACPI / property: Support Apple _DSM properties
ACPI / scan: Recognize Apple SPI and I2C slaves
spi: Use Apple device properties in absence of ACPI resources
drivers/acpi/Makefile | 1 +
drivers/acpi/internal.h | 6 +++
drivers/acpi/osi.c | 8 +++
drivers/acpi/pci_root.c | 3 +-
drivers/acpi/property.c | 6 +++
drivers/acpi/sbs.c | 24 +--------
drivers/acpi/scan.c | 6 +++
drivers/acpi/x86/apple.c | 137 +++++++++++++++++++++++++++++++++++++++++++++++
drivers/spi/spi.c | 31 +++++++++++
include/linux/acpi.h | 6 +++
10 files changed, 203 insertions(+), 25 deletions(-)
create mode 100644 drivers/acpi/x86/apple.c
--
2.11.0
next reply other threads:[~2017-07-13 22:36 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-07-13 22:36 Lukas Wunner [this message]
2017-07-13 22:36 ` [PATCH v3 6/6] spi: Use Apple device properties in absence of ACPI resources Lukas Wunner
[not found] ` <c137d15be96c954f405bda5acaaf730cccc8e601.1499983092.git.lukas-JFq808J9C/izQB+pC5nmwQ@public.gmane.org>
2017-07-16 17:57 ` Andy Shevchenko
2017-07-13 22:36 ` [PATCH v3 4/6] ACPI / property: Support Apple _DSM properties Lukas Wunner
2017-07-16 17:55 ` Andy Shevchenko
2017-07-13 22:36 ` [PATCH v3 1/6] ACPI / osi: Exclude x86 DMI quirks on other arches Lukas Wunner
[not found] ` <cover.1499983092.git.lukas-JFq808J9C/izQB+pC5nmwQ@public.gmane.org>
2017-07-13 22:36 ` [PATCH v3 2/6] ACPI / x86: Consolidate Apple DMI checks Lukas Wunner
2017-07-14 22:03 ` Rafael J. Wysocki
2017-07-20 14:03 ` Lukas Wunner
2017-07-20 14:27 ` Rafael J. Wysocki
2017-07-20 14:33 ` Andy Shevchenko
2017-07-20 14:49 ` Rafael J. Wysocki
2017-07-20 20:26 ` Darren Hart
2017-07-20 14:30 ` Andy Shevchenko
2017-07-13 22:36 ` [PATCH v3 3/6] ACPI / property: Don't evaluate objects for devices w/o handle Lukas Wunner
2017-07-14 22:04 ` Rafael J. Wysocki
2017-07-13 22:36 ` [PATCH v3 5/6] ACPI / scan: Recognize Apple SPI and I2C slaves Lukas Wunner
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=cover.1499983092.git.lukas@wunner.de \
--to=lukas@wunner.de \
--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=lv.zheng@intel.com \
--cc=mika.westerberg@linux.intel.com \
--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).