Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1628769 > unrolled thread

Re: [RFC PATCH v5 1/2] usb: typec: USB Type-C Port Manager (tcpm)

Started byGuenter Roeck <linux@roeck-us.net>
First post2017-04-22 05:40 +0200
Last post2017-04-22 05:40 +0200
Articles 1 — 1 participant

Back to article view | Back to linux.kernel

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  Re: [RFC PATCH v5 1/2] usb: typec: USB Type-C Port Manager (tcpm) Guenter Roeck <linux@roeck-us.net> - 2017-04-22 05:40 +0200

#1628769 — Re: [RFC PATCH v5 1/2] usb: typec: USB Type-C Port Manager (tcpm)

FromGuenter Roeck <linux@roeck-us.net>
Date2017-04-22 05:40 +0200
SubjectRe: [RFC PATCH v5 1/2] usb: typec: USB Type-C Port Manager (tcpm)
Message-ID<tyU3U-61v-27@gated-at.bofh.it>
On 04/21/2017 03:15 PM, Guenter Roeck wrote:
> From: Guenter Roeck <groeck@chromium.org>
>
> This driver implements the USB Type-C Power Delivery state machine
> for both source and sink ports. Alternate mode support is not
> fully implemented.
>
> The driver attaches to the USB Type-C class code implemented in
> the following patches.
>
> 	usb: typec: add driver for Intel Whiskey Cove PMIC USB Type-C PHY
> 	usb: USB Type-C connector class
>
> This driver only implements the state machine. Lower level drivers are
> responsible for
> - Reporting VBUS status and activating VBUS
> - Setting CC lines and providing CC line status
> - Setting line polarity
> - Activating and deactivating VCONN
> - Setting the current limit
> - Activating and deactivating PD message transfers
> - Sending and receiving PD messages
>
> The driver provides both a functional API as well as callbacks for
> lower level drivers.
>

Open question, since this still requires some work:

Would the code, in its current form, be acceptable in -staging ?

[ ... ]

> diff --git a/drivers/usb/typec/tcpm.c b/drivers/usb/typec/tcpm.c
> new file mode 100644
> index 000000000000..1a82dddb243d
> --- /dev/null
> +++ b/drivers/usb/typec/tcpm.c
> @@ -0,0 +1,3443 @@
> +/*
> + * Copyright 2015-2016 Google, Inc
> + *
> + * This program is free software; you can redistribute it and/or modify
> + * it under the terms of the GNU General Public License as published by
> + * the Free Software Foundation; either version 2 of the License, or
> + * (at your option) any later version.
> + *
> + * This program is distributed in the hope that it will be useful,
> + * but WITHOUT ANY WARRANTY; without even the implied warranty of
> + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
> + * GNU General Public License for more details.
> + *
> + * USB Power Delivery protocol stack.
> + */
> +
> +#include <linux/completion.h>
> +#include <linux/debugfs.h>
> +#include <linux/device.h>
> +#include <linux/kernel.h>
> +#include <linux/module.h>
> +#include <linux/mutex.h>
> +#include <linux/proc_fs.h>

Missing

#include <linux/sched/clock.h>

to actually build in on top of -next.

Guenter

[toc] | [standalone]


Back to top | Article view | linux.kernel


csiph-web