aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/usb
diff options
context:
space:
mode:
authorAdam Thomson <Adam.Thomson.Opensource@diasemi.com>2018-01-02 10:50:51 -0500
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2018-03-09 12:21:40 -0500
commit02cad961cae556357e4a63b11f849e80418c1ffc (patch)
tree5e464ae721248902c7e1a58bea59419d2edff64c /include/linux/usb
parent456ebb4f221e98f507cc945690a670a79682c029 (diff)
typec: tcpm: Add SDB header for Status message handling
This commit adds a header providing definitions for handling Status messages. Currently the header only focuses on handling incoming Status messages. Signed-off-by: Adam Thomson <Adam.Thomson.Opensource@diasemi.com> Acked-by: Heikki Krogerus <heikki.krogerus@linux.intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'include/linux/usb')
-rw-r--r--include/linux/usb/pd_ext_sdb.h31
1 files changed, 31 insertions, 0 deletions
diff --git a/include/linux/usb/pd_ext_sdb.h b/include/linux/usb/pd_ext_sdb.h
new file mode 100644
index 000000000000..0eb83ce19597
--- /dev/null
+++ b/include/linux/usb/pd_ext_sdb.h
@@ -0,0 +1,31 @@
1// SPDX-License-Identifier: GPL-2.0+
2/*
3 * Copyright (c) 2017 Dialog Semiconductor
4 *
5 * Author: Adam Thomson <Adam.Thomson.Opensource@diasemi.com>
6 */
7
8#ifndef __LINUX_USB_PD_EXT_SDB_H
9#define __LINUX_USB_PD_EXT_SDB_H
10
11/* SDB : Status Data Block */
12enum usb_pd_ext_sdb_fields {
13 USB_PD_EXT_SDB_INTERNAL_TEMP = 0,
14 USB_PD_EXT_SDB_PRESENT_INPUT,
15 USB_PD_EXT_SDB_PRESENT_BATT_INPUT,
16 USB_PD_EXT_SDB_EVENT_FLAGS,
17 USB_PD_EXT_SDB_TEMP_STATUS,
18 USB_PD_EXT_SDB_DATA_SIZE,
19};
20
21/* Event Flags */
22#define USB_PD_EXT_SDB_EVENT_OCP BIT(1)
23#define USB_PD_EXT_SDB_EVENT_OTP BIT(2)
24#define USB_PD_EXT_SDB_EVENT_OVP BIT(3)
25#define USB_PD_EXT_SDB_EVENT_CF_CV_MODE BIT(4)
26
27#define USB_PD_EXT_SDB_PPS_EVENTS (USB_PD_EXT_SDB_EVENT_OCP | \
28 USB_PD_EXT_SDB_EVENT_OTP | \
29 USB_PD_EXT_SDB_EVENT_OVP)
30
31#endif /* __LINUX_USB_PD_EXT_SDB_H */