lkml.org 
[lkml]   [2022]   [Aug]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [PATCH v5 3/7] platform/chrome: cros_typec_switch: Set EC retimer
On Mon, Aug 15, 2022 at 10:11 PM Tzung-Bi Shih <tzungbi@kernel.org> wrote:
>
> 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 = {
> ...
> },
> ...

Done.

>
> > +/*
> > + * 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?
Fixed in v6.

>

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