public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] typec: tcpm: Provide of_node pointer as part of psy_cfg
@ 2018-05-16 16:00 Adam Thomson
  2018-05-21 13:20 ` Heikki Krogerus
  0 siblings, 1 reply; 6+ messages in thread
From: Adam Thomson @ 2018-05-16 16:00 UTC (permalink / raw)
  To: Heikki Krogerus, Guenter Roeck, Greg Kroah-Hartman
  Cc: linux-usb, linux-kernel, support.opensource

For supply registration, provide of_node pointer of the port device,
via the power_supply_config structure, to allow other psy drivers
to add us as a supplier using the 'power-supplies' DT property.

Signed-off-by: Adam Thomson <Adam.Thomson.Opensource@diasemi.com>
---
 drivers/usb/typec/tcpm.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/usb/typec/tcpm.c b/drivers/usb/typec/tcpm.c
index 72996cc..e7c0b95 100644
--- a/drivers/usb/typec/tcpm.c
+++ b/drivers/usb/typec/tcpm.c
@@ -4500,6 +4500,7 @@ static int devm_tcpm_psy_register(struct tcpm_port *port)
 	char *psy_name;
 
 	psy_cfg.drv_data = port;
+	psy_cfg.of_node = port->dev->of_node;
 	psy_name = devm_kzalloc(port->dev, psy_name_len, GFP_KERNEL);
 	if (!psy_name)
 		return -ENOMEM;
-- 
1.9.1


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

end of thread, other threads:[~2018-05-22  9:47 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-05-16 16:00 [PATCH] typec: tcpm: Provide of_node pointer as part of psy_cfg Adam Thomson
2018-05-21 13:20 ` Heikki Krogerus
2018-05-21 13:58   ` Adam Thomson
2018-05-21 14:55     ` Heikki Krogerus
2018-05-21 15:34       ` Adam Thomson
2018-05-22  9:47         ` Heikki Krogerus

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox