Harry Yang | 3b113a5 | 2016-12-08 12:37:40 -0800 | [diff] [blame] | 1 | /* Copyright (c) 2016-2017 The Linux Foundation. All rights reserved. |
Nicholas Troast | 34db503 | 2016-03-28 12:26:44 -0700 | [diff] [blame] | 2 | * |
| 3 | * This program is free software; you can redistribute it and/or modify |
| 4 | * it under the terms of the GNU General Public License version 2 and |
| 5 | * only version 2 as published by the Free Software Foundation. |
| 6 | * |
| 7 | * This program is distributed in the hope that it will be useful, |
| 8 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 9 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 10 | * GNU General Public License for more details. |
| 11 | */ |
| 12 | |
| 13 | #ifndef __SMB2_CHARGER_H |
| 14 | #define __SMB2_CHARGER_H |
| 15 | #include <linux/types.h> |
Subbaraman Narayanamurthy | bbd7f45 | 2017-02-06 16:22:48 -0800 | [diff] [blame] | 16 | #include <linux/interrupt.h> |
Nicholas Troast | 34db503 | 2016-03-28 12:26:44 -0700 | [diff] [blame] | 17 | #include <linux/irqreturn.h> |
| 18 | #include <linux/regulator/driver.h> |
| 19 | #include <linux/regulator/consumer.h> |
Ashay Jaiswal | 4aa2c0c | 2016-12-07 19:39:38 +0530 | [diff] [blame] | 20 | #include <linux/extcon.h> |
Nicholas Troast | 47ae461 | 2016-08-03 09:49:36 -0700 | [diff] [blame] | 21 | #include "storm-watch.h" |
Nicholas Troast | 34db503 | 2016-03-28 12:26:44 -0700 | [diff] [blame] | 22 | |
| 23 | enum print_reason { |
| 24 | PR_INTERRUPT = BIT(0), |
| 25 | PR_REGISTER = BIT(1), |
| 26 | PR_MISC = BIT(2), |
Nicholas Troast | 87d69ba | 2016-10-10 19:29:47 -0700 | [diff] [blame] | 27 | PR_PARALLEL = BIT(3), |
Nicholas Troast | b11015f | 2017-01-17 17:56:45 -0800 | [diff] [blame] | 28 | PR_OTG = BIT(4), |
Nicholas Troast | 34db503 | 2016-03-28 12:26:44 -0700 | [diff] [blame] | 29 | }; |
| 30 | |
Harry Yang | 995b742 | 2016-08-29 16:06:50 -0700 | [diff] [blame] | 31 | #define DEFAULT_VOTER "DEFAULT_VOTER" |
| 32 | #define USER_VOTER "USER_VOTER" |
| 33 | #define PD_VOTER "PD_VOTER" |
Harry Yang | 631b99e | 2016-11-17 11:24:25 -0800 | [diff] [blame] | 34 | #define DCP_VOTER "DCP_VOTER" |
Harry Yang | 4bf7d96 | 2017-03-13 16:51:43 -0700 | [diff] [blame] | 35 | #define QC_VOTER "QC_VOTER" |
Abhijeet Dharmapurikar | 7442e42 | 2017-02-08 13:35:14 -0800 | [diff] [blame] | 36 | #define PL_USBIN_USBIN_VOTER "PL_USBIN_USBIN_VOTER" |
Abhijeet Dharmapurikar | d92eca6 | 2016-10-07 19:04:33 -0700 | [diff] [blame] | 37 | #define USB_PSY_VOTER "USB_PSY_VOTER" |
Harry Yang | 995b742 | 2016-08-29 16:06:50 -0700 | [diff] [blame] | 38 | #define PL_TAPER_WORK_RUNNING_VOTER "PL_TAPER_WORK_RUNNING_VOTER" |
Harry Yang | aba1f5f | 2016-09-28 10:47:29 -0700 | [diff] [blame] | 39 | #define PL_INDIRECT_VOTER "PL_INDIRECT_VOTER" |
Harry Yang | 67f1952 | 2017-03-23 22:40:31 -0700 | [diff] [blame] | 40 | #define PL_QNOVO_VOTER "PL_QNOVO_VOTER" |
Harry Yang | aba1f5f | 2016-09-28 10:47:29 -0700 | [diff] [blame] | 41 | #define USBIN_I_VOTER "USBIN_I_VOTER" |
| 42 | #define USBIN_V_VOTER "USBIN_V_VOTER" |
Harry Yang | 995b742 | 2016-08-29 16:06:50 -0700 | [diff] [blame] | 43 | #define CHG_STATE_VOTER "CHG_STATE_VOTER" |
| 44 | #define TYPEC_SRC_VOTER "TYPEC_SRC_VOTER" |
| 45 | #define TAPER_END_VOTER "TAPER_END_VOTER" |
Harry Yang | aba1f5f | 2016-09-28 10:47:29 -0700 | [diff] [blame] | 46 | #define THERMAL_DAEMON_VOTER "THERMAL_DAEMON_VOTER" |
Abhijeet Dharmapurikar | 4b13c6e | 2016-10-05 15:15:10 -0700 | [diff] [blame] | 47 | #define CC_DETACHED_VOTER "CC_DETACHED_VOTER" |
| 48 | #define HVDCP_TIMEOUT_VOTER "HVDCP_TIMEOUT_VOTER" |
| 49 | #define PD_DISALLOWED_INDIRECT_VOTER "PD_DISALLOWED_INDIRECT_VOTER" |
Abhijeet Dharmapurikar | f8a7a4a | 2016-10-07 18:46:45 -0700 | [diff] [blame] | 50 | #define PD_HARD_RESET_VOTER "PD_HARD_RESET_VOTER" |
Abhijeet Dharmapurikar | a8075d7 | 2016-10-06 12:59:04 -0700 | [diff] [blame] | 51 | #define VBUS_CC_SHORT_VOTER "VBUS_CC_SHORT_VOTER" |
Abhijeet Dharmapurikar | 716cd96 | 2016-10-14 12:50:37 -0700 | [diff] [blame] | 52 | #define PD_INACTIVE_VOTER "PD_INACTIVE_VOTER" |
Nicholas Troast | abedaf7 | 2016-09-16 11:07:45 -0700 | [diff] [blame] | 53 | #define BOOST_BACK_VOTER "BOOST_BACK_VOTER" |
Harry Yang | a2fb0e3 | 2017-03-22 22:45:25 -0700 | [diff] [blame] | 54 | #define USBIN_USBIN_BOOST_VOTER "USBIN_USBIN_BOOST_VOTER" |
Ashay Jaiswal | 4aa2c0c | 2016-12-07 19:39:38 +0530 | [diff] [blame] | 55 | #define HVDCP_INDIRECT_VOTER "HVDCP_INDIRECT_VOTER" |
| 56 | #define MICRO_USB_VOTER "MICRO_USB_VOTER" |
Ashay Jaiswal | 2fb369d | 2017-01-12 21:38:29 +0530 | [diff] [blame] | 57 | #define DEBUG_BOARD_VOTER "DEBUG_BOARD_VOTER" |
Abhijeet Dharmapurikar | 9567087 | 2017-02-09 22:55:51 +0530 | [diff] [blame] | 58 | #define PD_SUSPEND_SUPPORTED_VOTER "PD_SUSPEND_SUPPORTED_VOTER" |
Ashay Jaiswal | c036167 | 2017-03-21 12:24:16 +0530 | [diff] [blame] | 59 | #define PL_DELAY_VOTER "PL_DELAY_VOTER" |
Nicholas Troast | e1b0c04 | 2017-02-09 10:05:03 -0800 | [diff] [blame] | 60 | #define CTM_VOTER "CTM_VOTER" |
Ashay Jaiswal | 6d308da | 2017-02-18 09:59:23 +0530 | [diff] [blame] | 61 | #define SW_QC3_VOTER "SW_QC3_VOTER" |
Nicholas Troast | 20ae191 | 2017-02-15 10:15:32 -0800 | [diff] [blame] | 62 | #define AICL_RERUN_VOTER "AICL_RERUN_VOTER" |
Nicholas Troast | f9e4499 | 2017-03-14 09:06:56 -0700 | [diff] [blame] | 63 | #define LEGACY_UNKNOWN_VOTER "LEGACY_UNKNOWN_VOTER" |
Ashay Jaiswal | 1829fcf | 2017-02-02 22:45:22 +0530 | [diff] [blame] | 64 | |
Nicholas Troast | 8995a70 | 2016-12-05 10:22:22 -0800 | [diff] [blame] | 65 | #define VCONN_MAX_ATTEMPTS 3 |
| 66 | #define OTG_MAX_ATTEMPTS 3 |
| 67 | |
Nicholas Troast | 320839e | 2016-06-03 10:18:00 -0700 | [diff] [blame] | 68 | enum smb_mode { |
| 69 | PARALLEL_MASTER = 0, |
| 70 | PARALLEL_SLAVE, |
| 71 | NUM_MODES, |
| 72 | }; |
| 73 | |
Harry Yang | 755a34b | 2016-11-01 01:18:51 -0700 | [diff] [blame] | 74 | enum cc2_sink_type { |
| 75 | CC2_SINK_NONE = 0, |
| 76 | CC2_SINK_STD, |
Harry Yang | 86e4d85 | 2016-11-07 15:08:47 -0800 | [diff] [blame] | 77 | CC2_SINK_MEDIUM_HIGH, |
Harry Yang | 755a34b | 2016-11-01 01:18:51 -0700 | [diff] [blame] | 78 | CC2_SINK_WA_DONE, |
| 79 | }; |
| 80 | |
Harry Yang | 1369b7a | 2016-09-27 15:59:50 -0700 | [diff] [blame] | 81 | enum { |
Harry Yang | 755a34b | 2016-11-01 01:18:51 -0700 | [diff] [blame] | 82 | QC_CHARGER_DETECTION_WA_BIT = BIT(0), |
| 83 | BOOST_BACK_WA = BIT(1), |
| 84 | TYPEC_CC2_REMOVAL_WA_BIT = BIT(2), |
Ashay Jaiswal | 67ec707 | 2017-02-16 14:14:58 +0530 | [diff] [blame] | 85 | QC_AUTH_INTERRUPT_WA_BIT = BIT(3), |
Ashay Jaiswal | 7c24138 | 2017-03-06 15:26:38 +0530 | [diff] [blame] | 86 | OTG_WA = BIT(4), |
Harry Yang | 1369b7a | 2016-09-27 15:59:50 -0700 | [diff] [blame] | 87 | }; |
| 88 | |
Subbaraman Narayanamurthy | bbd7f45 | 2017-02-06 16:22:48 -0800 | [diff] [blame] | 89 | enum smb_irq_index { |
| 90 | CHG_ERROR_IRQ = 0, |
| 91 | CHG_STATE_CHANGE_IRQ, |
| 92 | STEP_CHG_STATE_CHANGE_IRQ, |
| 93 | STEP_CHG_SOC_UPDATE_FAIL_IRQ, |
| 94 | STEP_CHG_SOC_UPDATE_REQ_IRQ, |
| 95 | OTG_FAIL_IRQ, |
| 96 | OTG_OVERCURRENT_IRQ, |
| 97 | OTG_OC_DIS_SW_STS_IRQ, |
| 98 | TESTMODE_CHANGE_DET_IRQ, |
| 99 | BATT_TEMP_IRQ, |
| 100 | BATT_OCP_IRQ, |
| 101 | BATT_OV_IRQ, |
| 102 | BATT_LOW_IRQ, |
| 103 | BATT_THERM_ID_MISS_IRQ, |
| 104 | BATT_TERM_MISS_IRQ, |
| 105 | USBIN_COLLAPSE_IRQ, |
| 106 | USBIN_LT_3P6V_IRQ, |
| 107 | USBIN_UV_IRQ, |
| 108 | USBIN_OV_IRQ, |
| 109 | USBIN_PLUGIN_IRQ, |
| 110 | USBIN_SRC_CHANGE_IRQ, |
| 111 | USBIN_ICL_CHANGE_IRQ, |
| 112 | TYPE_C_CHANGE_IRQ, |
| 113 | DCIN_COLLAPSE_IRQ, |
| 114 | DCIN_LT_3P6V_IRQ, |
| 115 | DCIN_UV_IRQ, |
| 116 | DCIN_OV_IRQ, |
| 117 | DCIN_PLUGIN_IRQ, |
| 118 | DIV2_EN_DG_IRQ, |
| 119 | DCIN_ICL_CHANGE_IRQ, |
| 120 | WDOG_SNARL_IRQ, |
| 121 | WDOG_BARK_IRQ, |
| 122 | AICL_FAIL_IRQ, |
| 123 | AICL_DONE_IRQ, |
| 124 | HIGH_DUTY_CYCLE_IRQ, |
| 125 | INPUT_CURRENT_LIMIT_IRQ, |
| 126 | TEMPERATURE_CHANGE_IRQ, |
| 127 | SWITCH_POWER_OK_IRQ, |
| 128 | SMB_IRQ_MAX, |
| 129 | }; |
| 130 | |
| 131 | struct smb_irq_info { |
| 132 | const char *name; |
| 133 | const irq_handler_t handler; |
| 134 | const bool wake; |
| 135 | const struct storm_watch storm_data; |
| 136 | struct smb_irq_data *irq_data; |
| 137 | int irq; |
| 138 | }; |
| 139 | |
Ashay Jaiswal | 4aa2c0c | 2016-12-07 19:39:38 +0530 | [diff] [blame] | 140 | static const unsigned int smblib_extcon_cable[] = { |
| 141 | EXTCON_USB, |
| 142 | EXTCON_USB_HOST, |
| 143 | EXTCON_NONE, |
| 144 | }; |
| 145 | |
Nicholas Troast | 34db503 | 2016-03-28 12:26:44 -0700 | [diff] [blame] | 146 | struct smb_regulator { |
| 147 | struct regulator_dev *rdev; |
| 148 | struct regulator_desc rdesc; |
| 149 | }; |
| 150 | |
| 151 | struct smb_irq_data { |
Nicholas Troast | 47ae461 | 2016-08-03 09:49:36 -0700 | [diff] [blame] | 152 | void *parent_data; |
| 153 | const char *name; |
| 154 | struct storm_watch storm_data; |
Nicholas Troast | 34db503 | 2016-03-28 12:26:44 -0700 | [diff] [blame] | 155 | }; |
| 156 | |
| 157 | struct smb_chg_param { |
| 158 | const char *name; |
| 159 | u16 reg; |
| 160 | int min_u; |
| 161 | int max_u; |
| 162 | int step_u; |
Harry Yang | f8b4125 | 2016-08-10 14:21:10 -0700 | [diff] [blame] | 163 | int (*get_proc)(struct smb_chg_param *param, |
| 164 | u8 val_raw); |
| 165 | int (*set_proc)(struct smb_chg_param *param, |
| 166 | int val_u, |
| 167 | u8 *val_raw); |
Nicholas Troast | 34db503 | 2016-03-28 12:26:44 -0700 | [diff] [blame] | 168 | }; |
| 169 | |
Anirudh Ghayal | 4da3df9 | 2017-01-25 18:55:57 +0530 | [diff] [blame] | 170 | struct smb_chg_freq { |
| 171 | unsigned int freq_5V; |
| 172 | unsigned int freq_6V_8V; |
| 173 | unsigned int freq_9V; |
| 174 | unsigned int freq_12V; |
| 175 | unsigned int freq_removal; |
| 176 | unsigned int freq_below_otg_threshold; |
| 177 | unsigned int freq_above_otg_threshold; |
| 178 | }; |
| 179 | |
Nicholas Troast | 34db503 | 2016-03-28 12:26:44 -0700 | [diff] [blame] | 180 | struct smb_params { |
| 181 | struct smb_chg_param fcc; |
| 182 | struct smb_chg_param fv; |
| 183 | struct smb_chg_param usb_icl; |
Harry Yang | 1d1034c | 2016-06-15 12:09:42 -0700 | [diff] [blame] | 184 | struct smb_chg_param icl_stat; |
Harry Yang | 360bd53 | 2016-09-26 11:03:22 -0700 | [diff] [blame] | 185 | struct smb_chg_param otg_cl; |
Nicholas Troast | 34db503 | 2016-03-28 12:26:44 -0700 | [diff] [blame] | 186 | struct smb_chg_param dc_icl; |
Abhijeet Dharmapurikar | 5cf5faf | 2016-06-21 14:20:24 -0700 | [diff] [blame] | 187 | struct smb_chg_param dc_icl_pt_lv; |
| 188 | struct smb_chg_param dc_icl_pt_hv; |
| 189 | struct smb_chg_param dc_icl_div2_lv; |
| 190 | struct smb_chg_param dc_icl_div2_mid_lv; |
| 191 | struct smb_chg_param dc_icl_div2_mid_hv; |
| 192 | struct smb_chg_param dc_icl_div2_hv; |
Abhijeet Dharmapurikar | 2644cd6 | 2016-07-20 16:54:55 -0700 | [diff] [blame] | 193 | struct smb_chg_param jeita_cc_comp; |
Harry Yang | fe91384 | 2016-08-10 12:27:28 -0700 | [diff] [blame] | 194 | struct smb_chg_param step_soc_threshold[4]; |
| 195 | struct smb_chg_param step_soc; |
| 196 | struct smb_chg_param step_cc_delta[5]; |
Harry Yang | f6df8b0 | 2016-10-05 15:38:03 -0700 | [diff] [blame] | 197 | struct smb_chg_param freq_buck; |
Harry Yang | d89ff1f | 2016-12-05 14:59:11 -0800 | [diff] [blame] | 198 | struct smb_chg_param freq_boost; |
Nicholas Troast | 34db503 | 2016-03-28 12:26:44 -0700 | [diff] [blame] | 199 | }; |
| 200 | |
Harry Yang | 1d1034c | 2016-06-15 12:09:42 -0700 | [diff] [blame] | 201 | struct parallel_params { |
| 202 | struct power_supply *psy; |
Harry Yang | 1d1034c | 2016-06-15 12:09:42 -0700 | [diff] [blame] | 203 | }; |
| 204 | |
Harry Yang | ba874ce | 2016-08-19 14:17:01 -0700 | [diff] [blame] | 205 | struct smb_iio { |
| 206 | struct iio_channel *temp_chan; |
| 207 | struct iio_channel *temp_max_chan; |
| 208 | struct iio_channel *usbin_i_chan; |
| 209 | struct iio_channel *usbin_v_chan; |
Nicholas Troast | 7dbcad2 | 2016-10-05 13:30:18 -0700 | [diff] [blame] | 210 | struct iio_channel *batt_i_chan; |
Nicholas Troast | c8434ac | 2017-02-14 16:11:56 -0800 | [diff] [blame] | 211 | struct iio_channel *connector_temp_chan; |
Nicholas Troast | ae0ea54 | 2017-01-31 19:23:10 -0800 | [diff] [blame] | 212 | struct iio_channel *connector_temp_thr1_chan; |
| 213 | struct iio_channel *connector_temp_thr2_chan; |
| 214 | struct iio_channel *connector_temp_thr3_chan; |
Harry Yang | ba874ce | 2016-08-19 14:17:01 -0700 | [diff] [blame] | 215 | }; |
| 216 | |
Harry Yang | 5e2bb71 | 2016-10-18 16:47:48 -0700 | [diff] [blame] | 217 | struct reg_info { |
| 218 | u16 reg; |
| 219 | u8 mask; |
| 220 | u8 val; |
| 221 | u8 bak; |
| 222 | const char *desc; |
| 223 | }; |
| 224 | |
Nicholas Troast | 34db503 | 2016-03-28 12:26:44 -0700 | [diff] [blame] | 225 | struct smb_charger { |
| 226 | struct device *dev; |
Abhijeet Dharmapurikar | 31b98f3 | 2016-10-14 12:25:23 -0700 | [diff] [blame] | 227 | char *name; |
Nicholas Troast | 34db503 | 2016-03-28 12:26:44 -0700 | [diff] [blame] | 228 | struct regmap *regmap; |
Subbaraman Narayanamurthy | bbd7f45 | 2017-02-06 16:22:48 -0800 | [diff] [blame] | 229 | struct smb_irq_info *irq_info; |
Nicholas Troast | 34db503 | 2016-03-28 12:26:44 -0700 | [diff] [blame] | 230 | struct smb_params param; |
Harry Yang | ba874ce | 2016-08-19 14:17:01 -0700 | [diff] [blame] | 231 | struct smb_iio iio; |
Nicholas Troast | 34db503 | 2016-03-28 12:26:44 -0700 | [diff] [blame] | 232 | int *debug_mask; |
Nicholas Troast | 320839e | 2016-06-03 10:18:00 -0700 | [diff] [blame] | 233 | enum smb_mode mode; |
Nicholas Troast | 8995a70 | 2016-12-05 10:22:22 -0800 | [diff] [blame] | 234 | bool external_vconn; |
Anirudh Ghayal | 4da3df9 | 2017-01-25 18:55:57 +0530 | [diff] [blame] | 235 | struct smb_chg_freq chg_freq; |
Abhijeet Dharmapurikar | 7442e42 | 2017-02-08 13:35:14 -0800 | [diff] [blame] | 236 | int smb_version; |
Nicholas Troast | 34db503 | 2016-03-28 12:26:44 -0700 | [diff] [blame] | 237 | |
| 238 | /* locks */ |
Harry Yang | bacd222 | 2016-05-11 16:43:51 -0700 | [diff] [blame] | 239 | struct mutex write_lock; |
Nicholas Troast | 34db503 | 2016-03-28 12:26:44 -0700 | [diff] [blame] | 240 | struct mutex ps_change_lock; |
Nicholas Troast | b11015f | 2017-01-17 17:56:45 -0800 | [diff] [blame] | 241 | struct mutex otg_oc_lock; |
Nicholas Troast | 34db503 | 2016-03-28 12:26:44 -0700 | [diff] [blame] | 242 | |
| 243 | /* power supplies */ |
| 244 | struct power_supply *batt_psy; |
| 245 | struct power_supply *usb_psy; |
Harry Yang | f302359 | 2016-07-20 14:56:41 -0700 | [diff] [blame] | 246 | struct power_supply *dc_psy; |
Harry Yang | 5e1a522 | 2016-07-26 15:16:04 -0700 | [diff] [blame] | 247 | struct power_supply *bms_psy; |
Nicholas Troast | 34db503 | 2016-03-28 12:26:44 -0700 | [diff] [blame] | 248 | struct power_supply_desc usb_psy_desc; |
Abhijeet Dharmapurikar | a8bd6f0 | 2017-01-30 15:43:04 -0800 | [diff] [blame] | 249 | struct power_supply *usb_main_psy; |
Nicholas Troast | 34db503 | 2016-03-28 12:26:44 -0700 | [diff] [blame] | 250 | |
Harry Yang | 5e1a522 | 2016-07-26 15:16:04 -0700 | [diff] [blame] | 251 | /* notifiers */ |
| 252 | struct notifier_block nb; |
| 253 | |
Harry Yang | 1d1034c | 2016-06-15 12:09:42 -0700 | [diff] [blame] | 254 | /* parallel charging */ |
| 255 | struct parallel_params pl; |
| 256 | |
Nicholas Troast | 34db503 | 2016-03-28 12:26:44 -0700 | [diff] [blame] | 257 | /* regulators */ |
| 258 | struct smb_regulator *vbus_vreg; |
| 259 | struct smb_regulator *vconn_vreg; |
| 260 | struct regulator *dpdm_reg; |
| 261 | |
| 262 | /* votables */ |
Nicholas Troast | 34db503 | 2016-03-28 12:26:44 -0700 | [diff] [blame] | 263 | struct votable *dc_suspend_votable; |
| 264 | struct votable *fcc_votable; |
Abhijeet Dharmapurikar | f9805d4 | 2016-05-17 18:38:42 -0700 | [diff] [blame] | 265 | struct votable *fv_votable; |
Nicholas Troast | 34db503 | 2016-03-28 12:26:44 -0700 | [diff] [blame] | 266 | struct votable *usb_icl_votable; |
| 267 | struct votable *dc_icl_votable; |
Abhijeet Dharmapurikar | 4b13c6e | 2016-10-05 15:15:10 -0700 | [diff] [blame] | 268 | struct votable *pd_disallowed_votable_indirect; |
Nicholas Troast | 34db503 | 2016-03-28 12:26:44 -0700 | [diff] [blame] | 269 | struct votable *pd_allowed_votable; |
Harry Yang | 1d1034c | 2016-06-15 12:09:42 -0700 | [diff] [blame] | 270 | struct votable *awake_votable; |
| 271 | struct votable *pl_disable_votable; |
Abhijeet Dharmapurikar | ee54de0 | 2016-07-08 14:51:47 -0700 | [diff] [blame] | 272 | struct votable *chg_disable_votable; |
Harry Yang | aba1f5f | 2016-09-28 10:47:29 -0700 | [diff] [blame] | 273 | struct votable *pl_enable_votable_indirect; |
Ashay Jaiswal | 4aa2c0c | 2016-12-07 19:39:38 +0530 | [diff] [blame] | 274 | struct votable *hvdcp_disable_votable_indirect; |
| 275 | struct votable *hvdcp_enable_votable; |
Abhijeet Dharmapurikar | f8a7a4a | 2016-10-07 18:46:45 -0700 | [diff] [blame] | 276 | struct votable *apsd_disable_votable; |
Ashay Jaiswal | 6d308da | 2017-02-18 09:59:23 +0530 | [diff] [blame] | 277 | struct votable *hvdcp_hw_inov_dis_votable; |
Harry Yang | 4bf7d96 | 2017-03-13 16:51:43 -0700 | [diff] [blame] | 278 | struct votable *usb_irq_enable_votable; |
Nicholas Troast | 34db503 | 2016-03-28 12:26:44 -0700 | [diff] [blame] | 279 | |
| 280 | /* work */ |
Harry Yang | 5e1a522 | 2016-07-26 15:16:04 -0700 | [diff] [blame] | 281 | struct work_struct bms_update_work; |
Harry Yang | 755a34b | 2016-11-01 01:18:51 -0700 | [diff] [blame] | 282 | struct work_struct rdstd_cc2_detach_work; |
Nicholas Troast | 34db503 | 2016-03-28 12:26:44 -0700 | [diff] [blame] | 283 | struct delayed_work hvdcp_detect_work; |
| 284 | struct delayed_work ps_change_timeout_work; |
Harry Yang | fe91384 | 2016-08-10 12:27:28 -0700 | [diff] [blame] | 285 | struct delayed_work step_soc_req_work; |
Abhijeet Dharmapurikar | 0e36900 | 2016-09-07 17:25:36 -0700 | [diff] [blame] | 286 | struct delayed_work clear_hdc_work; |
Nicholas Troast | b11015f | 2017-01-17 17:56:45 -0800 | [diff] [blame] | 287 | struct work_struct otg_oc_work; |
| 288 | struct work_struct vconn_oc_work; |
| 289 | struct delayed_work otg_ss_done_work; |
Ashay Jaiswal | 4d82578 | 2017-02-18 10:11:34 +0530 | [diff] [blame] | 290 | struct delayed_work icl_change_work; |
Ashay Jaiswal | c036167 | 2017-03-21 12:24:16 +0530 | [diff] [blame] | 291 | struct delayed_work pl_enable_work; |
Nicholas Troast | 34db503 | 2016-03-28 12:26:44 -0700 | [diff] [blame] | 292 | |
| 293 | /* cached status */ |
| 294 | int voltage_min_uv; |
| 295 | int voltage_max_uv; |
Abhijeet Dharmapurikar | 76e2af5 | 2016-10-06 17:25:01 -0700 | [diff] [blame] | 296 | int pd_active; |
Abhijeet Dharmapurikar | d92eca6 | 2016-10-07 19:04:33 -0700 | [diff] [blame] | 297 | bool system_suspend_supported; |
Harry Yang | d89ff1f | 2016-12-05 14:59:11 -0800 | [diff] [blame] | 298 | int boost_threshold_ua; |
Abhijeet Dharmapurikar | 99fb894 | 2016-07-08 11:39:23 -0700 | [diff] [blame] | 299 | int system_temp_level; |
| 300 | int thermal_levels; |
| 301 | int *thermal_mitigation; |
Harry Yang | 631b99e | 2016-11-17 11:24:25 -0800 | [diff] [blame] | 302 | int dcp_icl_ua; |
Abhijeet Dharmapurikar | 9e7e48c | 2016-08-23 12:55:49 -0700 | [diff] [blame] | 303 | int fake_capacity; |
Harry Yang | fe91384 | 2016-08-10 12:27:28 -0700 | [diff] [blame] | 304 | bool step_chg_enabled; |
Abhijeet Dharmapurikar | 0e36900 | 2016-09-07 17:25:36 -0700 | [diff] [blame] | 305 | bool is_hdc; |
Subbaraman Narayanamurthy | 270a265 | 2016-10-04 17:08:42 -0700 | [diff] [blame] | 306 | bool chg_done; |
Ashay Jaiswal | 4aa2c0c | 2016-12-07 19:39:38 +0530 | [diff] [blame] | 307 | bool micro_usb_mode; |
Nicholas Troast | 8995a70 | 2016-12-05 10:22:22 -0800 | [diff] [blame] | 308 | bool otg_en; |
| 309 | bool vconn_en; |
Ashay Jaiswal | da8669b | 2017-02-10 23:24:23 +0530 | [diff] [blame] | 310 | bool suspend_input_on_debug_batt; |
Nicholas Troast | 8995a70 | 2016-12-05 10:22:22 -0800 | [diff] [blame] | 311 | int otg_attempts; |
| 312 | int vconn_attempts; |
Abhijeet Dharmapurikar | 7442e42 | 2017-02-08 13:35:14 -0800 | [diff] [blame] | 313 | int default_icl_ua; |
Ashay Jaiswal | 7c24138 | 2017-03-06 15:26:38 +0530 | [diff] [blame] | 314 | int otg_cl_ua; |
Harry Yang | f725198 | 2016-09-16 11:14:49 -0700 | [diff] [blame] | 315 | |
| 316 | /* workaround flag */ |
| 317 | u32 wa_flags; |
Harry Yang | 755a34b | 2016-11-01 01:18:51 -0700 | [diff] [blame] | 318 | enum cc2_sink_type cc2_sink_detach_flag; |
Harry Yang | d89ff1f | 2016-12-05 14:59:11 -0800 | [diff] [blame] | 319 | int boost_current_ua; |
Harry Yang | e8e38ce | 2017-03-09 11:22:44 -0800 | [diff] [blame] | 320 | int temp_speed_reading_count; |
Ashay Jaiswal | 4aa2c0c | 2016-12-07 19:39:38 +0530 | [diff] [blame] | 321 | |
| 322 | /* extcon for VBUS / ID notification to USB for uUSB */ |
| 323 | struct extcon_dev *extcon; |
Abhijeet Dharmapurikar | a8bd6f0 | 2017-01-30 15:43:04 -0800 | [diff] [blame] | 324 | |
Harry Yang | 603e380 | 2017-02-09 17:45:12 -0800 | [diff] [blame] | 325 | /* qnovo */ |
| 326 | int qnovo_fcc_ua; |
| 327 | int qnovo_fv_uv; |
Ashay Jaiswal | 6d308da | 2017-02-18 09:59:23 +0530 | [diff] [blame] | 328 | int usb_icl_delta_ua; |
| 329 | int pulse_cnt; |
Nicholas Troast | 34db503 | 2016-03-28 12:26:44 -0700 | [diff] [blame] | 330 | }; |
| 331 | |
| 332 | int smblib_read(struct smb_charger *chg, u16 addr, u8 *val); |
| 333 | int smblib_masked_write(struct smb_charger *chg, u16 addr, u8 mask, u8 val); |
| 334 | int smblib_write(struct smb_charger *chg, u16 addr, u8 val); |
| 335 | |
Nicholas Troast | 4c31049 | 2016-05-12 17:56:35 -0700 | [diff] [blame] | 336 | int smblib_get_charge_param(struct smb_charger *chg, |
| 337 | struct smb_chg_param *param, int *val_u); |
| 338 | int smblib_get_usb_suspend(struct smb_charger *chg, int *suspend); |
| 339 | |
Nicholas Troast | 34db503 | 2016-03-28 12:26:44 -0700 | [diff] [blame] | 340 | int smblib_enable_charging(struct smb_charger *chg, bool enable); |
Nicholas Troast | 4c31049 | 2016-05-12 17:56:35 -0700 | [diff] [blame] | 341 | int smblib_set_charge_param(struct smb_charger *chg, |
| 342 | struct smb_chg_param *param, int val_u); |
| 343 | int smblib_set_usb_suspend(struct smb_charger *chg, bool suspend); |
| 344 | int smblib_set_dc_suspend(struct smb_charger *chg, bool suspend); |
Nicholas Troast | 34db503 | 2016-03-28 12:26:44 -0700 | [diff] [blame] | 345 | |
Harry Yang | fe91384 | 2016-08-10 12:27:28 -0700 | [diff] [blame] | 346 | int smblib_mapping_soc_from_field_value(struct smb_chg_param *param, |
| 347 | int val_u, u8 *val_raw); |
| 348 | int smblib_mapping_cc_delta_to_field_value(struct smb_chg_param *param, |
| 349 | u8 val_raw); |
| 350 | int smblib_mapping_cc_delta_from_field_value(struct smb_chg_param *param, |
| 351 | int val_u, u8 *val_raw); |
Anirudh Ghayal | 4da3df9 | 2017-01-25 18:55:57 +0530 | [diff] [blame] | 352 | int smblib_set_chg_freq(struct smb_chg_param *param, |
| 353 | int val_u, u8 *val_raw); |
Harry Yang | fe91384 | 2016-08-10 12:27:28 -0700 | [diff] [blame] | 354 | |
Nicholas Troast | 34db503 | 2016-03-28 12:26:44 -0700 | [diff] [blame] | 355 | int smblib_vbus_regulator_enable(struct regulator_dev *rdev); |
| 356 | int smblib_vbus_regulator_disable(struct regulator_dev *rdev); |
| 357 | int smblib_vbus_regulator_is_enabled(struct regulator_dev *rdev); |
| 358 | |
| 359 | int smblib_vconn_regulator_enable(struct regulator_dev *rdev); |
| 360 | int smblib_vconn_regulator_disable(struct regulator_dev *rdev); |
| 361 | int smblib_vconn_regulator_is_enabled(struct regulator_dev *rdev); |
| 362 | |
| 363 | irqreturn_t smblib_handle_debug(int irq, void *data); |
Nicholas Troast | 8995a70 | 2016-12-05 10:22:22 -0800 | [diff] [blame] | 364 | irqreturn_t smblib_handle_otg_overcurrent(int irq, void *data); |
Harry Yang | 6fe72ab | 2016-06-14 16:21:39 -0700 | [diff] [blame] | 365 | irqreturn_t smblib_handle_chg_state_change(int irq, void *data); |
Harry Yang | fe91384 | 2016-08-10 12:27:28 -0700 | [diff] [blame] | 366 | irqreturn_t smblib_handle_step_chg_state_change(int irq, void *data); |
| 367 | irqreturn_t smblib_handle_step_chg_soc_update_fail(int irq, void *data); |
| 368 | irqreturn_t smblib_handle_step_chg_soc_update_request(int irq, void *data); |
Abhijeet Dharmapurikar | 2644cd6 | 2016-07-20 16:54:55 -0700 | [diff] [blame] | 369 | irqreturn_t smblib_handle_batt_temp_changed(int irq, void *data); |
Nicholas Troast | 34db503 | 2016-03-28 12:26:44 -0700 | [diff] [blame] | 370 | irqreturn_t smblib_handle_batt_psy_changed(int irq, void *data); |
| 371 | irqreturn_t smblib_handle_usb_psy_changed(int irq, void *data); |
Subbaraman Narayanamurthy | 0932748 | 2017-02-06 16:33:12 -0800 | [diff] [blame] | 372 | irqreturn_t smblib_handle_usbin_uv(int irq, void *data); |
Nicholas Troast | 34db503 | 2016-03-28 12:26:44 -0700 | [diff] [blame] | 373 | irqreturn_t smblib_handle_usb_plugin(int irq, void *data); |
| 374 | irqreturn_t smblib_handle_usb_source_change(int irq, void *data); |
Harry Yang | 6fe72ab | 2016-06-14 16:21:39 -0700 | [diff] [blame] | 375 | irqreturn_t smblib_handle_icl_change(int irq, void *data); |
Nicholas Troast | 34db503 | 2016-03-28 12:26:44 -0700 | [diff] [blame] | 376 | irqreturn_t smblib_handle_usb_typec_change(int irq, void *data); |
Abhijeet Dharmapurikar | 2391664 | 2016-10-03 10:38:50 -0700 | [diff] [blame] | 377 | irqreturn_t smblib_handle_dc_plugin(int irq, void *data); |
Abhijeet Dharmapurikar | 0e36900 | 2016-09-07 17:25:36 -0700 | [diff] [blame] | 378 | irqreturn_t smblib_handle_high_duty_cycle(int irq, void *data); |
Nicholas Troast | abedaf7 | 2016-09-16 11:07:45 -0700 | [diff] [blame] | 379 | irqreturn_t smblib_handle_switcher_power_ok(int irq, void *data); |
Nicholas Troast | 15dc0c8 | 2016-10-18 15:15:21 -0700 | [diff] [blame] | 380 | irqreturn_t smblib_handle_wdog_bark(int irq, void *data); |
Nicholas Troast | 34db503 | 2016-03-28 12:26:44 -0700 | [diff] [blame] | 381 | |
| 382 | int smblib_get_prop_input_suspend(struct smb_charger *chg, |
| 383 | union power_supply_propval *val); |
| 384 | int smblib_get_prop_batt_present(struct smb_charger *chg, |
| 385 | union power_supply_propval *val); |
| 386 | int smblib_get_prop_batt_capacity(struct smb_charger *chg, |
| 387 | union power_supply_propval *val); |
| 388 | int smblib_get_prop_batt_status(struct smb_charger *chg, |
| 389 | union power_supply_propval *val); |
| 390 | int smblib_get_prop_batt_charge_type(struct smb_charger *chg, |
| 391 | union power_supply_propval *val); |
Subbaraman Narayanamurthy | b491d02 | 2016-10-10 20:22:48 -0700 | [diff] [blame] | 392 | int smblib_get_prop_batt_charge_done(struct smb_charger *chg, |
| 393 | union power_supply_propval *val); |
Nicholas Troast | 34db503 | 2016-03-28 12:26:44 -0700 | [diff] [blame] | 394 | int smblib_get_prop_batt_health(struct smb_charger *chg, |
| 395 | union power_supply_propval *val); |
Abhijeet Dharmapurikar | 99fb894 | 2016-07-08 11:39:23 -0700 | [diff] [blame] | 396 | int smblib_get_prop_system_temp_level(struct smb_charger *chg, |
| 397 | union power_supply_propval *val); |
Abhijeet Dharmapurikar | 0e36900 | 2016-09-07 17:25:36 -0700 | [diff] [blame] | 398 | int smblib_get_prop_input_current_limited(struct smb_charger *chg, |
| 399 | union power_supply_propval *val); |
Nicholas Troast | 66b21d7 | 2016-09-20 15:33:20 -0700 | [diff] [blame] | 400 | int smblib_get_prop_batt_voltage_now(struct smb_charger *chg, |
| 401 | union power_supply_propval *val); |
| 402 | int smblib_get_prop_batt_current_now(struct smb_charger *chg, |
| 403 | union power_supply_propval *val); |
| 404 | int smblib_get_prop_batt_temp(struct smb_charger *chg, |
| 405 | union power_supply_propval *val); |
Harry Yang | bedee33 | 2016-08-31 16:14:29 -0700 | [diff] [blame] | 406 | int smblib_get_prop_step_chg_step(struct smb_charger *chg, |
| 407 | union power_supply_propval *val); |
Abhijeet Dharmapurikar | 99fb894 | 2016-07-08 11:39:23 -0700 | [diff] [blame] | 408 | |
Nicholas Troast | 34db503 | 2016-03-28 12:26:44 -0700 | [diff] [blame] | 409 | int smblib_set_prop_input_suspend(struct smb_charger *chg, |
| 410 | const union power_supply_propval *val); |
Abhijeet Dharmapurikar | 9e7e48c | 2016-08-23 12:55:49 -0700 | [diff] [blame] | 411 | int smblib_set_prop_batt_capacity(struct smb_charger *chg, |
| 412 | const union power_supply_propval *val); |
Abhijeet Dharmapurikar | 99fb894 | 2016-07-08 11:39:23 -0700 | [diff] [blame] | 413 | int smblib_set_prop_system_temp_level(struct smb_charger *chg, |
| 414 | const union power_supply_propval *val); |
Nicholas Troast | 34db503 | 2016-03-28 12:26:44 -0700 | [diff] [blame] | 415 | |
Harry Yang | f302359 | 2016-07-20 14:56:41 -0700 | [diff] [blame] | 416 | int smblib_get_prop_dc_present(struct smb_charger *chg, |
| 417 | union power_supply_propval *val); |
| 418 | int smblib_get_prop_dc_online(struct smb_charger *chg, |
| 419 | union power_supply_propval *val); |
| 420 | int smblib_get_prop_dc_current_max(struct smb_charger *chg, |
| 421 | union power_supply_propval *val); |
| 422 | int smblib_set_prop_dc_current_max(struct smb_charger *chg, |
| 423 | const union power_supply_propval *val); |
| 424 | |
Nicholas Troast | 34db503 | 2016-03-28 12:26:44 -0700 | [diff] [blame] | 425 | int smblib_get_prop_usb_present(struct smb_charger *chg, |
| 426 | union power_supply_propval *val); |
| 427 | int smblib_get_prop_usb_online(struct smb_charger *chg, |
| 428 | union power_supply_propval *val); |
| 429 | int smblib_get_prop_usb_suspend(struct smb_charger *chg, |
| 430 | union power_supply_propval *val); |
| 431 | int smblib_get_prop_usb_voltage_now(struct smb_charger *chg, |
| 432 | union power_supply_propval *val); |
Abhijeet Dharmapurikar | d92eca6 | 2016-10-07 19:04:33 -0700 | [diff] [blame] | 433 | int smblib_get_prop_pd_current_max(struct smb_charger *chg, |
| 434 | union power_supply_propval *val); |
Nicholas Troast | 34db503 | 2016-03-28 12:26:44 -0700 | [diff] [blame] | 435 | int smblib_get_prop_usb_current_max(struct smb_charger *chg, |
| 436 | union power_supply_propval *val); |
Harry Yang | ba874ce | 2016-08-19 14:17:01 -0700 | [diff] [blame] | 437 | int smblib_get_prop_usb_current_now(struct smb_charger *chg, |
| 438 | union power_supply_propval *val); |
Nicholas Troast | 34db503 | 2016-03-28 12:26:44 -0700 | [diff] [blame] | 439 | int smblib_get_prop_typec_cc_orientation(struct smb_charger *chg, |
| 440 | union power_supply_propval *val); |
| 441 | int smblib_get_prop_typec_mode(struct smb_charger *chg, |
| 442 | union power_supply_propval *val); |
| 443 | int smblib_get_prop_typec_power_role(struct smb_charger *chg, |
| 444 | union power_supply_propval *val); |
| 445 | int smblib_get_prop_pd_allowed(struct smb_charger *chg, |
| 446 | union power_supply_propval *val); |
Nicholas Troast | 133a7f5 | 2016-06-29 13:48:20 -0700 | [diff] [blame] | 447 | int smblib_get_prop_input_current_settled(struct smb_charger *chg, |
| 448 | union power_supply_propval *val); |
Fenglin Wu | ef4730e | 2017-01-11 18:16:25 +0800 | [diff] [blame] | 449 | int smblib_get_prop_input_voltage_settled(struct smb_charger *chg, |
| 450 | union power_supply_propval *val); |
Abhijeet Dharmapurikar | f8a7a4a | 2016-10-07 18:46:45 -0700 | [diff] [blame] | 451 | int smblib_get_prop_pd_in_hard_reset(struct smb_charger *chg, |
| 452 | union power_supply_propval *val); |
Abhijeet Dharmapurikar | b959887 | 2016-10-17 16:58:58 -0700 | [diff] [blame] | 453 | int smblib_get_pe_start(struct smb_charger *chg, |
| 454 | union power_supply_propval *val); |
Harry Yang | ba874ce | 2016-08-19 14:17:01 -0700 | [diff] [blame] | 455 | int smblib_get_prop_charger_temp(struct smb_charger *chg, |
| 456 | union power_supply_propval *val); |
| 457 | int smblib_get_prop_charger_temp_max(struct smb_charger *chg, |
| 458 | union power_supply_propval *val); |
Nicholas Troast | 7fdbd2e | 2017-02-08 10:47:37 -0800 | [diff] [blame] | 459 | int smblib_get_prop_die_health(struct smb_charger *chg, |
Nicholas Troast | b021dd9 | 2017-01-31 18:43:38 -0800 | [diff] [blame] | 460 | union power_supply_propval *val); |
Harry Yang | 40192cb | 2017-02-25 23:25:17 -0800 | [diff] [blame] | 461 | int smblib_get_prop_charge_qnovo_enable(struct smb_charger *chg, |
| 462 | union power_supply_propval *val); |
Abhijeet Dharmapurikar | d92eca6 | 2016-10-07 19:04:33 -0700 | [diff] [blame] | 463 | int smblib_set_prop_pd_current_max(struct smb_charger *chg, |
| 464 | const union power_supply_propval *val); |
Nicholas Troast | 34db503 | 2016-03-28 12:26:44 -0700 | [diff] [blame] | 465 | int smblib_set_prop_usb_current_max(struct smb_charger *chg, |
| 466 | const union power_supply_propval *val); |
| 467 | int smblib_set_prop_usb_voltage_min(struct smb_charger *chg, |
| 468 | const union power_supply_propval *val); |
| 469 | int smblib_set_prop_usb_voltage_max(struct smb_charger *chg, |
| 470 | const union power_supply_propval *val); |
Harry Yang | d89ff1f | 2016-12-05 14:59:11 -0800 | [diff] [blame] | 471 | int smblib_set_prop_boost_current(struct smb_charger *chg, |
| 472 | const union power_supply_propval *val); |
Nicholas Troast | 34db503 | 2016-03-28 12:26:44 -0700 | [diff] [blame] | 473 | int smblib_set_prop_typec_power_role(struct smb_charger *chg, |
| 474 | const union power_supply_propval *val); |
| 475 | int smblib_set_prop_pd_active(struct smb_charger *chg, |
| 476 | const union power_supply_propval *val); |
Abhijeet Dharmapurikar | f8a7a4a | 2016-10-07 18:46:45 -0700 | [diff] [blame] | 477 | int smblib_set_prop_pd_in_hard_reset(struct smb_charger *chg, |
| 478 | const union power_supply_propval *val); |
Nicholas Troast | 7dbcad2 | 2016-10-05 13:30:18 -0700 | [diff] [blame] | 479 | int smblib_get_prop_slave_current_now(struct smb_charger *chg, |
| 480 | union power_supply_propval *val); |
Fenglin Wu | edd7079 | 2016-11-22 13:16:19 +0800 | [diff] [blame] | 481 | int smblib_set_prop_ship_mode(struct smb_charger *chg, |
| 482 | const union power_supply_propval *val); |
Harry Yang | 40192cb | 2017-02-25 23:25:17 -0800 | [diff] [blame] | 483 | int smblib_set_prop_charge_qnovo_enable(struct smb_charger *chg, |
| 484 | const union power_supply_propval *val); |
Ashay Jaiswal | 2fb369d | 2017-01-12 21:38:29 +0530 | [diff] [blame] | 485 | void smblib_suspend_on_debug_battery(struct smb_charger *chg); |
Abhijeet Dharmapurikar | 9dd6129 | 2017-01-25 16:40:08 -0800 | [diff] [blame] | 486 | int smblib_rerun_apsd_if_required(struct smb_charger *chg); |
Abhijeet Dharmapurikar | a8bd6f0 | 2017-01-30 15:43:04 -0800 | [diff] [blame] | 487 | int smblib_get_prop_fcc_delta(struct smb_charger *chg, |
| 488 | union power_supply_propval *val); |
Abhijeet Dharmapurikar | 74021fc | 2017-02-06 18:39:19 -0800 | [diff] [blame] | 489 | int smblib_icl_override(struct smb_charger *chg, bool override); |
Ashay Jaiswal | 6d308da | 2017-02-18 09:59:23 +0530 | [diff] [blame] | 490 | int smblib_dp_dm(struct smb_charger *chg, int val); |
| 491 | int smblib_rerun_aicl(struct smb_charger *chg); |
Ashay Jaiswal | ae1586d | 2017-03-22 23:18:51 +0530 | [diff] [blame] | 492 | int smblib_set_icl_current(struct smb_charger *chg, int icl_ua); |
Abhijeet Dharmapurikar | f59c835 | 2017-03-23 14:04:05 -0700 | [diff] [blame^] | 493 | int smblib_get_charge_current(struct smb_charger *chg, int *total_current_ua); |
Nicholas Troast | 7dbcad2 | 2016-10-05 13:30:18 -0700 | [diff] [blame] | 494 | |
Nicholas Troast | 34db503 | 2016-03-28 12:26:44 -0700 | [diff] [blame] | 495 | int smblib_init(struct smb_charger *chg); |
Abhijeet Dharmapurikar | 8e9e757 | 2016-06-06 16:13:14 -0700 | [diff] [blame] | 496 | int smblib_deinit(struct smb_charger *chg); |
Nicholas Troast | 34db503 | 2016-03-28 12:26:44 -0700 | [diff] [blame] | 497 | #endif /* __SMB2_CHARGER_H */ |