spmi: of: Populate fwnode in of_spmi_register_devices
diff mbox series

Message ID 1623915693-18727-1-git-send-email-hsin-hsiung.wang@mediatek.com
State New, archived
Headers show
Series
  • spmi: of: Populate fwnode in of_spmi_register_devices
Related show

Commit Message

Hsin-Hsiung Wang June 17, 2021, 7:41 a.m. UTC
This patch allows the of_devlink feature to work across spmi devices. This
avoid unnecessary probe deferrals of spmi devices, defers consumers of spmi
devices till the spmi devices probe, and allows spmi drivers to implement
sync_state() callbacks.

Signed-off-by: Hsin-Hsiung Wang <hsin-hsiung.wang@mediatek.com>
---
 drivers/spmi/spmi.c | 1 +
 1 file changed, 1 insertion(+)

Patch
diff mbox series

diff --git a/drivers/spmi/spmi.c b/drivers/spmi/spmi.c
index 51f5aeb65b3b..0e679a483ce9 100644
--- a/drivers/spmi/spmi.c
+++ b/drivers/spmi/spmi.c
@@ -498,6 +498,7 @@  static void of_spmi_register_devices(struct spmi_controller *ctrl)
 			continue;
 
 		sdev->dev.of_node = node;
+		sdev->dev.fwnode = of_fwnode_handle(node);
 		sdev->usid = (u8)reg[0];
 
 		err = spmi_device_add(sdev);