Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
smb347-charger.h
Go to the documentation of this file.
1 /*
2  * Summit Microelectronics SMB347 Battery Charger Driver
3  *
4  * Copyright (C) 2011, Intel Corporation
5  *
6  * Authors: Bruce E. Robertson <[email protected]>
7  * Mika Westerberg <[email protected]>
8  *
9  * This program is free software; you can redistribute it and/or modify
10  * it under the terms of the GNU General Public License version 2 as
11  * published by the Free Software Foundation.
12  */
13 
14 #ifndef SMB347_CHARGER_H
15 #define SMB347_CHARGER_H
16 
17 #include <linux/types.h>
18 #include <linux/power_supply.h>
19 
20 enum {
21  /* use the default compensation method */
23 
27 };
28 
29 /* Use default factory programmed value for hard/soft temperature limit */
30 #define SMB347_TEMP_USE_DEFAULT -273
31 
32 /*
33  * Charging enable can be controlled by software (via i2c) by
34  * smb347-charger driver or by EN pin (active low/high).
35  */
40 };
41 
95  unsigned int max_charge_current;
96  unsigned int max_charge_voltage;
97  unsigned int pre_charge_current;
98  unsigned int termination_current;
99  unsigned int pre_to_fast_voltage;
100  unsigned int mains_current_limit;
101  unsigned int usb_hc_current_limit;
102  unsigned int chip_temp_threshold;
110  bool use_mains;
111  bool use_usb;
113  int irq_gpio;
115 };
116 
117 #endif /* SMB347_CHARGER_H */