Skip to content

Commit

Permalink
i2c: of: Populate fwnode in of_i2c_get_board_info()
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Saravana Kannan authored and Greg Kroah-Hartman committed Nov 20, 2019
1 parent abf5c67 commit 60774d2
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions drivers/i2c/i2c-core-of.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 60774d2

Please sign in to comment.