aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/i2c/i2c-core-of.c
diff options
context:
space:
mode:
authorSaravana Kannan <saravanak@google.com>2019-11-14 20:50:48 -0800
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2019-11-20 16:36:37 +0100
commit60774d2af07a465dc916321e7428a4c5b7867ed4 (patch)
tree44c43068194b9ed8dd656253bce84e146f4b2c5e /drivers/i2c/i2c-core-of.c
parentdrivers: base: Fix Kconfig indentation (diff)
downloadlinux-dev-60774d2af07a465dc916321e7428a4c5b7867ed4.tar.xz
linux-dev-60774d2af07a465dc916321e7428a4c5b7867ed4.zip
i2c: of: Populate fwnode in of_i2c_get_board_info()
This allows the of_devlink feature to work across i2c devices too. This avoid unnecessary probe deferrals of i2c devices, defers consumers of i2c devices till the i2c devices probe, and allows i2c drivers to implement sync_state() callbacks. Signed-off-by: Saravana Kannan <saravanak@google.com> Acked-by: Wolfram Sang <wsa@the-dreams.de> Link: https://lore.kernel.org/r/20191115045049.261104-1-saravanak@google.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/i2c/i2c-core-of.c')
-rw-r--r--drivers/i2c/i2c-core-of.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/i2c/i2c-core-of.c b/drivers/i2c/i2c-core-of.c
index 6f632d543fcc..4e913c890a7b 100644
--- a/drivers/i2c/i2c-core-of.c
+++ b/drivers/i2c/i2c-core-of.c
@@ -50,6 +50,7 @@ int of_i2c_get_board_info(struct device *dev, struct device_node *node,
info->addr = addr;
info->of_node = node;
+ info->fwnode = of_fwnode_handle(node);
if (of_property_read_bool(node, "host-notify"))
info->flags |= I2C_CLIENT_HOST_NOTIFY;