diff mbox series

[2/2] x86/platform/intel-mid: Do not create conflicting platform device

Message ID 20190611103330.21306-2-jarkko.nikula@linux.intel.com (mailing list archive)
State Deferred, archived
Headers show
Series [1/2] x86/platform/intel-mid: Create pinctrl platform device at later initcall | expand

Commit Message

Jarkko Nikula June 11, 2019, 10:33 a.m. UTC
Do not create "pinctrl-merrifield" platform device on platforms having
ACPI device "INTC1002". That device represents the same device leading
to failures in drivers/pinctrl/intel/pinctrl-merrifield.c and
drivers/gpio/gpio-merrifield.c if "pinctrl-merrifield" is probed first.

Fix this by not creating the "pinctrl-merrifield" in case ACPI device
"INTC1002" is present.

Signed-off-by: Jarkko Nikula <jarkko.nikula@linux.intel.com>
---
 .../platform/intel-mid/device_libs/platform_mrfld_pinctrl.c   | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/arch/x86/platform/intel-mid/device_libs/platform_mrfld_pinctrl.c b/arch/x86/platform/intel-mid/device_libs/platform_mrfld_pinctrl.c
index 43f801b66c1a..5e87f7f90f29 100644
--- a/arch/x86/platform/intel-mid/device_libs/platform_mrfld_pinctrl.c
+++ b/arch/x86/platform/intel-mid/device_libs/platform_mrfld_pinctrl.c
@@ -11,6 +11,7 @@ 
  * of the License.
  */
 
+#include <linux/acpi.h>
 #include <linux/init.h>
 #include <linux/ioport.h>
 #include <linux/platform_device.h>
@@ -35,7 +36,8 @@  static struct platform_device mrfld_pinctrl_device = {
 
 static int __init mrfld_pinctrl_init(void)
 {
-	if (intel_mid_identify_cpu() == INTEL_MID_CPU_CHIP_TANGIER)
+	if (intel_mid_identify_cpu() == INTEL_MID_CPU_CHIP_TANGIER &&
+	    !acpi_dev_found("INTC1002"))
 		return platform_device_register(&mrfld_pinctrl_device);
 
 	return -ENODEV;