Skip to content

Commit 4b4e02c

Browse files
groeckgregkh
authored andcommitted
typec: tcpm: Move out of staging
Move tcpm (USB Type-C Port Manager) out of staging. Signed-off-by: Guenter Roeck <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
1 parent 70cd90b commit 4b4e02c

File tree

12 files changed

+17
-28
lines changed

12 files changed

+17
-28
lines changed

drivers/staging/typec/Kconfig

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,5 @@
11
menu "USB Power Delivery and Type-C drivers"
22

3-
config TYPEC_TCPM
4-
tristate "USB Type-C Port Controller Manager"
5-
depends on USB
6-
select TYPEC
7-
help
8-
The Type-C Port Controller Manager provides a USB PD and USB Type-C
9-
state machine for use with Type-C Port Controllers.
10-
113
if TYPEC_TCPM
124

135
config TYPEC_TCPCI

drivers/staging/typec/Makefile

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,2 @@
1-
obj-$(CONFIG_TYPEC_TCPM) += tcpm.o
21
obj-$(CONFIG_TYPEC_TCPCI) += tcpci.o
32
obj-y += fusb302/

drivers/staging/typec/TODO

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,3 @@
1-
tcpm:
2-
- Add documentation (at the very least for the API to low level drivers)
3-
- Split PD code into separate file
4-
- Check if it makes sense to use tracepoints instead of debugfs for debug logs
5-
- Implement Alternate Mode handling
6-
- Address "#if 0" code if not addressed with the above
7-
- Validate all comments marked with "XXX"; either address or remove comments
8-
- Add support for USB PD 3.0. While not mandatory, at least fast role swap
9-
as well as authentication support would be very desirable.
10-
111
tcpci:
122
- Test with real hardware
133

drivers/staging/typec/fusb302/fusb302.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,11 +37,11 @@
3737
#include <linux/string.h>
3838
#include <linux/types.h>
3939
#include <linux/usb/typec.h>
40+
#include <linux/usb/tcpm.h>
41+
#include <linux/usb/pd.h>
4042
#include <linux/workqueue.h>
4143

4244
#include "fusb302_reg.h"
43-
#include "../tcpm.h"
44-
#include "../pd.h"
4545

4646
/*
4747
* When the device is SNK, BC_LVL interrupt is used to monitor cc pins

drivers/staging/typec/tcpci.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,11 +20,11 @@
2020
#include <linux/i2c.h>
2121
#include <linux/interrupt.h>
2222
#include <linux/regmap.h>
23+
#include <linux/usb/pd.h>
24+
#include <linux/usb/tcpm.h>
2325
#include <linux/usb/typec.h>
2426

25-
#include "pd.h"
2627
#include "tcpci.h"
27-
#include "tcpm.h"
2828

2929
#define PD_RETRY_COUNT 3
3030

drivers/usb/typec/Kconfig

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,14 @@ menu "USB Power Delivery and Type-C drivers"
44
config TYPEC
55
tristate
66

7+
config TYPEC_TCPM
8+
tristate "USB Type-C Port Controller Manager"
9+
depends on USB
10+
select TYPEC
11+
help
12+
The Type-C Port Controller Manager provides a USB PD and USB Type-C
13+
state machine for use with Type-C Port Controllers.
14+
715
config TYPEC_WCOVE
816
tristate "Intel WhiskeyCove PMIC USB Type-C PHY driver"
917
depends on ACPI

drivers/usb/typec/Makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
obj-$(CONFIG_TYPEC) += typec.o
2+
obj-$(CONFIG_TYPEC_TCPM) += tcpm.o
23
obj-$(CONFIG_TYPEC_WCOVE) += typec_wcove.o
34
obj-$(CONFIG_TYPEC_UCSI) += ucsi/

drivers/staging/typec/tcpm.c renamed to drivers/usb/typec/tcpm.c

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -26,14 +26,13 @@
2626
#include <linux/seq_file.h>
2727
#include <linux/slab.h>
2828
#include <linux/spinlock.h>
29+
#include <linux/usb/pd.h>
30+
#include <linux/usb/pd_bdo.h>
31+
#include <linux/usb/pd_vdo.h>
32+
#include <linux/usb/tcpm.h>
2933
#include <linux/usb/typec.h>
3034
#include <linux/workqueue.h>
3135

32-
#include "pd.h"
33-
#include "pd_vdo.h"
34-
#include "pd_bdo.h"
35-
#include "tcpm.h"
36-
3736
#define FOREACH_STATE(S) \
3837
S(INVALID_STATE), \
3938
S(DRP_TOGGLING), \
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 commit comments

Comments
 (0)