blob: 39cc92129d421d32e1a3a7a2f8aab0eac0fd80b2 [file] [log] [blame]
Harry Yang4b7db0f2017-11-27 10:50:44 -08001/* Copyright (c) 2018 The Linux Foundation. All rights reserved.
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 __SMB5_CHARGER_H
14#define __SMB5_CHARGER_H
15#include <linux/types.h>
16#include <linux/interrupt.h>
17#include <linux/irqreturn.h>
18#include <linux/regulator/driver.h>
19#include <linux/regulator/consumer.h>
20#include <linux/extcon.h>
21#include "storm-watch.h"
22
23enum print_reason {
24 PR_INTERRUPT = BIT(0),
25 PR_REGISTER = BIT(1),
26 PR_MISC = BIT(2),
27 PR_PARALLEL = BIT(3),
28 PR_OTG = BIT(4),
29};
30
31#define DEFAULT_VOTER "DEFAULT_VOTER"
32#define USER_VOTER "USER_VOTER"
33#define PD_VOTER "PD_VOTER"
34#define DCP_VOTER "DCP_VOTER"
35#define QC_VOTER "QC_VOTER"
36#define PL_USBIN_USBIN_VOTER "PL_USBIN_USBIN_VOTER"
37#define USB_PSY_VOTER "USB_PSY_VOTER"
38#define PL_TAPER_WORK_RUNNING_VOTER "PL_TAPER_WORK_RUNNING_VOTER"
39#define PL_QNOVO_VOTER "PL_QNOVO_VOTER"
40#define USBIN_V_VOTER "USBIN_V_VOTER"
41#define CHG_STATE_VOTER "CHG_STATE_VOTER"
42#define TYPEC_SRC_VOTER "TYPEC_SRC_VOTER"
43#define TAPER_END_VOTER "TAPER_END_VOTER"
44#define THERMAL_DAEMON_VOTER "THERMAL_DAEMON_VOTER"
45#define CC_DETACHED_VOTER "CC_DETACHED_VOTER"
46#define APSD_VOTER "APSD_VOTER"
47#define PD_DISALLOWED_INDIRECT_VOTER "PD_DISALLOWED_INDIRECT_VOTER"
48#define VBUS_CC_SHORT_VOTER "VBUS_CC_SHORT_VOTER"
49#define PD_INACTIVE_VOTER "PD_INACTIVE_VOTER"
50#define BOOST_BACK_VOTER "BOOST_BACK_VOTER"
51#define USBIN_USBIN_BOOST_VOTER "USBIN_USBIN_BOOST_VOTER"
52#define MICRO_USB_VOTER "MICRO_USB_VOTER"
53#define DEBUG_BOARD_VOTER "DEBUG_BOARD_VOTER"
54#define PD_SUSPEND_SUPPORTED_VOTER "PD_SUSPEND_SUPPORTED_VOTER"
55#define PL_DELAY_VOTER "PL_DELAY_VOTER"
56#define CTM_VOTER "CTM_VOTER"
57#define SW_QC3_VOTER "SW_QC3_VOTER"
58#define AICL_RERUN_VOTER "AICL_RERUN_VOTER"
59#define LEGACY_UNKNOWN_VOTER "LEGACY_UNKNOWN_VOTER"
60#define QNOVO_VOTER "QNOVO_VOTER"
61#define BATT_PROFILE_VOTER "BATT_PROFILE_VOTER"
62#define OTG_DELAY_VOTER "OTG_DELAY_VOTER"
63#define USBIN_I_VOTER "USBIN_I_VOTER"
64#define WEAK_CHARGER_VOTER "WEAK_CHARGER_VOTER"
65#define OTG_VOTER "OTG_VOTER"
66#define PL_FCC_LOW_VOTER "PL_FCC_LOW_VOTER"
67#define WBC_VOTER "WBC_VOTER"
68#define HW_LIMIT_VOTER "HW_LIMIT_VOTER"
69
70#define BOOST_BACK_STORM_COUNT 3
71#define WEAK_CHG_STORM_COUNT 8
72
Anirudh Ghayal1380d312018-02-23 00:01:43 +053073#define VBAT_TO_VRAW_ADC(v) div_u64((u64)v * 1000000UL, 194637UL)
74
Harry Yang4b7db0f2017-11-27 10:50:44 -080075enum smb_mode {
76 PARALLEL_MASTER = 0,
77 PARALLEL_SLAVE,
78 NUM_MODES,
79};
80
81enum {
82 BOOST_BACK_WA = BIT(0),
83};
84
85enum smb_irq_index {
86 /* CHGR */
87 CHGR_ERROR_IRQ = 0,
88 CHG_STATE_CHANGE_IRQ,
89 STEP_CHG_STATE_CHANGE_IRQ,
90 STEP_CHG_SOC_UPDATE_FAIL_IRQ,
91 STEP_CHG_SOC_UPDATE_REQ_IRQ,
92 FG_FVCAL_QUALIFIED_IRQ,
93 VPH_ALARM_IRQ,
94 VPH_DROP_PRECHG_IRQ,
95 /* DCDC */
96 OTG_FAIL_IRQ,
97 OTG_OC_DISABLE_SW_IRQ,
98 OTG_OC_HICCUP_IRQ,
99 BSM_ACTIVE_IRQ,
100 HIGH_DUTY_CYCLE_IRQ,
101 INPUT_CURRENT_LIMITING_IRQ,
102 CONCURRENT_MODE_DISABLE_IRQ,
103 SWITCHER_POWER_OK_IRQ,
104 /* BATIF */
105 BAT_TEMP_IRQ,
106 ALL_CHNL_CONV_DONE_IRQ,
107 BAT_OV_IRQ,
108 BAT_LOW_IRQ,
109 BAT_THERM_OR_ID_MISSING_IRQ,
110 BAT_TERMINAL_MISSING_IRQ,
111 BUCK_OC_IRQ,
112 VPH_OV_IRQ,
113 /* USB */
114 USBIN_COLLAPSE_IRQ,
115 USBIN_VASHDN_IRQ,
116 USBIN_UV_IRQ,
117 USBIN_OV_IRQ,
118 USBIN_PLUGIN_IRQ,
119 USBIN_REVI_CHANGE_IRQ,
120 USBIN_SRC_CHANGE_IRQ,
121 USBIN_ICL_CHANGE_IRQ,
122 /* DC */
123 DCIN_VASHDN_IRQ,
124 DCIN_UV_IRQ,
125 DCIN_OV_IRQ,
126 DCIN_PLUGIN_IRQ,
127 DCIN_REVI_IRQ,
128 DCIN_PON_IRQ,
129 DCIN_EN_IRQ,
130 /* TYPEC */
131 TYPEC_OR_RID_DETECTION_CHANGE_IRQ,
132 TYPEC_VPD_DETECT_IRQ,
133 TYPEC_CC_STATE_CHANGE_IRQ,
134 TYPEC_VCONN_OC_IRQ,
135 TYPEC_VBUS_CHANGE_IRQ,
136 TYPEC_ATTACH_DETACH_IRQ,
137 TYPEC_LEGACY_CABLE_DETECT_IRQ,
138 TYPEC_TRY_SNK_SRC_DETECT_IRQ,
139 /* MISC */
140 WDOG_SNARL_IRQ,
141 WDOG_BARK_IRQ,
142 AICL_FAIL_IRQ,
143 AICL_DONE_IRQ,
144 SMB_EN_IRQ,
145 IMP_TRIGGER_IRQ,
146 TEMP_CHANGE_IRQ,
147 TEMP_CHANGE_SMB_IRQ,
Ashay Jaiswal09feab82018-02-12 12:33:18 +0530148 /* FLASH */
149 VREG_OK_IRQ,
150 ILIM_S2_IRQ,
151 ILIM_S1_IRQ,
152 VOUT_DOWN_IRQ,
153 VOUT_UP_IRQ,
154 FLASH_STATE_CHANGE_IRQ,
155 TORCH_REQ_IRQ,
156 FLASH_EN_IRQ,
Harry Yang4b7db0f2017-11-27 10:50:44 -0800157 /* END */
158 SMB_IRQ_MAX,
159};
160
161enum float_options {
162 FLOAT_DCP = 1,
163 FLOAT_SDP = 2,
164 DISABLE_CHARGING = 3,
165 SUSPEND_INPUT = 4,
166};
167
168struct smb_irq_info {
169 const char *name;
170 const irq_handler_t handler;
171 const bool wake;
172 const struct storm_watch storm_data;
173 struct smb_irq_data *irq_data;
174 int irq;
175};
176
177static const unsigned int smblib_extcon_cable[] = {
178 EXTCON_USB,
179 EXTCON_USB_HOST,
180 EXTCON_NONE,
181};
182
183/* EXTCON_USB and EXTCON_USB_HOST are mutually exclusive */
184static const u32 smblib_extcon_exclusive[] = {0x3, 0};
185
186struct smb_regulator {
187 struct regulator_dev *rdev;
188 struct regulator_desc rdesc;
189};
190
191struct smb_irq_data {
192 void *parent_data;
193 const char *name;
194 struct storm_watch storm_data;
195};
196
197struct smb_chg_param {
198 const char *name;
199 u16 reg;
200 int min_u;
201 int max_u;
202 int step_u;
203 int (*get_proc)(struct smb_chg_param *param,
204 u8 val_raw);
205 int (*set_proc)(struct smb_chg_param *param,
206 int val_u,
207 u8 *val_raw);
208};
209
Ashay Jaiswala9e10912018-02-02 14:03:35 +0530210struct buck_boost_freq {
211 int freq_khz;
212 u8 val;
213};
214
Harry Yang4b7db0f2017-11-27 10:50:44 -0800215struct smb_chg_freq {
216 unsigned int freq_5V;
217 unsigned int freq_6V_8V;
218 unsigned int freq_9V;
219 unsigned int freq_12V;
220 unsigned int freq_removal;
221 unsigned int freq_below_otg_threshold;
222 unsigned int freq_above_otg_threshold;
223};
224
225struct smb_params {
226 struct smb_chg_param fcc;
227 struct smb_chg_param fv;
228 struct smb_chg_param usb_icl;
229 struct smb_chg_param icl_stat;
230 struct smb_chg_param otg_cl;
231 struct smb_chg_param jeita_cc_comp_hot;
232 struct smb_chg_param jeita_cc_comp_cold;
233 struct smb_chg_param freq_switcher;
234};
235
236struct parallel_params {
237 struct power_supply *psy;
238};
239
240struct smb_iio {
241 struct iio_channel *temp_chan;
242 struct iio_channel *temp_max_chan;
243 struct iio_channel *usbin_i_chan;
244 struct iio_channel *usbin_v_chan;
245 struct iio_channel *batt_i_chan;
246 struct iio_channel *connector_temp_chan;
247 struct iio_channel *connector_temp_thr1_chan;
248 struct iio_channel *connector_temp_thr2_chan;
249 struct iio_channel *connector_temp_thr3_chan;
250};
251
252struct smb_charger {
253 struct device *dev;
254 char *name;
255 struct regmap *regmap;
256 struct smb_irq_info *irq_info;
257 struct smb_params param;
258 struct smb_iio iio;
259 int *debug_mask;
260 enum smb_mode mode;
261 struct smb_chg_freq chg_freq;
262 int smb_version;
263 int otg_delay_ms;
264 int *weak_chg_icl_ua;
265
266 /* locks */
267 struct mutex lock;
268 struct mutex ps_change_lock;
269 struct mutex otg_oc_lock;
270
271 /* power supplies */
272 struct power_supply *batt_psy;
273 struct power_supply *usb_psy;
274 struct power_supply *dc_psy;
275 struct power_supply *bms_psy;
276 struct power_supply *usb_main_psy;
277 struct power_supply *usb_port_psy;
278 enum power_supply_type real_charger_type;
279
280 /* notifiers */
281 struct notifier_block nb;
282
283 /* parallel charging */
284 struct parallel_params pl;
285
286 /* regulators */
287 struct smb_regulator *vbus_vreg;
288 struct smb_regulator *vconn_vreg;
289 struct regulator *dpdm_reg;
290
291 /* votables */
292 struct votable *dc_suspend_votable;
293 struct votable *fcc_votable;
294 struct votable *fv_votable;
295 struct votable *usb_icl_votable;
296 struct votable *pd_disallowed_votable_indirect;
297 struct votable *pd_allowed_votable;
298 struct votable *awake_votable;
299 struct votable *pl_disable_votable;
300 struct votable *chg_disable_votable;
301 struct votable *pl_enable_votable_indirect;
302 struct votable *usb_irq_enable_votable;
303
304 /* work */
305 struct work_struct bms_update_work;
306 struct work_struct pl_update_work;
307 struct delayed_work ps_change_timeout_work;
308 struct delayed_work clear_hdc_work;
309 struct delayed_work icl_change_work;
310 struct delayed_work pl_enable_work;
311 struct delayed_work uusb_otg_work;
312 struct delayed_work bb_removal_work;
313
314 /* cached status */
315 int voltage_min_uv;
316 int voltage_max_uv;
317 int pd_active;
318 bool system_suspend_supported;
319 int boost_threshold_ua;
320 int system_temp_level;
321 int thermal_levels;
322 int *thermal_mitigation;
323 int dcp_icl_ua;
324 int fake_capacity;
325 int fake_batt_status;
326 bool step_chg_enabled;
327 bool sw_jeita_enabled;
328 bool is_hdc;
329 bool chg_done;
Ashay Jaiswala9e10912018-02-02 14:03:35 +0530330 int connector_type;
Harry Yang4b7db0f2017-11-27 10:50:44 -0800331 bool otg_en;
332 bool suspend_input_on_debug_batt;
333 int otg_attempts;
334 int vconn_attempts;
335 int default_icl_ua;
336 int otg_cl_ua;
337 bool uusb_apsd_rerun_done;
338 bool pd_hard_reset;
339 bool typec_present;
340 int fake_input_current_limited;
341 bool pr_swap_in_progress;
342 int typec_mode;
343 int usb_icl_change_irq_enabled;
344 u32 jeita_status;
345 u8 float_cfg;
346 bool use_extcon;
347 bool otg_present;
Ashay Jaiswala9e10912018-02-02 14:03:35 +0530348 int hw_max_icl_ua;
Anirudh Ghayal1380d312018-02-23 00:01:43 +0530349 int auto_recharge_soc;
Harry Yang4b7db0f2017-11-27 10:50:44 -0800350
351 /* workaround flag */
352 u32 wa_flags;
353 int boost_current_ua;
354
355 /* extcon for VBUS / ID notification to USB for uUSB */
356 struct extcon_dev *extcon;
357
358 /* battery profile */
359 int batt_profile_fcc_ua;
360 int batt_profile_fv_uv;
361
362 int usb_icl_delta_ua;
363 int pulse_cnt;
364
365 int die_health;
Ashay Jaiswal09feab82018-02-12 12:33:18 +0530366
367 /* flash */
368 u32 flash_derating_soc;
369 u32 flash_disable_soc;
370 u32 headroom_mode;
371 bool flash_init_done;
372 bool flash_active;
Harry Yang4b7db0f2017-11-27 10:50:44 -0800373};
374
375int smblib_read(struct smb_charger *chg, u16 addr, u8 *val);
376int smblib_masked_write(struct smb_charger *chg, u16 addr, u8 mask, u8 val);
377int smblib_write(struct smb_charger *chg, u16 addr, u8 val);
Anirudh Ghayal1380d312018-02-23 00:01:43 +0530378int smblib_batch_write(struct smb_charger *chg, u16 addr, u8 *val, int count);
379int smblib_batch_read(struct smb_charger *chg, u16 addr, u8 *val, int count);
Harry Yang4b7db0f2017-11-27 10:50:44 -0800380
381int smblib_get_charge_param(struct smb_charger *chg,
382 struct smb_chg_param *param, int *val_u);
383int smblib_get_usb_suspend(struct smb_charger *chg, int *suspend);
384
385int smblib_enable_charging(struct smb_charger *chg, bool enable);
386int smblib_set_charge_param(struct smb_charger *chg,
387 struct smb_chg_param *param, int val_u);
388int smblib_set_usb_suspend(struct smb_charger *chg, bool suspend);
389int smblib_set_dc_suspend(struct smb_charger *chg, bool suspend);
390
391int smblib_mapping_soc_from_field_value(struct smb_chg_param *param,
392 int val_u, u8 *val_raw);
393int smblib_mapping_cc_delta_to_field_value(struct smb_chg_param *param,
394 u8 val_raw);
395int smblib_mapping_cc_delta_from_field_value(struct smb_chg_param *param,
396 int val_u, u8 *val_raw);
397int smblib_set_chg_freq(struct smb_chg_param *param,
398 int val_u, u8 *val_raw);
Ashay Jaiswala9e10912018-02-02 14:03:35 +0530399int smblib_set_prop_boost_current(struct smb_charger *chg,
400 const union power_supply_propval *val);
Harry Yang4b7db0f2017-11-27 10:50:44 -0800401int smblib_vbus_regulator_enable(struct regulator_dev *rdev);
402int smblib_vbus_regulator_disable(struct regulator_dev *rdev);
403int smblib_vbus_regulator_is_enabled(struct regulator_dev *rdev);
404
405int smblib_vconn_regulator_enable(struct regulator_dev *rdev);
406int smblib_vconn_regulator_disable(struct regulator_dev *rdev);
407int smblib_vconn_regulator_is_enabled(struct regulator_dev *rdev);
408
409irqreturn_t default_irq_handler(int irq, void *data);
410irqreturn_t chg_state_change_irq_handler(int irq, void *data);
411irqreturn_t batt_temp_changed_irq_handler(int irq, void *data);
412irqreturn_t batt_psy_changed_irq_handler(int irq, void *data);
413irqreturn_t usbin_uv_irq_handler(int irq, void *data);
414irqreturn_t usb_plugin_irq_handler(int irq, void *data);
415irqreturn_t usb_source_change_irq_handler(int irq, void *data);
416irqreturn_t icl_change_irq_handler(int irq, void *data);
417irqreturn_t typec_state_change_irq_handler(int irq, void *data);
418irqreturn_t dc_plugin_irq_handler(int irq, void *data);
419irqreturn_t high_duty_cycle_irq_handler(int irq, void *data);
420irqreturn_t switcher_power_ok_irq_handler(int irq, void *data);
421irqreturn_t wdog_bark_irq_handler(int irq, void *data);
Ashay Jaiswala9e10912018-02-02 14:03:35 +0530422irqreturn_t typec_or_rid_detection_change_irq_handler(int irq, void *data);
Harry Yang4b7db0f2017-11-27 10:50:44 -0800423
424int smblib_get_prop_input_suspend(struct smb_charger *chg,
425 union power_supply_propval *val);
426int smblib_get_prop_batt_present(struct smb_charger *chg,
427 union power_supply_propval *val);
428int smblib_get_prop_batt_capacity(struct smb_charger *chg,
429 union power_supply_propval *val);
430int smblib_get_prop_batt_status(struct smb_charger *chg,
431 union power_supply_propval *val);
432int smblib_get_prop_batt_charge_type(struct smb_charger *chg,
433 union power_supply_propval *val);
434int smblib_get_prop_batt_charge_done(struct smb_charger *chg,
435 union power_supply_propval *val);
436int smblib_get_prop_batt_health(struct smb_charger *chg,
437 union power_supply_propval *val);
438int smblib_get_prop_system_temp_level(struct smb_charger *chg,
439 union power_supply_propval *val);
440int smblib_get_prop_system_temp_level_max(struct smb_charger *chg,
441 union power_supply_propval *val);
442int smblib_get_prop_input_current_limited(struct smb_charger *chg,
443 union power_supply_propval *val);
444int smblib_get_prop_batt_voltage_now(struct smb_charger *chg,
445 union power_supply_propval *val);
446int smblib_get_prop_batt_current_now(struct smb_charger *chg,
447 union power_supply_propval *val);
448int smblib_get_prop_batt_temp(struct smb_charger *chg,
449 union power_supply_propval *val);
450int smblib_get_prop_batt_charge_counter(struct smb_charger *chg,
451 union power_supply_propval *val);
452int smblib_set_prop_input_suspend(struct smb_charger *chg,
453 const union power_supply_propval *val);
454int smblib_set_prop_batt_capacity(struct smb_charger *chg,
455 const union power_supply_propval *val);
456int smblib_set_prop_batt_status(struct smb_charger *chg,
457 const union power_supply_propval *val);
458int smblib_set_prop_system_temp_level(struct smb_charger *chg,
459 const union power_supply_propval *val);
460int smblib_set_prop_input_current_limited(struct smb_charger *chg,
461 const union power_supply_propval *val);
462
463int smblib_get_prop_dc_present(struct smb_charger *chg,
464 union power_supply_propval *val);
465int smblib_get_prop_dc_online(struct smb_charger *chg,
466 union power_supply_propval *val);
467int smblib_get_prop_dc_current_max(struct smb_charger *chg,
468 union power_supply_propval *val);
469int smblib_set_prop_dc_current_max(struct smb_charger *chg,
470 const union power_supply_propval *val);
471int smblib_get_prop_usb_present(struct smb_charger *chg,
472 union power_supply_propval *val);
473int smblib_get_prop_usb_online(struct smb_charger *chg,
474 union power_supply_propval *val);
475int smblib_get_prop_usb_suspend(struct smb_charger *chg,
476 union power_supply_propval *val);
477int smblib_get_prop_usb_voltage_max(struct smb_charger *chg,
478 union power_supply_propval *val);
479int smblib_get_prop_typec_cc_orientation(struct smb_charger *chg,
480 union power_supply_propval *val);
481int smblib_get_prop_typec_power_role(struct smb_charger *chg,
482 union power_supply_propval *val);
483int smblib_get_prop_pd_allowed(struct smb_charger *chg,
484 union power_supply_propval *val);
485int smblib_get_prop_input_current_settled(struct smb_charger *chg,
486 union power_supply_propval *val);
487int smblib_get_prop_input_voltage_settled(struct smb_charger *chg,
488 union power_supply_propval *val);
489int smblib_get_prop_pd_in_hard_reset(struct smb_charger *chg,
490 union power_supply_propval *val);
491int smblib_get_pe_start(struct smb_charger *chg,
492 union power_supply_propval *val);
493int smblib_get_prop_die_health(struct smb_charger *chg,
494 union power_supply_propval *val);
495int smblib_set_prop_pd_current_max(struct smb_charger *chg,
496 const union power_supply_propval *val);
497int smblib_set_prop_sdp_current_max(struct smb_charger *chg,
498 const union power_supply_propval *val);
499int smblib_set_prop_pd_voltage_max(struct smb_charger *chg,
500 const union power_supply_propval *val);
501int smblib_set_prop_pd_voltage_min(struct smb_charger *chg,
502 const union power_supply_propval *val);
Harry Yang4b7db0f2017-11-27 10:50:44 -0800503int smblib_set_prop_typec_power_role(struct smb_charger *chg,
504 const union power_supply_propval *val);
505int smblib_set_prop_pd_active(struct smb_charger *chg,
506 const union power_supply_propval *val);
507int smblib_set_prop_pd_in_hard_reset(struct smb_charger *chg,
508 const union power_supply_propval *val);
509int smblib_set_prop_ship_mode(struct smb_charger *chg,
510 const union power_supply_propval *val);
511void smblib_suspend_on_debug_battery(struct smb_charger *chg);
512int smblib_rerun_apsd_if_required(struct smb_charger *chg);
513int smblib_get_prop_fcc_delta(struct smb_charger *chg,
514 union power_supply_propval *val);
Harry Yang4b7db0f2017-11-27 10:50:44 -0800515int smblib_dp_dm(struct smb_charger *chg, int val);
516int smblib_disable_hw_jeita(struct smb_charger *chg, bool disable);
517int smblib_rerun_aicl(struct smb_charger *chg);
518int smblib_set_icl_current(struct smb_charger *chg, int icl_ua);
519int smblib_get_icl_current(struct smb_charger *chg, int *icl_ua);
520int smblib_get_charge_current(struct smb_charger *chg, int *total_current_ua);
521int smblib_get_prop_pr_swap_in_progress(struct smb_charger *chg,
522 union power_supply_propval *val);
523int smblib_set_prop_pr_swap_in_progress(struct smb_charger *chg,
524 const union power_supply_propval *val);
525int smblib_stat_sw_override_cfg(struct smb_charger *chg, bool override);
Ashay Jaiswala55b7ed2018-03-23 17:23:48 +0530526int smblib_configure_wdog(struct smb_charger *chg, bool enable);
Harry Yang4b7db0f2017-11-27 10:50:44 -0800527
528int smblib_init(struct smb_charger *chg);
529int smblib_deinit(struct smb_charger *chg);
530#endif /* __SMB5_CHARGER_H */