Skip to content

Commit

Permalink
typec: tcpm: Move out of staging
Browse files Browse the repository at this point in the history
Move tcpm (USB Type-C Port Manager) out of staging.

Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
  • Loading branch information
Guenter Roeck authored and Greg Kroah-Hartman committed Sep 18, 2017
1 parent 70cd90b commit 4b4e02c
Show file tree
Hide file tree
Showing 12 changed files with 17 additions and 28 deletions.
8 changes: 0 additions & 8 deletions drivers/staging/typec/Kconfig
Original file line number Diff line number Diff line change
@@ -1,13 +1,5 @@
menu "USB Power Delivery and Type-C drivers"

config TYPEC_TCPM
tristate "USB Type-C Port Controller Manager"
depends on USB
select TYPEC
help
The Type-C Port Controller Manager provides a USB PD and USB Type-C
state machine for use with Type-C Port Controllers.

if TYPEC_TCPM

config TYPEC_TCPCI
Expand Down
1 change: 0 additions & 1 deletion drivers/staging/typec/Makefile
Original file line number Diff line number Diff line change
@@ -1,3 +1,2 @@
obj-$(CONFIG_TYPEC_TCPM) += tcpm.o
obj-$(CONFIG_TYPEC_TCPCI) += tcpci.o
obj-y += fusb302/
10 changes: 0 additions & 10 deletions drivers/staging/typec/TODO
Original file line number Diff line number Diff line change
@@ -1,13 +1,3 @@
tcpm:
- Add documentation (at the very least for the API to low level drivers)
- Split PD code into separate file
- Check if it makes sense to use tracepoints instead of debugfs for debug logs
- Implement Alternate Mode handling
- Address "#if 0" code if not addressed with the above
- Validate all comments marked with "XXX"; either address or remove comments
- Add support for USB PD 3.0. While not mandatory, at least fast role swap
as well as authentication support would be very desirable.

tcpci:
- Test with real hardware

Expand Down
4 changes: 2 additions & 2 deletions drivers/staging/typec/fusb302/fusb302.c
Original file line number Diff line number Diff line change
Expand Up @@ -37,11 +37,11 @@
#include <linux/string.h>
#include <linux/types.h>
#include <linux/usb/typec.h>
#include <linux/usb/tcpm.h>
#include <linux/usb/pd.h>
#include <linux/workqueue.h>

#include "fusb302_reg.h"
#include "../tcpm.h"
#include "../pd.h"

/*
* When the device is SNK, BC_LVL interrupt is used to monitor cc pins
Expand Down
4 changes: 2 additions & 2 deletions drivers/staging/typec/tcpci.c
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,11 @@
#include <linux/i2c.h>
#include <linux/interrupt.h>
#include <linux/regmap.h>
#include <linux/usb/pd.h>
#include <linux/usb/tcpm.h>
#include <linux/usb/typec.h>

#include "pd.h"
#include "tcpci.h"
#include "tcpm.h"

#define PD_RETRY_COUNT 3

Expand Down
8 changes: 8 additions & 0 deletions drivers/usb/typec/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,14 @@ menu "USB Power Delivery and Type-C drivers"
config TYPEC
tristate

config TYPEC_TCPM
tristate "USB Type-C Port Controller Manager"
depends on USB
select TYPEC
help
The Type-C Port Controller Manager provides a USB PD and USB Type-C
state machine for use with Type-C Port Controllers.

config TYPEC_WCOVE
tristate "Intel WhiskeyCove PMIC USB Type-C PHY driver"
depends on ACPI
Expand Down
1 change: 1 addition & 0 deletions drivers/usb/typec/Makefile
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
obj-$(CONFIG_TYPEC) += typec.o
obj-$(CONFIG_TYPEC_TCPM) += tcpm.o
obj-$(CONFIG_TYPEC_WCOVE) += typec_wcove.o
obj-$(CONFIG_TYPEC_UCSI) += ucsi/
9 changes: 4 additions & 5 deletions drivers/staging/typec/tcpm.c → drivers/usb/typec/tcpm.c
Original file line number Diff line number Diff line change
Expand Up @@ -26,14 +26,13 @@
#include <linux/seq_file.h>
#include <linux/slab.h>
#include <linux/spinlock.h>
#include <linux/usb/pd.h>
#include <linux/usb/pd_bdo.h>
#include <linux/usb/pd_vdo.h>
#include <linux/usb/tcpm.h>
#include <linux/usb/typec.h>
#include <linux/workqueue.h>

#include "pd.h"
#include "pd_vdo.h"
#include "pd_bdo.h"
#include "tcpm.h"

#define FOREACH_STATE(S) \
S(INVALID_STATE), \
S(DRP_TOGGLING), \
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 comments on commit 4b4e02c

Please sign in to comment.