[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <Y7xuEDPwbMQ29mDE@google.com>
Date: Mon, 9 Jan 2023 11:42:08 -0800
From: Benson Leung <bleung@...gle.com>
To: Prashant Malani <pmalani@...omium.org>
Cc: linux-kernel@...r.kernel.org, chrome-platform@...ts.linux.dev,
heikki.krogerus@...ux.intel.com,
Benson Leung <bleung@...omium.org>,
Daisuke Nojiri <dnojiri@...omium.org>,
"Dustin L. Howett" <dustin@...ett.net>,
Evan Green <evgreen@...omium.org>,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
Guenter Roeck <groeck@...omium.org>,
"Gustavo A. R. Silva" <gustavoars@...nel.org>,
Lee Jones <lee.jones@...aro.org>, Lee Jones <lee@...nel.org>,
Stephen Boyd <swboyd@...omium.org>,
Tinghan Shen <tinghan.shen@...iatek.com>,
Tzung-Bi Shih <tzungbi@...nel.org>,
Xiang wangx <wangxiang@...rlc.com>
Subject: Re: [PATCH 03/10] platform/chrome: cros_ec_typec: Stash port driver
info
On Wed, Dec 28, 2022 at 12:45:06AM +0000, Prashant Malani wrote:
> Stash port number and a pointer to the driver-specific struct in the
> local typec port struct.
>
> These can be useful to the port driver to figure out how to communicate
> with the Chrome EC when an altmode-driver related callback is invoked
> from the Type-C class code.
>
> Signed-off-by: Prashant Malani <pmalani@...omium.org>
Reviewed-by: Benson Leung <bleung@...omium.org>
> ---
> drivers/platform/chrome/cros_ec_typec.c | 5 +++++
> 1 file changed, 5 insertions(+)
>
> diff --git a/drivers/platform/chrome/cros_ec_typec.c b/drivers/platform/chrome/cros_ec_typec.c
> index 001b0de95a46..bc8dc8bd90b3 100644
> --- a/drivers/platform/chrome/cros_ec_typec.c
> +++ b/drivers/platform/chrome/cros_ec_typec.c
> @@ -45,6 +45,7 @@ struct cros_typec_altmode_node {
> /* Per port data. */
> struct cros_typec_port {
> struct typec_port *port;
> + int port_num;
> /* Initial capabilities for the port. */
> struct typec_capability caps;
> struct typec_partner *partner;
> @@ -78,6 +79,8 @@ struct cros_typec_port {
> struct usb_power_delivery *partner_pd;
> struct usb_power_delivery_capabilities *partner_src_caps;
> struct usb_power_delivery_capabilities *partner_sink_caps;
> +
> + struct cros_typec_data *typec_data;
> };
>
> /* Platform-specific data for the Chrome OS EC Type C controller. */
> @@ -408,6 +411,8 @@ static int cros_typec_init_ports(struct cros_typec_data *typec)
> goto unregister_ports;
> }
>
> + cros_port->port_num = port_num;
> + cros_port->typec_data = typec;
> typec->ports[port_num] = cros_port;
> cap = &cros_port->caps;
>
> --
> 2.39.0.314.g84b9a713c41-goog
>
--
Benson Leung
Staff Software Engineer
Chrome OS Kernel
Google Inc.
bleung@...gle.com
Chromium OS Project
bleung@...omium.org
Download attachment "signature.asc" of type "application/pgp-signature" (229 bytes)
Powered by blists - more mailing lists