OSDN Git Service

i2c: of: Try to find an I2C adapter matching the parent
authorThierry Reding <treding@nvidia.com>
Fri, 25 Jan 2019 13:11:42 +0000 (14:11 +0100)
committerWolfram Sang <wsa@the-dreams.de>
Tue, 5 Feb 2019 12:41:49 +0000 (13:41 +0100)
commite814e688413aabd7b0d75e2a8ed1caa472951dec
tree27881b5d13a6cc5070c6aa6efd7aa5b712a5f3d6
parent44783efdfed190088066d4c3470766c28da38a21
i2c: of: Try to find an I2C adapter matching the parent

If an I2C adapter doesn't match the provided device tree node, also try
matching the parent's device tree node. This allows finding an adapter
based on the device node of the parent device that was used to register
it.

This fixes a regression on Tegra124-based Chromebooks (Nyan) where the
eDP controller registers an I2C adapter that is used to read to EDID.
After commit 993a815dcbb2 ("dt-bindings: panel: Add missing .txt
suffix") this stopped working because the I2C adapter could no longer
be found. The approach in this patch fixes the regression without
introducing the issues that the above commit solved.

Fixes: 17ab7806de0c ("drm: don't link DP aux i2c adapter to the hardware device node")
Signed-off-by: Thierry Reding <treding@nvidia.com>
Tested-by: Tristan Bastian <tristan-c.bastian@gmx.de>
Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
drivers/i2c/i2c-core-of.c