Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
max77686-private.h
Go to the documentation of this file.
1 /*
2  * max77686.h - Voltage regulator driver for the Maxim 77686
3  *
4  * Copyright (C) 2012 Samsung Electrnoics
5  * Chiwoong Byun <[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 
22 #ifndef __LINUX_MFD_MAX77686_PRIV_H
23 #define __LINUX_MFD_MAX77686_PRIV_H
24 
25 #include <linux/i2c.h>
26 #include <linux/regmap.h>
27 #include <linux/module.h>
28 
29 #define MAX77686_REG_INVALID (0xff)
30 
36 
39 
42 
46  /* Reserved: 0x0B-0x0F */
47 
61  /* Reserved: 0x1D */
71  /* Reserved: 0x27 */
90  /* Reserved: 0x3A-0x3F */
91 
118  /* Reserved: 0x5A-0x5F */
145  /* Reserved: 0x7A-0x7D */
146 
149 
151 };
152 
159  /* Reserved: 0x5 */
182 };
183 
184 #define MAX77686_IRQSRC_PMIC (0)
185 #define MAX77686_IRQSRC_RTC (1 << 0)
186 
191 
193 };
194 
204 
207 
214 
216 };
217 
218 struct max77686_dev {
219  struct device *dev;
220  struct i2c_client *i2c; /* 0xcc / PMIC, Battery Control, and FLASH */
221  struct i2c_client *rtc; /* slave addr 0x0c */
222 
223  int type;
224 
225  struct regmap *regmap; /* regmap for mfd */
226  struct regmap *rtc_regmap; /* regmap for rtc */
227 
229 
230  int irq;
231  int irq_gpio;
232  bool wakeup;
233  struct mutex irqlock;
236 };
237 
240 };
241 
242 extern int max77686_irq_init(struct max77686_dev *max77686);
243 extern void max77686_irq_exit(struct max77686_dev *max77686);
244 extern int max77686_irq_resume(struct max77686_dev *max77686);
245 
246 #endif /* __LINUX_MFD_MAX77686_PRIV_H */