lkml.org 
[lkml]   [2022]   [Aug]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
SubjectRe: [PATCH v5 2/7] platform/chrome: cros_typec_switch: Add switch driver
On Mon, Aug 15, 2022 at 06:34:19AM +0000, Prashant Malani wrote:
> Introduce a driver to configure USB Type-C mode switches and retimers
> which are controlled by the Chrome OS EC (Embedded Controller).
> This allows Type-C port drivers, as well as alternate mode drivers to
> configure their relevant mode switches and retimers according to the
> Type-C state they want to achieve.

s/Chrome OS/ChromeOS/.

> diff --git a/drivers/platform/chrome/Kconfig b/drivers/platform/chrome/Kconfig
[...]
> +config CROS_TYPEC_SWITCH
> + tristate "ChromeOS EC Type-C Switch Control"
> + depends on MFD_CROS_EC_DEV && TYPEC && ACPI
> + default MFD_CROS_EC_DEV
> + help
> + If you say Y here, you get support for configuring the Chrome OS EC Type C
> + muxes and retimers.

s/Chrome OS/ChromeOS/.

Up to you, s/Type C/Type-C/g.

> diff --git a/drivers/platform/chrome/cros_typec_switch.c b/drivers/platform/chrome/cros_typec_switch.c
> new file mode 100644
> index 000000000000..0d319e315d57
> --- /dev/null
> +++ b/drivers/platform/chrome/cros_typec_switch.c
> @@ -0,0 +1,170 @@
> +// SPDX-License-Identifier: GPL-2.0-only
> +/*
> + * Copyright 2022 Google LLC
> + *
> + * This driver provides the ability to configure Type C muxes and retimers which are controlled by
> + * the Chrome OS EC.
> + */
s/Chrome OS/ChromeOS/.

> +static int cros_typec_register_switches(struct cros_typec_switch_data *sdata)
> +{
> + struct cros_typec_port *port = NULL;
> + struct device *dev = sdata->dev;
> + struct fwnode_handle *fwnode;
> + struct acpi_device *adev;
> + unsigned long long index;
> + int ret = 0;

`port` and `ret` don't need to be initialized.

> +MODULE_DESCRIPTION("Chrome OS EC Type C Switch control");

s/Chrome OS/ChromeOS/.

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