aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/mfd
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2017-09-05 14:08:17 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2017-09-05 14:08:17 -0400
commitbafb0762cb6a906eb4105cccfb3bcd90be7f40d2 (patch)
tree14ecb87c33bcf909e5b95c27cd694ded4ac1478c /include/linux/mfd
parent44b1671fae88ce95b8c7b53acbc6ba71ca67db00 (diff)
parent3a6430ce462172caac7c73f4afd550ab0f105737 (diff)
Merge tag 'char-misc-4.14-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc
Pull char/misc driver updates from Greg KH: "Here is the big char/misc driver update for 4.14-rc1. Lots of different stuff in here, it's been an active development cycle for some reason. Highlights are: - updated binder driver, this brings binder up to date with what shipped in the Android O release, plus some more changes that happened since then that are in the Android development trees. - coresight updates and fixes - mux driver file renames to be a bit "nicer" - intel_th driver updates - normal set of hyper-v updates and changes - small fpga subsystem and driver updates - lots of const code changes all over the driver trees - extcon driver updates - fmc driver subsystem upadates - w1 subsystem minor reworks and new features and drivers added - spmi driver updates Plus a smattering of other minor driver updates and fixes. All of these have been in linux-next with no reported issues for a while" * tag 'char-misc-4.14-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc: (244 commits) ANDROID: binder: don't queue async transactions to thread. ANDROID: binder: don't enqueue death notifications to thread todo. ANDROID: binder: Don't BUG_ON(!spin_is_locked()). ANDROID: binder: Add BINDER_GET_NODE_DEBUG_INFO ioctl ANDROID: binder: push new transactions to waiting threads. ANDROID: binder: remove proc waitqueue android: binder: Add page usage in binder stats android: binder: fixup crash introduced by moving buffer hdr drivers: w1: add hwmon temp support for w1_therm drivers: w1: refactor w1_slave_show to make the temp reading functionality separate drivers: w1: add hwmon support structures eeprom: idt_89hpesx: Support both ACPI and OF probing mcb: Fix an error handling path in 'chameleon_parse_cells()' MCB: add support for SC31 to mcb-lpc mux: make device_type const char: virtio: constify attribute_group structures. Documentation/ABI: document the nvmem sysfs files lkdtm: fix spelling mistake: "incremeted" -> "incremented" perf: cs-etm: Fix ETMv4 CONFIGR entry in perf.data file nvmem: include linux/err.h from header ...
Diffstat (limited to 'include/linux/mfd')
-rw-r--r--include/linux/mfd/cros_ec_commands.h75
-rw-r--r--include/linux/mfd/ds1wm.h29
2 files changed, 97 insertions, 7 deletions
diff --git a/include/linux/mfd/cros_ec_commands.h b/include/linux/mfd/cros_ec_commands.h
index 190c8f4afa02..2b16e95b9bb8 100644
--- a/include/linux/mfd/cros_ec_commands.h
+++ b/include/linux/mfd/cros_ec_commands.h
@@ -285,6 +285,11 @@ enum host_event_code {
285 EC_HOST_EVENT_HANG_DETECT = 20, 285 EC_HOST_EVENT_HANG_DETECT = 20,
286 /* Hang detect logic detected a hang and warm rebooted the AP */ 286 /* Hang detect logic detected a hang and warm rebooted the AP */
287 EC_HOST_EVENT_HANG_REBOOT = 21, 287 EC_HOST_EVENT_HANG_REBOOT = 21,
288 /* PD MCU triggering host event */
289 EC_HOST_EVENT_PD_MCU = 22,
290
291 /* EC desires to change state of host-controlled USB mux */
292 EC_HOST_EVENT_USB_MUX = 28,
288 293
289 /* 294 /*
290 * The high bit of the event mask is not used as a host event code. If 295 * The high bit of the event mask is not used as a host event code. If
@@ -2905,6 +2910,76 @@ struct ec_params_usb_pd_control {
2905 uint8_t mux; 2910 uint8_t mux;
2906} __packed; 2911} __packed;
2907 2912
2913#define PD_CTRL_RESP_ENABLED_COMMS (1 << 0) /* Communication enabled */
2914#define PD_CTRL_RESP_ENABLED_CONNECTED (1 << 1) /* Device connected */
2915#define PD_CTRL_RESP_ENABLED_PD_CAPABLE (1 << 2) /* Partner is PD capable */
2916
2917struct ec_response_usb_pd_control_v1 {
2918 uint8_t enabled;
2919 uint8_t role;
2920 uint8_t polarity;
2921 char state[32];
2922} __packed;
2923
2924#define EC_CMD_USB_PD_PORTS 0x102
2925
2926struct ec_response_usb_pd_ports {
2927 uint8_t num_ports;
2928} __packed;
2929
2930#define EC_CMD_USB_PD_POWER_INFO 0x103
2931
2932#define PD_POWER_CHARGING_PORT 0xff
2933struct ec_params_usb_pd_power_info {
2934 uint8_t port;
2935} __packed;
2936
2937enum usb_chg_type {
2938 USB_CHG_TYPE_NONE,
2939 USB_CHG_TYPE_PD,
2940 USB_CHG_TYPE_C,
2941 USB_CHG_TYPE_PROPRIETARY,
2942 USB_CHG_TYPE_BC12_DCP,
2943 USB_CHG_TYPE_BC12_CDP,
2944 USB_CHG_TYPE_BC12_SDP,
2945 USB_CHG_TYPE_OTHER,
2946 USB_CHG_TYPE_VBUS,
2947 USB_CHG_TYPE_UNKNOWN,
2948};
2949
2950struct usb_chg_measures {
2951 uint16_t voltage_max;
2952 uint16_t voltage_now;
2953 uint16_t current_max;
2954 uint16_t current_lim;
2955} __packed;
2956
2957struct ec_response_usb_pd_power_info {
2958 uint8_t role;
2959 uint8_t type;
2960 uint8_t dualrole;
2961 uint8_t reserved1;
2962 struct usb_chg_measures meas;
2963 uint32_t max_power;
2964} __packed;
2965
2966/* Get info about USB-C SS muxes */
2967#define EC_CMD_USB_PD_MUX_INFO 0x11a
2968
2969struct ec_params_usb_pd_mux_info {
2970 uint8_t port; /* USB-C port number */
2971} __packed;
2972
2973/* Flags representing mux state */
2974#define USB_PD_MUX_USB_ENABLED (1 << 0)
2975#define USB_PD_MUX_DP_ENABLED (1 << 1)
2976#define USB_PD_MUX_POLARITY_INVERTED (1 << 2)
2977#define USB_PD_MUX_HPD_IRQ (1 << 3)
2978
2979struct ec_response_usb_pd_mux_info {
2980 uint8_t flags; /* USB_PD_MUX_*-encoded USB mux state */
2981} __packed;
2982
2908/*****************************************************************************/ 2983/*****************************************************************************/
2909/* 2984/*
2910 * Passthru commands 2985 * Passthru commands
diff --git a/include/linux/mfd/ds1wm.h b/include/linux/mfd/ds1wm.h
index 38a372a0e285..2227c6a75d84 100644
--- a/include/linux/mfd/ds1wm.h
+++ b/include/linux/mfd/ds1wm.h
@@ -1,13 +1,28 @@
1/* MFD cell driver data for the DS1WM driver */ 1/* MFD cell driver data for the DS1WM driver
2 *
3 * to be defined in the MFD device that is
4 * using this driver for one of his sub devices
5 */
2 6
3struct ds1wm_driver_data { 7struct ds1wm_driver_data {
4 int active_high; 8 int active_high;
5 int clock_rate; 9 int clock_rate;
6 /* in milliseconds, the amount of time to */ 10 /* in milliseconds, the amount of time to
7 /* sleep following a reset pulse. Zero */ 11 * sleep following a reset pulse. Zero
8 /* should work if your bus devices recover*/ 12 * should work if your bus devices recover
9 /* time respects the 1-wire spec since the*/ 13 * time respects the 1-wire spec since the
10 /* ds1wm implements the precise timings of*/ 14 * ds1wm implements the precise timings of
11 /* a reset pulse/presence detect sequence.*/ 15 * a reset pulse/presence detect sequence.
16 */
12 unsigned int reset_recover_delay; 17 unsigned int reset_recover_delay;
18
19 /* Say 1 here for big endian Hardware
20 * (only relevant with bus-shift > 0
21 */
22 bool is_hw_big_endian;
23
24 /* left shift of register number to get register address offsett.
25 * Only 0,1,2 allowed for 8,16 or 32 bit bus width respectively
26 */
27 unsigned int bus_shift;
13}; 28};