mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-12-28 11:18:45 +07:00
cd86d1403b
Before this commit the i2c-designware-platdrv assumes that if the pdev has an apci-companion it should use a dynamic adapter-nr and it sets adapter->nr to -1, otherwise it will use pdev->id as adapter->nr. There are 3 ways how platform_device-s to which i2c-designware-platdrv will bind can be instantiated: 1) Through of / devicetree 2) Through ACPI enumeration 3) Explicitly instantiated through platform_device_create + add 1) In case of devicetree-instantiation the drivers/of code always sets pdev->id to PLATFORM_DEVID_NONE, which is -1 so in this case both paths to set adapter->nr end up doing the same thing. 2) In case of ACPI instantiation the device will always have an ACPI-companion, so we are already using dynamic adapter-nrs. 3) There are 2 places manually instantiating a designware_i2c platform_dev: drivers/mfd/intel_quark_i2c_gpio.c drivers/mfd/intel-lpss.c In the intel_quark_i2c_gpio.c case pdev->id is always 0, so switching to dynamic adapter-nrs here could lead to the bus-number no longer being stable, but the quark X1000 only has 1 i2c-controller, which will also be assigned bus-number 0 when using dynamic adapter-nrs. In the intel-lpss.c case intel_lpss_probe() is called from either intel-lpss-acpi.c in which case there always is an ACPI-companion, or from intel-lpss-pci.c. In most cases devices handled by intel-lpss-pci.c also have an ACPI-companion, so we use a dynamic adapter-nr. But in some cases the ACPI-companion is missing and we would use pdev->id (allocated from intel_lpss_devid_ida). Devices which use the intel-lpss-pci.c code typically have many i2c busses, so using pdev->id in this case may lead to a bus-number conflict, triggering a WARN(id < 0, "couldn't get idr") in i2c-core-base.c causing an oops an the adapter registration to fail. So in this case using non dynamic adapter-nrs is actually undesirable. One machine on which this oops was triggering is the Apollo Lake based Acer TravelMate Spin B118. TL;DR: Switching to always using dynamic adapter-numbers does not make any difference in most cases and in the one case where it does make a difference the behavior change is desirable because the old behavior caused an oops. BugLink: https://bugzilla.redhat.com/show_bug.cgi?id=1687065 Signed-off-by: Hans de Goede <hdegoede@redhat.com> Acked-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Acked-by: Jarkko Nikula <jarkko.nikula@linux.intel.com> Signed-off-by: Wolfram Sang <wsa@the-dreams.de> |
||
---|---|---|
.. | ||
i2c-acorn.c | ||
i2c-ali15x3.c | ||
i2c-ali1535.c | ||
i2c-ali1563.c | ||
i2c-altera.c | ||
i2c-amd756-s4882.c | ||
i2c-amd756.c | ||
i2c-amd8111.c | ||
i2c-aspeed.c | ||
i2c-at91.c | ||
i2c-au1550.c | ||
i2c-axxia.c | ||
i2c-bcm2835.c | ||
i2c-bcm-iproc.c | ||
i2c-bcm-kona.c | ||
i2c-brcmstb.c | ||
i2c-cadence.c | ||
i2c-cbus-gpio.c | ||
i2c-cht-wc.c | ||
i2c-cpm.c | ||
i2c-cros-ec-tunnel.c | ||
i2c-davinci.c | ||
i2c-designware-baytrail.c | ||
i2c-designware-common.c | ||
i2c-designware-core.h | ||
i2c-designware-master.c | ||
i2c-designware-pcidrv.c | ||
i2c-designware-platdrv.c | ||
i2c-designware-slave.c | ||
i2c-digicolor.c | ||
i2c-diolan-u2c.c | ||
i2c-dln2.c | ||
i2c-efm32.c | ||
i2c-eg20t.c | ||
i2c-elektor.c | ||
i2c-emev2.c | ||
i2c-exynos5.c | ||
i2c-fsi.c | ||
i2c-gpio.c | ||
i2c-highlander.c | ||
i2c-hix5hd2.c | ||
i2c-hydra.c | ||
i2c-i801.c | ||
i2c-ibm_iic.c | ||
i2c-ibm_iic.h | ||
i2c-img-scb.c | ||
i2c-imx-lpi2c.c | ||
i2c-imx.c | ||
i2c-iop3xx.c | ||
i2c-iop3xx.h | ||
i2c-isch.c | ||
i2c-ismt.c | ||
i2c-jz4780.c | ||
i2c-kempld.c | ||
i2c-lpc2k.c | ||
i2c-meson.c | ||
i2c-mlxcpld.c | ||
i2c-mpc.c | ||
i2c-mt65xx.c | ||
i2c-mv64xxx.c | ||
i2c-mxs.c | ||
i2c-nforce2-s4985.c | ||
i2c-nforce2.c | ||
i2c-nomadik.c | ||
i2c-nvidia-gpu.c | ||
i2c-ocores.c | ||
i2c-octeon-core.c | ||
i2c-octeon-core.h | ||
i2c-octeon-platdrv.c | ||
i2c-omap.c | ||
i2c-opal.c | ||
i2c-owl.c | ||
i2c-parport-light.c | ||
i2c-parport.c | ||
i2c-parport.h | ||
i2c-pasemi.c | ||
i2c-pca-isa.c | ||
i2c-pca-platform.c | ||
i2c-piix4.c | ||
i2c-pmcmsp.c | ||
i2c-pnx.c | ||
i2c-powermac.c | ||
i2c-puv3.c | ||
i2c-pxa-pci.c | ||
i2c-pxa.c | ||
i2c-qcom-geni.c | ||
i2c-qup.c | ||
i2c-rcar.c | ||
i2c-riic.c | ||
i2c-rk3x.c | ||
i2c-robotfuzz-osif.c | ||
i2c-s3c2410.c | ||
i2c-scmi.c | ||
i2c-sh7760.c | ||
i2c-sh_mobile.c | ||
i2c-sibyte.c | ||
i2c-simtec.c | ||
i2c-sirf.c | ||
i2c-sis96x.c | ||
i2c-sis630.c | ||
i2c-sis5595.c | ||
i2c-sprd.c | ||
i2c-st.c | ||
i2c-stm32.c | ||
i2c-stm32.h | ||
i2c-stm32f4.c | ||
i2c-stm32f7.c | ||
i2c-stu300.c | ||
i2c-sun6i-p2wi.c | ||
i2c-synquacer.c | ||
i2c-taos-evm.c | ||
i2c-tegra-bpmp.c | ||
i2c-tegra.c | ||
i2c-thunderx-pcidrv.c | ||
i2c-tiny-usb.c | ||
i2c-uniphier-f.c | ||
i2c-uniphier.c | ||
i2c-versatile.c | ||
i2c-via.c | ||
i2c-viapro.c | ||
i2c-viperboard.c | ||
i2c-wmt.c | ||
i2c-xgene-slimpro.c | ||
i2c-xiic.c | ||
i2c-xlp9xx.c | ||
i2c-xlr.c | ||
i2c-zx2967.c | ||
Kconfig | ||
Makefile | ||
scx200_acb.c |