linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] soc: ti: ti_sci_pm_domains: Store device id in platform device
@ 2019-09-23  3:34 Lokesh Vutla
  2019-09-23  6:37 ` Tero Kristo
  0 siblings, 1 reply; 5+ messages in thread
From: Lokesh Vutla @ 2019-09-23  3:34 UTC (permalink / raw)
  To: Nishanth Menon, Tero Kristo, Santosh Shilimkar
  Cc: Lokesh Vutla, Sekhar Nori, Linux ARM Mailing List

Device ID that is passed from power-domains is used by peripheral
drivers for communicating with sysfw. Instead of individual drivers
traversing power-domains entry in DT node, store the device ID in
platform_device so that drivers can directly access it.

Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
---
 drivers/soc/ti/ti_sci_pm_domains.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/soc/ti/ti_sci_pm_domains.c b/drivers/soc/ti/ti_sci_pm_domains.c
index 8c2a2f23982c..a124ac409124 100644
--- a/drivers/soc/ti/ti_sci_pm_domains.c
+++ b/drivers/soc/ti/ti_sci_pm_domains.c
@@ -116,6 +116,7 @@ static int ti_sci_pd_attach_dev(struct generic_pm_domain *domain,
 	struct of_phandle_args pd_args;
 	struct ti_sci_pm_domain *ti_sci_genpd = genpd_to_ti_sci_pd(domain);
 	const struct ti_sci_handle *ti_sci = ti_sci_genpd->ti_sci;
+	struct platform_device *pdev = to_platform_device(dev);
 	struct ti_sci_genpd_dev_data *sci_dev_data;
 	struct generic_pm_domain_data *genpd_data;
 	int idx, ret = 0;
@@ -129,6 +130,7 @@ static int ti_sci_pd_attach_dev(struct generic_pm_domain *domain,
 		return -EINVAL;
 
 	idx = pd_args.args[0];
+	pdev->id = idx;
 
 	/*
 	 * Check the validity of the requested idx, if the index is not valid
-- 
2.22.0


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2019-09-26  6:21 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-09-23  3:34 [PATCH] soc: ti: ti_sci_pm_domains: Store device id in platform device Lokesh Vutla
2019-09-23  6:37 ` Tero Kristo
2019-09-24  4:45   ` Lokesh Vutla
2019-09-26  3:33     ` Lokesh Vutla
2019-09-26  6:20       ` Tero Kristo

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).