lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <Ya+BvnS8XqW9NpNc@smile.fi.intel.com>
Date:   Tue, 7 Dec 2021 17:46:06 +0200
From:   Andy Shevchenko <andriy.shevchenko@...ux.intel.com>
To:     Heikki Krogerus <heikki.krogerus@...ux.intel.com>
Cc:     "Rafael J. Wysocki" <rafael@...nel.org>,
        Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
        Sakari Ailus <sakari.ailus@...ux.intel.com>,
        Prashant Malani <pmalani@...omium.org>,
        linux-acpi@...r.kernel.org, linux-usb@...r.kernel.org,
        linux-kernel@...r.kernel.org
Subject: Re: [PATCH 4/5] usb: typec: port-mapper: Convert to the component
 framework

On Tue, Dec 07, 2021 at 05:37:56PM +0300, Heikki Krogerus wrote:
> Instead of trying to keep track of the connections to the
> USB Type-C connectors separately, letting the component
> framework take care of that.
> 
> From now on every USB Type-C connector will register itself
> as "aggregate" - component master - and anything that can be
> connected to it can then simply register itself as a generic
> component.
> 
> The matching of the components and the connector shall rely
> on ACPI _PLD initially. Before registering itself as the
> aggregate, the connector will check the list of other
> devices that share the same ACPI _PLD with it, and add a
> component match entry for each one of them. Because only
> ACPI is supported for now, the driver shall only be build
> when ACPI is supported.
> 
> This removes the need for the custom API that the driver
> exposed. The components and the connector can therefore
> exist completely independently of each other. The order in
> which they are registered, as well as are they modules or
> not, is now irrelevant.

...

> +static int typec_port_compare(struct device *dev, void *fwnode)
>  {

> +	return dev_fwnode(dev) == fwnode;
>  }

NIH device_match_fwnode()

...

> +	/* Component match for every device that shares the same _PLD. */
> +	list_for_each_entry(adev, &location->devices, location_list) {

> +		if (adev == ACPI_COMPANION(&con->dev))

	device_match_acpi_dev()

> +			continue;

-- 
With Best Regards,
Andy Shevchenko


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ