[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20221121201337.2772216-3-pmalani@chromium.org>
Date: Mon, 21 Nov 2022 20:13:36 +0000
From: Prashant Malani <pmalani@...omium.org>
To: linux-kernel@...r.kernel.org, linux-usb@...r.kernel.org,
chrome-platform@...ts.linux.dev
Cc: Prashant Malani <pmalani@...omium.org>,
Benson Leung <bleung@...omium.org>,
Heikki Krogerus <heikki.krogerus@...ux.intel.com>,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
Guenter Roeck <groeck@...omium.org>
Subject: [PATCH 2/2] platform/chrome: cros_ec_typec: Set parent of partner PD object
In order to tell what Type-C device a PD object belongs to, its parent
needs to be set. Set the parent appropriately for PD objects which are
created for connected Type-C partners.
Cc: Benson Leung <bleung@...omium.org>
Cc: Heikki Krogerus <heikki.krogerus@...ux.intel.com>
Signed-off-by: Prashant Malani <pmalani@...omium.org>
---
drivers/platform/chrome/cros_ec_typec.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/platform/chrome/cros_ec_typec.c b/drivers/platform/chrome/cros_ec_typec.c
index 2a7ff14dc37e..a1cc23b86f3c 100644
--- a/drivers/platform/chrome/cros_ec_typec.c
+++ b/drivers/platform/chrome/cros_ec_typec.c
@@ -968,7 +968,7 @@ static void cros_typec_register_partner_pdos(struct cros_typec_data *typec,
if (!resp->source_cap_count && !resp->sink_cap_count)
return;
- port->partner_pd = usb_power_delivery_register(NULL, &desc);
+ port->partner_pd = usb_power_delivery_register(typec_partner_to_dev(port->partner), &desc);
if (IS_ERR(port->partner_pd)) {
dev_warn(typec->dev, "Failed to register partner PD device, port: %d\n", port_num);
return;
--
2.38.1.584.g0f3c55d4c2-goog
Powered by blists - more mailing lists