[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <Y/SxEEwDFI2CWMv3@smile.fi.intel.com>
Date: Tue, 21 Feb 2023 13:54:56 +0200
From: Andy Shevchenko <andriy.shevchenko@...ux.intel.com>
To: Pin-yen Lin <treapking@...omium.org>
Cc: Andrzej Hajda <andrzej.hajda@...el.com>,
Neil Armstrong <neil.armstrong@...aro.org>,
Robert Foss <rfoss@...nel.org>,
Laurent Pinchart <Laurent.pinchart@...asonboard.com>,
Jonas Karlman <jonas@...boo.se>,
Jernej Skrabec <jernej.skrabec@...il.com>,
David Airlie <airlied@...il.com>,
Daniel Vetter <daniel@...ll.ch>,
Rob Herring <robh+dt@...nel.org>,
Krzysztof Kozlowski <krzysztof.kozlowski+dt@...aro.org>,
Daniel Scally <djrscally@...il.com>,
Heikki Krogerus <heikki.krogerus@...ux.intel.com>,
Sakari Ailus <sakari.ailus@...ux.intel.com>,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
"Rafael J . Wysocki" <rafael@...nel.org>,
Prashant Malani <pmalani@...omium.org>,
Benson Leung <bleung@...omium.org>,
Guenter Roeck <groeck@...omium.org>,
linux-kernel@...r.kernel.org, Hsin-Yi Wang <hsinyi@...omium.org>,
Marek Vasut <marex@...x.de>,
Thomas Zimmermann <tzimmermann@...e.de>,
dri-devel@...ts.freedesktop.org, Xin Ji <xji@...logixsemi.com>,
Lyude Paul <lyude@...hat.com>,
Allen Chen <allen.chen@....com.tw>, devicetree@...r.kernel.org,
AngeloGioacchino Del Regno
<angelogioacchino.delregno@...labora.com>,
NĂcolas F . R . A . Prado
<nfraprado@...labora.com>, chrome-platform@...ts.linux.dev,
Javier Martinez Canillas <javierm@...hat.com>,
linux-acpi@...r.kernel.org, Stephen Boyd <swboyd@...omium.org>
Subject: Re: [PATCH v12 10/10] drm/bridge: it6505: Register Type C mode
switches
On Tue, Feb 21, 2023 at 05:50:54PM +0800, Pin-yen Lin wrote:
> Register USB Type-C mode switches when the "mode-switch" property and
> relevant port are available in Device Tree. Configure the "lane_swap"
> state based on the entered alternate mode for a specific Type-C
> connector, which ends up updating the lane swap registers of the it6505
> chip.
...
> +static void it6505_typec_ports_update(struct it6505 *it6505)
> +{
> + int i;
unsigned?
(and just note that here you have already blank line which is good)
> + /* Check if both ports available and do nothing to retain the current one */
> + if (it6505->port_data[0].dp_connected && it6505->port_data[1].dp_connected)
> + return;
> +
> + for (i = 0; i < 2; i++) {
> + if (it6505->port_data[i].dp_connected)
> + it6505->lane_swap = it6505->port_data[i].lane_swap;
> + }
> +}
,,,
> + it6505->port_data[port->port_num].dp_connected =
> + state->alt && state->alt->svid == USB_TYPEC_DP_SID &&
> + state->alt->mode == USB_TYPEC_DP_MODE;
Split first parameter?
...
> + it6505->port_data = devm_kcalloc(
> + dev, switch_desc->num_typec_switches,
Strange indentation.
> + sizeof(struct it6505_typec_port_data), GFP_KERNEL);
> +
Redundant blank line.
> + if (!it6505->port_data) {
> + ret = -ENOMEM;
> + goto unregister_mux;
> + }
...
> + num_lanes = fwnode_property_count_u32(fwnode, "data-lanes");
> +
> + if (num_lanes < 0) {
> + dev_err(dev,
> + "Error on getting data lanes count from %pfwP: %d\n",
> + fwnode, num_lanes);
> + ret = num_lanes;
> + goto unregister_mux;
> + }
Same two comments as per previous patch of similar semantics.
--
With Best Regards,
Andy Shevchenko
Powered by blists - more mailing lists