lkml.org 
[lkml]   [2022]   [Aug]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v5 3/7] platform/chrome: cros_typec_switch: Set EC retimer
On Mon, Aug 15, 2022 at 06:34:21AM +0000, Prashant Malani wrote:
> +static int cros_typec_cmd_mux_set(struct cros_typec_switch_data *sdata, int port_num, u8 index,
> + u8 state)
> +{
> + struct typec_usb_mux_set params = {
> + .mux_index = index,
> + .mux_flags = state,
> + };
> +
> + struct ec_params_typec_control req = {
> + .port = port_num,
> + .command = TYPEC_CONTROL_COMMAND_USB_MUX_SET,
> + .mux_params = params,
> + };

Would it be better to avoid the memory copy by making `params` inline?

E.g.:
struct ec_params_typec_control req = {
...
.mux_params = {
...
},
...

> +/*
> + * The Chrome EC treats both mode-switches and retimers as "muxes" for the purposes of the

To be consistent to the series, I guess you would like to use ChromeOS
instead of Chrome?

\
 
 \ /
  Last update: 2022-08-16 09:58    [W:6.928 / U:0.012 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site