mirror of
https://github.com/torvalds/linux.git
synced 2024-12-14 23:25:54 +00:00
e6b142060b
Many DSDTs for Kaby Lake and Kaby Lake Refresh models contain a _SB.PCI0.GEXP ACPI Device node describing an I2C attached PCA953x GPIO expander. This seems to be something which is copy and pasted from the DSDT from some reference design since this ACPI Device is present even on models where no such GPIO expander is used at all, such as on the Microsoft Surface Go & Go 2. This ACPI Device is a problem because it contains a SystemMemory OperationRegion which covers the MMIO for the I2C4 I2C controller. This causes the MFD cell for the I2C4 controller to not be instantiated due to a resource conflict, requiring the use of acpi_enforce_resources=lax to work around this. I have done an extensive analysis of all the ACPI tables on the Microsoft Surface Go and the _SB.PCI0.GEXP ACPI Device's methods are not used by any code in the ACPI tables, neither are any of them directly called by any Linux kernel code. This is unsurprising since running i2cdetect on the I2C4 bus shows that there is no GPIO expander chip present on these devices at all. This commit adds a PCI subsystem vendor:device table listing PCI devices where it is known to be safe to ignore resource conflicts with ACPI declared SystemMemory regions. This makes the I2C4 bus work out of the box on the Microsoft Surface Go & Go 2, which is necessary for the cameras on these devices to work. Signed-off-by: Hans de Goede <hdegoede@redhat.com> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com> Acked-by: Mika Westerberg <mika.westerberg@linux.intel.com> Signed-off-by: Lee Jones <lee.jones@linaro.org> Link: https://lore.kernel.org/r/20211203115108.89661-1-hdegoede@redhat.com
62 lines
1.4 KiB
C
62 lines
1.4 KiB
C
/* SPDX-License-Identifier: GPL-2.0-only */
|
|
/*
|
|
* Intel LPSS core support.
|
|
*
|
|
* Copyright (C) 2015, Intel Corporation
|
|
*
|
|
* Authors: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
|
* Mika Westerberg <mika.westerberg@linux.intel.com>
|
|
*/
|
|
|
|
#ifndef __MFD_INTEL_LPSS_H
|
|
#define __MFD_INTEL_LPSS_H
|
|
|
|
#include <linux/pm.h>
|
|
|
|
struct device;
|
|
struct resource;
|
|
struct software_node;
|
|
|
|
struct intel_lpss_platform_info {
|
|
struct resource *mem;
|
|
bool ignore_resource_conflicts;
|
|
int irq;
|
|
unsigned long clk_rate;
|
|
const char *clk_con_id;
|
|
const struct software_node *swnode;
|
|
};
|
|
|
|
int intel_lpss_probe(struct device *dev,
|
|
const struct intel_lpss_platform_info *info);
|
|
void intel_lpss_remove(struct device *dev);
|
|
|
|
#ifdef CONFIG_PM
|
|
int intel_lpss_prepare(struct device *dev);
|
|
int intel_lpss_suspend(struct device *dev);
|
|
int intel_lpss_resume(struct device *dev);
|
|
|
|
#ifdef CONFIG_PM_SLEEP
|
|
#define INTEL_LPSS_SLEEP_PM_OPS \
|
|
.prepare = intel_lpss_prepare, \
|
|
SET_LATE_SYSTEM_SLEEP_PM_OPS(intel_lpss_suspend, intel_lpss_resume)
|
|
#else
|
|
#define INTEL_LPSS_SLEEP_PM_OPS
|
|
#endif
|
|
|
|
#define INTEL_LPSS_RUNTIME_PM_OPS \
|
|
.runtime_suspend = intel_lpss_suspend, \
|
|
.runtime_resume = intel_lpss_resume,
|
|
|
|
#else /* !CONFIG_PM */
|
|
#define INTEL_LPSS_SLEEP_PM_OPS
|
|
#define INTEL_LPSS_RUNTIME_PM_OPS
|
|
#endif /* CONFIG_PM */
|
|
|
|
#define INTEL_LPSS_PM_OPS(name) \
|
|
const struct dev_pm_ops name = { \
|
|
INTEL_LPSS_SLEEP_PM_OPS \
|
|
INTEL_LPSS_RUNTIME_PM_OPS \
|
|
}
|
|
|
|
#endif /* __MFD_INTEL_LPSS_H */
|