On Tue, Jun 11, 2019 at 1:33 PM Jarkko Nikula <jarkko.nikula@xxxxxxxxxxxxxxx> wrote: > > Postpone "pinctrl-merrifield" platform device creation later than > subsys_initcall. This is preparation for an another patch that does ACPI > namespace walk which is not possible yet at subsys_initcall phase. > > Currently if kernel is built with ACPI support and platform has the ACPI > device "INTC1002" with the same MMIO resources than "pinctrl-merrifield" > platform device then these devices conflict and typically probing of > "INTC1002" will fail in drivers/pinctrl/intel/pinctrl-merrifield.c due > conflicting resources: > > [ 0.873523] pinctrl-merrifield INTC1002:00: can't request region for resource [mem 0xff0c0000-0xff0c7fff] > [ 0.879464] pinctrl-merrifield: probe of INTC1002:00 failed with error -16 > > Moreover also dependent drivers/gpio/gpio-merrifield.c will fail to > probe due it tries to bind with pinctrl device named after "INTC1002" > rather than "pinctrl-merrifield" when "INTC1002" is present in ACPI tables: > > [ 5.825231] gpio gpiochip0: (0000:00:0c.0): could not create pin range > [ 5.825710] gpio-merrifield 0000:00:0c.0: failed to add GPIO pin range > > Signed-off-by: Jarkko Nikula <jarkko.nikula@xxxxxxxxxxxxxxx> > --- > Andy: I'm not sure is this with the next patch the right fix or would it be > possible to just delete this "pinctrl-merrifield" initialization filei? I > went to this path since I don't know are there platforms without > "INTC1002" in their ACPI tables or do some users want to run non-ACPI > kernels. I have locally one hack with another approach, i.e. check for SFI availability like the rest of the files in this folder works, with few exceptions as this one. So, something like if (sfi_disabled) return -EINVAL. If you have time, you can split and submit the https://github.com/andy-shev/linux/commit/7a0cb10387a437f5811435b9c790043c64816d08 -- With Best Regards, Andy Shevchenko