All of lore.kernel.org
 help / color / mirror / Atom feed
From: Prashant Malani <pmalani@chromium.org>
To: linux-kernel@vger.kernel.org, chrome-platform@lists.linux.dev
Cc: bleung@chromium.org, Prashant Malani <pmalani@chromium.org>,
	Enric Balletbo i Serra <enric.balletbo@collabora.com>,
	Guenter Roeck <groeck@chromium.org>,
	Heikki Krogerus <heikki.krogerus@linux.intel.com>
Subject: [PATCH 4/4] platform/chrome: cros_ec_typec: Use Type-C driver data
Date: Fri, 19 Aug 2022 19:08:05 +0000	[thread overview]
Message-ID: <20220819190807.1275937-5-pmalani@chromium.org> (raw)
In-Reply-To: <20220819190807.1275937-1-pmalani@chromium.org>

Altmode driver callbacks need EC-specific port information to
communicate with the ChromeOS EC. To accomplish this, save a
pointer to the driver-specific port struct in the Type-C port's
driver data field.

Signed-off-by: Prashant Malani <pmalani@chromium.org>
---
 drivers/platform/chrome/cros_ec_typec.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/platform/chrome/cros_ec_typec.c b/drivers/platform/chrome/cros_ec_typec.c
index 7daf4207c11e..e3f75440030d 100644
--- a/drivers/platform/chrome/cros_ec_typec.c
+++ b/drivers/platform/chrome/cros_ec_typec.c
@@ -379,6 +379,7 @@ static int cros_typec_init_ports(struct cros_typec_data *typec)
 		ret = cros_typec_parse_port_props(cap, fwnode, dev);
 		if (ret < 0)
 			goto unregister_ports;
+		cap->driver_data = cros_port;
 
 		cros_port->port = typec_register_port(dev, cap);
 		if (IS_ERR(cros_port->port)) {
-- 
2.37.1.595.g718a3a8f04-goog


  parent reply	other threads:[~2022-08-19 19:08 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-08-19 19:08 [PATCH 0/4] platform/chrome: cros_ec_typec: Altmode fixes Prashant Malani
2022-08-19 19:08 ` [PATCH 1/4] platform/chrome: cros_ec_typec: Add bit offset for DP VDO Prashant Malani
2022-08-23  4:43   ` Tzung-Bi Shih
2022-08-23  8:11   ` Heikki Krogerus
2022-08-19 19:08 ` [PATCH 2/4] platform/chrome: cros_ec_typec: Correct alt mode index Prashant Malani
2022-08-23  4:43   ` Tzung-Bi Shih
2022-08-23  8:14   ` Heikki Krogerus
2022-08-23 17:14     ` Prashant Malani
2022-08-19 19:08 ` [PATCH 3/4] platform/chrome: cros_ec_typec: Stash port driver info Prashant Malani
2022-08-23  4:43   ` Tzung-Bi Shih
2022-08-23  8:17     ` Heikki Krogerus
2022-08-23 17:52       ` Prashant Malani
2022-08-19 19:08 ` Prashant Malani [this message]
2022-08-23  4:43   ` [PATCH 4/4] platform/chrome: cros_ec_typec: Use Type-C driver data Tzung-Bi Shih
2022-08-23 17:50     ` Prashant Malani
2022-08-26 22:40 ` [PATCH 0/4] platform/chrome: cros_ec_typec: Altmode fixes patchwork-bot+chrome-platform
2022-08-26 22:41   ` Prashant Malani
2022-09-08  0:40 ` patchwork-bot+chrome-platform

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20220819190807.1275937-5-pmalani@chromium.org \
    --to=pmalani@chromium.org \
    --cc=bleung@chromium.org \
    --cc=chrome-platform@lists.linux.dev \
    --cc=enric.balletbo@collabora.com \
    --cc=groeck@chromium.org \
    --cc=heikki.krogerus@linux.intel.com \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.