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  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]
Date:   Fri, 21 Apr 2017 20:30:39 -0700
From:   Guenter Roeck <linux@...ck-us.net>
To:     Felipe Balbi <felipe.balbi@...ux.intel.com>
Cc:     Heikki Krogerus <heikki.krogerus@...ux.intel.com>,
        linux-usb@...r.kernel.org, linux-kernel@...r.kernel.org,
        Mats Karrman <mats.dev.list@...il.com>,
        Badhri Jagan Sridharan <badhri@...gle.com>,
        Oliver Neukum <oneukum@...e.com>,
        Guenter Roeck <groeck@...omium.org>
Subject: Re: [RFC PATCH v5 1/2] usb: typec: USB Type-C Port Manager (tcpm)

On 04/21/2017 03:15 PM, Guenter Roeck wrote:
> From: Guenter Roeck <groeck@...omium.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

Powered by blists - more mailing lists