lkml.org 
[lkml]   [2019]   [Feb]   [20]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [PATCH 1/2] platform/x86: intel_cht_int33fe: Provide fwnode for the USB connector
On Tue, Feb 19, 2019 at 2:00 PM Heikki Krogerus
<heikki.krogerus@linux.intel.com> wrote:
>
> In ACPI, and now also in DT, the USB connectors usually have
> their own device nodes. In case of USB Type-C, those
> connector (port) nodes are child nodes of the controller or
> PHY device, in our case the fusb302. The software fwnodes
> allow us to create a similar child node for fusb302 that
> represents the connector also on Intel CHT.
>
> This makes it possible replace the fusb302 specific device
> properties which were deprecated with the common USB
> connector properties that tcpm.c is able to use directly.



> + /* Node for the FUSB302 controller */
> + data->fusb302_node = fwnode_create_software_node(fusb302_props, NULL);
> + if (IS_ERR(data->fusb302_node))
> + return PTR_ERR(data->fusb302_node);
> +
> + /* Node for the connector (FUSB302 is the parent) */
> + data->port_node = fwnode_create_software_node(usb_connector_props,
> + data->fusb302_node);
> + if (IS_ERR(data->port_node)) {

> + fwnode_remove_software_node(data->fusb302_node);

Sounds like a candidate for
devm_fwnode_create_software_node()

> + return PTR_ERR(data->port_node);
> + }

--
With Best Regards,
Andy Shevchenko

\
 
 \ /
  Last update: 2019-02-20 16:56    [W:0.194 / U:2.028 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site