Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
pdata.h
Go to the documentation of this file.
1 /*
2  * include/linux/mfd/wm831x/pdata.h -- Platform data for WM831x
3  *
4  * Copyright 2009 Wolfson Microelectronics PLC.
5  *
6  * Author: Mark Brown <[email protected]>
7  *
8  * This program is free software; you can redistribute it and/or modify it
9  * under the terms of the GNU General Public License as published by the
10  * Free Software Foundation; either version 2 of the License, or (at your
11  * option) any later version.
12  *
13  */
14 
15 #ifndef __MFD_WM831X_PDATA_H__
16 #define __MFD_WM831X_PDATA_H__
17 
18 struct wm831x;
19 struct regulator_init_data;
20 
22  int isink;
23  int max_uA;
24 };
25 
29  int vlim;
30  int ilim;
31 };
32 
34  int enable;
36  int off_mask;
38  int vsel;
39  int eoc_iterm;
40  int fast_ilim;
41  int timeout;
42 };
43 
55  int dvs_gpio;
59 };
60 
61 /* Sources for status LED configuration. Values are register values
62  * plus 1 to allow for a zero default for preserve.
63  */
65  WM831X_STATUS_PRESERVE = 0, /* Keep the current hardware setting */
70 };
71 
74  const char *name;
75  const char *default_trigger;
76 };
77 
79  int fivewire;
80  int isel;
81  int rpu;
82  int pressure;
83  unsigned int data_irq;
84  int data_irqf;
85  unsigned int pd_irq;
86  int pd_irqf;
87 };
88 
94 };
95 
99  unsigned int software:1;
100 };
101 
102 #define WM831X_MAX_STATUS 2
103 #define WM831X_MAX_DCDC 4
104 #define WM831X_MAX_EPE 2
105 #define WM831X_MAX_LDO 11
106 #define WM831X_MAX_ISINK 2
107 
108 #define WM831X_GPIO_CONFIGURE 0x10000
109 #define WM831X_GPIO_NUM 16
110 
111 struct wm831x_pdata {
114 
116  int (*pre_init)(struct wm831x *wm831x);
118  int (*post_init)(struct wm831x *wm831x);
119 
121  bool irq_cmos;
122 
125 
128 
129  int irq_base;
137 
148 };
149 
150 #endif