summaryrefslogtreecommitdiff
path: root/drivers/acpi
diff options
context:
space:
mode:
authorLukas Wunner <lukas@wunner.de>2017-08-01 15:10:41 +0300
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>2017-08-04 00:26:23 +0300
commit8a2e487e6fc1dddd406175c1f99a733f4a1206e2 (patch)
tree5136589a7dc63e8b43b306cf1233b8468868a37c /drivers/acpi
parentca9ef3ab68d3530ac93d4254f9e47724ea51758d (diff)
downloadlinux-8a2e487e6fc1dddd406175c1f99a733f4a1206e2.tar.xz
spi: Use Apple device properties in absence of ACPI resources
MacBooks and MacBook Pros introduced since 2015 return empty _CRS data for SPI slaves, causing device initialization to fail. Most of the information that would normally be conveyed via _CRS is available through ACPI device properties instead, so take advantage of them. The meaning and appropriate usage of the device properties was reverse engineered by Ronald Tschalär and carried over from these commits authored by him: https://github.com/cb22/macbook12-spi-driver/commit/9a416d699ef4 https://github.com/cb22/macbook12-spi-driver/commit/0c34936ed9a1 According to Ronald, the device properties have the following meaning: spiSclkPeriod /* period in ns */ spiWordSize /* in number of bits */ spiBitOrder /* 1 = MSB_FIRST, 0 = LSB_FIRST */ spiSPO /* clock polarity: 0 = low, 1 = high */ spiSPH /* clock phase: 0 = first, 1 = second */ spiCSDelay /* delay between cs and receive on reads in 10 us */ resetA2RUsec /* active-to-receive delay? */ resetRecUsec /* receive delay? */ Reported-by: Leif Liddy <leif.liddy@gmail.com> Tested-by: Ronald Tschalär <ronald@innovation.ch> Acked-by: Mark Brown <broonie@kernel.org> Acked-by: Mika Westerberg <mika.westerberg@linux.intel.com> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Signed-off-by: Lukas Wunner <lukas@wunner.de> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Diffstat (limited to 'drivers/acpi')
0 files changed, 0 insertions, 0 deletions