summaryrefslogtreecommitdiff
path: root/include/linux
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/power_supply.h31
-rw-r--r--include/linux/qpnp/qpnp-adc.h20
-rw-r--r--include/linux/rndis_ipa.h8
-rwxr-xr-xinclude/linux/soundwire/soundwire.h5
4 files changed, 56 insertions, 8 deletions
diff --git a/include/linux/power_supply.h b/include/linux/power_supply.h
index 376645983d3e..b081a56e250f 100644
--- a/include/linux/power_supply.h
+++ b/include/linux/power_supply.h
@@ -177,6 +177,7 @@ enum power_supply_property {
POWER_SUPPLY_PROP_CHARGE_ENABLED,
POWER_SUPPLY_PROP_BATTERY_CHARGING_ENABLED,
POWER_SUPPLY_PROP_CHARGING_ENABLED,
+ POWER_SUPPLY_PROP_INPUT_SUSPEND,
POWER_SUPPLY_PROP_INPUT_VOLTAGE_REGULATION,
POWER_SUPPLY_PROP_INPUT_CURRENT_MAX,
POWER_SUPPLY_PROP_INPUT_CURRENT_TRIM,
@@ -209,6 +210,10 @@ enum power_supply_property {
POWER_SUPPLY_PROP_RESTRICTED_CHARGING,
POWER_SUPPLY_PROP_CURRENT_CAPABILITY,
POWER_SUPPLY_PROP_TYPEC_MODE,
+ POWER_SUPPLY_PROP_TYPEC_CC_ORIENTATION, /* 0: N/C, 1: CC1, 2: CC2 */
+ POWER_SUPPLY_PROP_TYPEC_POWER_ROLE,
+ POWER_SUPPLY_PROP_PD_ALLOWED,
+ POWER_SUPPLY_PROP_PD_ACTIVE,
/* Local extensions of type int64_t */
POWER_SUPPLY_PROP_CHARGE_COUNTER_EXT,
/* Properties of type `const char *' */
@@ -229,6 +234,7 @@ enum power_supply_type {
POWER_SUPPLY_TYPE_USB_ACA, /* Accessory Charger Adapters */
POWER_SUPPLY_TYPE_USB_HVDCP, /* High Voltage DCP */
POWER_SUPPLY_TYPE_USB_HVDCP_3, /* Efficient High Voltage DCP */
+ POWER_SUPPLY_TYPE_USB_PD, /* Power Delivery */
POWER_SUPPLY_TYPE_WIRELESS, /* Accessory Charger Adapters */
POWER_SUPPLY_TYPE_BMS, /* Battery Monitor System */
POWER_SUPPLY_TYPE_USB_PARALLEL, /* USB Parallel Path */
@@ -238,6 +244,31 @@ enum power_supply_type {
POWER_SUPPLY_TYPE_DFP, /* TYpe-C DFP */
};
+/* Indicates USB Type-C CC connection status */
+enum power_supply_typec_mode {
+ POWER_SUPPLY_TYPEC_NONE,
+
+ /* Acting as source */
+ POWER_SUPPLY_TYPEC_SINK, /* Rd only */
+ POWER_SUPPLY_TYPEC_SINK_POWERED_CABLE, /* Rd/Ra */
+ POWER_SUPPLY_TYPEC_SINK_DEBUG_ACCESSORY, /* Rd/Rd */
+ POWER_SUPPLY_TYPEC_SINK_AUDIO_ADAPTER, /* Ra/Ra */
+ POWER_SUPPLY_TYPEC_POWERED_CABLE_ONLY, /* Ra only */
+
+ /* Acting as sink */
+ POWER_SUPPLY_TYPEC_SOURCE_DEFAULT, /* Rp default */
+ POWER_SUPPLY_TYPEC_SOURCE_MEDIUM, /* Rp 1.5A */
+ POWER_SUPPLY_TYPEC_SOURCE_HIGH, /* Rp 3A */
+ POWER_SUPPLY_TYPEC_NON_COMPLIANT,
+};
+
+enum power_supply_typec_power_role {
+ POWER_SUPPLY_TYPEC_PR_NONE, /* CC lines in high-Z */
+ POWER_SUPPLY_TYPEC_PR_DUAL,
+ POWER_SUPPLY_TYPEC_PR_SINK,
+ POWER_SUPPLY_TYPEC_PR_SOURCE,
+};
+
enum power_supply_notifier_events {
PSY_EVENT_PROP_CHANGED,
};
diff --git a/include/linux/qpnp/qpnp-adc.h b/include/linux/qpnp/qpnp-adc.h
index e143b93ce020..8d51ddcd4246 100644
--- a/include/linux/qpnp/qpnp-adc.h
+++ b/include/linux/qpnp/qpnp-adc.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2012-2015, The Linux Foundation. All rights reserved.
+ * Copyright (c) 2012-2016, The Linux Foundation. All rights reserved.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 and
@@ -1062,7 +1062,7 @@ struct qpnp_vadc_chan_properties {
enum qpnp_adc_tm_channel_select tm_channel_select;
enum qpnp_state_request state_request;
enum qpnp_adc_calib_type calib_type;
- struct qpnp_vadc_linear_graph adc_graph[2];
+ struct qpnp_vadc_linear_graph adc_graph[ADC_HC_CAL_SEL_NONE];
};
/**
@@ -1243,6 +1243,10 @@ struct qpnp_adc_drv {
* @fast_avg_setup - Ability to provide single result from the ADC
* that is an average of multiple measurements.
* @trigger_channel - HW trigger channel for conversion sequencer.
+ * @calib_type - Used to store the calibration type for the channel
+ * absolute/ratiometric.
+ * @cal_val - Used to determine if fresh calibration value or timer
+ * updated calibration value is to be used.
* @chan_prop - Represent the channel properties of the ADC.
*/
struct qpnp_adc_amux_properties {
@@ -1252,6 +1256,8 @@ struct qpnp_adc_amux_properties {
uint32_t hw_settle_time;
uint32_t fast_avg_setup;
enum qpnp_vadc_trigger trigger_channel;
+ enum qpnp_adc_calib_type calib_type;
+ enum qpnp_adc_cal_val cal_val;
struct qpnp_vadc_chan_properties chan_prop[0];
};
@@ -1683,19 +1689,25 @@ int32_t qpnp_adc_qrd_skut1_btm_scaler(struct qpnp_vadc_chip *dev,
* and convert given temperature to voltage on supported
* thermistor channels using 100k pull-up.
* @dev: Structure device for qpnp vadc
+ * @adc_prop: adc properties of the qpnp adc such as bit resolution,
+ * reference voltage.
* @param: The input temperature values.
*/
int32_t qpnp_adc_tm_scale_therm_voltage_pu2(struct qpnp_vadc_chip *dev,
+ const struct qpnp_adc_properties *adc_properties,
struct qpnp_adc_tm_config *param);
/**
* qpnp_adc_tm_scale_therm_voltage_pu2() - Performs reverse calibration
* and converts the given ADC code to temperature for
* thermistor channels using 100k pull-up.
* @dev: Structure device for qpnp vadc
+ * @adc_prop: adc properties of the qpnp adc such as bit resolution,
+ * reference voltage.
* @reg: The input ADC code.
* @result: The physical measurement temperature on the thermistor.
*/
int32_t qpnp_adc_tm_scale_voltage_therm_pu2(struct qpnp_vadc_chip *dev,
+ const struct qpnp_adc_properties *adc_prop,
uint32_t reg, int64_t *result);
/**
* qpnp_adc_usb_scaler() - Performs reverse calibration on the low/high
@@ -2017,11 +2029,13 @@ static inline int32_t qpnp_adc_scale_millidegc_pmic_voltage_thr(
{ return -ENXIO; }
static inline int32_t qpnp_adc_tm_scale_therm_voltage_pu2(
struct qpnp_vadc_chip *dev,
+ const struct qpnp_adc_properties *adc_properties,
struct qpnp_adc_tm_config *param)
{ return -ENXIO; }
static inline int32_t qpnp_adc_tm_scale_voltage_therm_pu2(
struct qpnp_vadc_chip *dev,
- uint32_t reg, int64_t *result)
+ const struct qpnp_adc_properties *adc_prop,
+ uint32_t reg, int64_t *result)
{ return -ENXIO; }
static inline int32_t qpnp_adc_smb_btm_rscaler(struct qpnp_vadc_chip *dev,
struct qpnp_adc_tm_btm_param *param,
diff --git a/include/linux/rndis_ipa.h b/include/linux/rndis_ipa.h
index c9e389ddbf2b..9dcb8c30901b 100644
--- a/include/linux/rndis_ipa.h
+++ b/include/linux/rndis_ipa.h
@@ -1,4 +1,4 @@
-/* Copyright (c) 2013-2014, The Linux Foundation. All rights reserved.
+/* Copyright (c) 2013-2016, The Linux Foundation. All rights reserved.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 and
@@ -75,7 +75,7 @@ void rndis_ipa_cleanup(void *private);
static inline int rndis_ipa_init(struct ipa_usb_init_params *params)
{
- return 0;
+ return -ENOMEM;
}
static inline int rndis_ipa_pipe_connect_notify(u32 usb_to_ipa_hdl,
@@ -85,12 +85,12 @@ static inline int rndis_ipa_pipe_connect_notify(u32 usb_to_ipa_hdl,
u32 max_xfer_size_bytes_to_host,
void *private)
{
- return 0;
+ return -ENOMEM;
}
static inline int rndis_ipa_pipe_disconnect_notify(void *private)
{
- return 0;
+ return -ENOMEM;
}
static inline void rndis_ipa_cleanup(void *private)
diff --git a/include/linux/soundwire/soundwire.h b/include/linux/soundwire/soundwire.h
index f19e871d6ac2..4b957245209e 100755
--- a/include/linux/soundwire/soundwire.h
+++ b/include/linux/soundwire/soundwire.h
@@ -1,4 +1,4 @@
-/* Copyright (c) 2015, The Linux Foundation. All rights reserved.
+/* Copyright (c) 2015-2016, The Linux Foundation. All rights reserved.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 and
@@ -151,6 +151,7 @@ struct swr_master {
const void *buf, size_t len);
int (*get_logical_dev_num)(struct swr_master *mstr, u64 dev_id,
u8 *dev_num);
+ void (*slvdev_datapath_control)(struct swr_master *mstr, bool enable);
};
static inline struct swr_master *to_swr_master(struct device *dev)
@@ -304,4 +305,6 @@ extern int swr_device_down(struct swr_device *swr_dev);
extern int swr_reset_device(struct swr_device *swr_dev);
+extern int swr_slvdev_datapath_control(struct swr_device *swr_dev, u8 dev_num,
+ bool enable);
#endif /* _LINUX_SOUNDWIRE_H */