aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/sm501.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux/sm501.h')
-rw-r--r--include/linux/sm501.h37
1 files changed, 18 insertions, 19 deletions
diff --git a/include/linux/sm501.h b/include/linux/sm501.h
index b530fa6a1d34..214f93209b8c 100644
--- a/include/linux/sm501.h
+++ b/include/linux/sm501.h
@@ -46,24 +46,6 @@ extern unsigned long sm501_modify_reg(struct device *dev,
46 unsigned long set, 46 unsigned long set,
47 unsigned long clear); 47 unsigned long clear);
48 48
49/* sm501_gpio_set
50 *
51 * set the state of the given GPIO line
52*/
53
54extern void sm501_gpio_set(struct device *dev,
55 unsigned long gpio,
56 unsigned int to,
57 unsigned int dir);
58
59/* sm501_gpio_get
60 *
61 * get the state of the given GPIO line
62*/
63
64extern unsigned long sm501_gpio_get(struct device *dev,
65 unsigned long gpio);
66
67 49
68/* Platform data definitions */ 50/* Platform data definitions */
69 51
@@ -104,11 +86,19 @@ struct sm501_platdata_fb {
104 struct sm501_platdata_fbsub *fb_pnl; 86 struct sm501_platdata_fbsub *fb_pnl;
105}; 87};
106 88
107/* gpio i2c */ 89/* gpio i2c
90 *
91 * Note, we have to pass in the bus number, as the number used will be
92 * passed to the i2c-gpio driver's platform_device.id, subsequently used
93 * to register the i2c bus.
94*/
108 95
109struct sm501_platdata_gpio_i2c { 96struct sm501_platdata_gpio_i2c {
97 unsigned int bus_num;
110 unsigned int pin_sda; 98 unsigned int pin_sda;
111 unsigned int pin_scl; 99 unsigned int pin_scl;
100 int udelay;
101 int timeout;
112}; 102};
113 103
114/* sm501_initdata 104/* sm501_initdata
@@ -131,6 +121,7 @@ struct sm501_reg_init {
131#define SM501_USE_FBACCEL (1<<6) 121#define SM501_USE_FBACCEL (1<<6)
132#define SM501_USE_AC97 (1<<7) 122#define SM501_USE_AC97 (1<<7)
133#define SM501_USE_I2S (1<<8) 123#define SM501_USE_I2S (1<<8)
124#define SM501_USE_GPIO (1<<9)
134 125
135#define SM501_USE_ALL (0xffffffff) 126#define SM501_USE_ALL (0xffffffff)
136 127
@@ -157,6 +148,8 @@ struct sm501_init_gpio {
157 struct sm501_reg_init gpio_ddr_high; 148 struct sm501_reg_init gpio_ddr_high;
158}; 149};
159 150
151#define SM501_FLAG_SUSPEND_OFF (1<<4)
152
160/* sm501_platdata 153/* sm501_platdata
161 * 154 *
162 * This is passed with the platform device to allow the board 155 * This is passed with the platform device to allow the board
@@ -170,6 +163,12 @@ struct sm501_platdata {
170 struct sm501_init_gpio *init_gpiop; 163 struct sm501_init_gpio *init_gpiop;
171 struct sm501_platdata_fb *fb; 164 struct sm501_platdata_fb *fb;
172 165
166 int flags;
167 int gpio_base;
168
169 int (*get_power)(struct device *dev);
170 int (*set_power)(struct device *dev, unsigned int on);
171
173 struct sm501_platdata_gpio_i2c *gpio_i2c; 172 struct sm501_platdata_gpio_i2c *gpio_i2c;
174 unsigned int gpio_i2c_nr; 173 unsigned int gpio_i2c_nr;
175}; 174};