linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] spmi: of: Populate fwnode in of_spmi_register_devices
@ 2021-06-17  7:41 Hsin-Hsiung Wang
  0 siblings, 0 replies; only message in thread
From: Hsin-Hsiung Wang @ 2021-06-17  7:41 UTC (permalink / raw)
  To: Stephen Boyd, Matthias Brugger
  Cc: linux-kernel, linux-arm-kernel, linux-mediatek, srv_heupstream,
	Project_Global_Chrome_Upstream_Group, Hsin-Hsiung Wang

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(+)

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);
-- 
2.18.0


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2021-06-17  7:42 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-06-17  7:41 [PATCH] spmi: of: Populate fwnode in of_spmi_register_devices Hsin-Hsiung Wang

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).