Linux Kernel
3.7.1
Main Page
Related Pages
Modules
Namespaces
Data Structures
Files
File List
Globals
All
Data Structures
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Macros
Groups
Pages
include
linux
power
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 */
22
SMB347_SOFT_TEMP_COMPENSATE_DEFAULT
= -1,
23
24
SMB347_SOFT_TEMP_COMPENSATE_NONE
,
25
SMB347_SOFT_TEMP_COMPENSATE_CURRENT
,
26
SMB347_SOFT_TEMP_COMPENSATE_VOLTAGE
,
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
*/
36
enum
smb347_chg_enable
{
37
SMB347_CHG_ENABLE_SW
,
38
SMB347_CHG_ENABLE_PIN_ACTIVE_LOW
,
39
SMB347_CHG_ENABLE_PIN_ACTIVE_HIGH
,
40
};
41
93
struct
smb347_charger_platform_data
{
94
struct
power_supply_info
battery_info
;
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
;
103
int
soft_cold_temp_limit
;
104
int
soft_hot_temp_limit
;
105
int
hard_cold_temp_limit
;
106
int
hard_hot_temp_limit
;
107
bool
suspend_on_hard_temp_limit
;
108
unsigned
int
soft_temp_limit_compensation
;
109
unsigned
int
charge_current_compensation
;
110
bool
use_mains
;
111
bool
use_usb
;
112
bool
use_usb_otg
;
113
int
irq_gpio
;
114
enum
smb347_chg_enable
enable_control
;
115
};
116
117
#endif
/* SMB347_CHARGER_H */
Generated on Thu Jan 10 2013 14:52:24 for Linux Kernel by
1.8.2