Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
max8997.h
Go to the documentation of this file.
1 /*
2  * max8997.h - Driver for the Maxim 8997/8966
3  *
4  * Copyright (C) 2009-2010 Samsung Electrnoics
5  * MyungJoo Ham <[email protected]>
6  *
7  * This program is free software; you can redistribute it and/or modify
8  * it under the terms of the GNU General Public License as published by
9  * the Free Software Foundation; either version 2 of the License, or
10  * (at your option) any later version.
11  *
12  * This program is distributed in the hope that it will be useful,
13  * but WITHOUT ANY WARRANTY; without even the implied warranty of
14  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15  * GNU General Public License for more details.
16  *
17  * You should have received a copy of the GNU General Public License
18  * along with this program; if not, write to the Free Software
19  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
20  *
21  * This driver is based on max8998.h
22  *
23  * MAX8997 has PMIC, MUIC, HAPTIC, RTC, FLASH, and Fuel Gauge devices.
24  * Except Fuel Gauge, every device shares the same I2C bus and included in
25  * this mfd driver. Although the fuel gauge is included in the chip, it is
26  * excluded from the driver because a) it has a different I2C bus from
27  * others and b) it can be enabled simply by using MAX17042 driver.
28  */
29 
30 #ifndef __LINUX_MFD_MAX8998_H
31 #define __LINUX_MFD_MAX8998_H
32 
34 
35 /* MAX8997/8966 regulator IDs */
68  MAX8997_CHARGER_CV, /* control MBCCV of MBCCTRL3 */
69  MAX8997_CHARGER, /* charger current, MBCCTRL4 */
70  MAX8997_CHARGER_TOPOFF, /* MBCCTRL5 */
71 
73 };
74 
76  int id;
78 };
79 
83 };
84 
93 };
94 
98 };
99 
109 };
110 
114 };
115 
119 };
120 
126 };
127 
148  unsigned int pwm_channel_id;
149  unsigned int pwm_period;
150 
154 
155  unsigned int internal_mode_pattern;
156  unsigned int pattern_cycle;
157  unsigned int pattern_signal_period;
158 };
159 
166 };
167 
180 };
181 
183  /* IRQ */
184  int ono;
185  int wakeup;
186 
187  /* ---- PMIC ---- */
190 
191  /*
192  * SET1~3 DVS GPIOs control Buck1, 2, and 5 simultaneously. Therefore,
193  * With buckx_gpiodvs enabled, the buckx cannot be controlled
194  * independently. To control buckx (of 1, 2, and 5) independently,
195  * disable buckx_gpiodvs and control with BUCKxDVS1 register.
196  *
197  * When buckx_gpiodvs and bucky_gpiodvs are both enabled, set_voltage
198  * on buckx will change the voltage of bucky at the same time.
199  *
200  */
202  int buck125_gpios[3]; /* GPIO of [0]SET1, [1]SET2, [2]SET3 */
203  int buck125_default_idx; /* Default value of SET1, 2, 3 */
204  unsigned int buck1_voltage[8]; /* buckx_voltage in uV */
206  unsigned int buck2_voltage[8];
208  unsigned int buck5_voltage[8];
210 
211  /* ---- Charger control ---- */
212  /* eoc stands for 'end of charge' */
213  int eoc_mA; /* 50 ~ 200mA by 10mA step */
214  /* charge Full Timeout */
215  int timeout; /* 0 (no timeout), 5, 6, 7 hours */
216 
217  /* ---- MUIC ---- */
219 
220  /* ---- HAPTIC ---- */
222 
223  /* RTC: Not implemented */
224  /* ---- LED ---- */
226 };
227 
228 #endif /* __LINUX_MFD_MAX8998_H */