diff options
author | David Brownell <david-b@pacbell.net> | 2008-02-29 01:07:28 -0500 |
---|---|---|
committer | Tony Lindgren <tony@atomide.com> | 2008-04-14 12:57:06 -0400 |
commit | 79966fd9b4781f9bd257312489ff511f2c01f210 (patch) | |
tree | 43ed798fcb5dabdb334f5a00f173d0a5fccf4be9 /include/linux/i2c | |
parent | ac37a0b0ba7e8a6afce8db3f6c3367a3cfedad26 (diff) |
ARM: OMAP: I2C: tps65010 driver converts to gpiolib
Make the tps65010 driver use gpiolib to expose its GPIOs.
Note: This patch will get merged via omap tree instead of I2C
as it will cause some board updates. This has been discussed
at on the I2C list:
http://lists.lm-sensors.org/pipermail/i2c/2008-March/003031.html
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Cc: i2c@lm-sensors.org
Signed-off-by: Tony Lindgren <tony@atomide.com>
Diffstat (limited to 'include/linux/i2c')
-rw-r--r-- | include/linux/i2c/tps65010.h | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/include/linux/i2c/tps65010.h b/include/linux/i2c/tps65010.h index 7021635ed6a0..918c5354d9b8 100644 --- a/include/linux/i2c/tps65010.h +++ b/include/linux/i2c/tps65010.h | |||
@@ -152,5 +152,35 @@ extern int tps65010_config_vregs1(unsigned value); | |||
152 | */ | 152 | */ |
153 | extern int tps65013_set_low_pwr(unsigned mode); | 153 | extern int tps65013_set_low_pwr(unsigned mode); |
154 | 154 | ||
155 | |||
156 | struct i2c_client; | ||
157 | |||
158 | /** | ||
159 | * struct tps65010_board - packages GPIO and LED lines | ||
160 | * @base: the GPIO number to assign to GPIO-1 | ||
161 | * @outmask: bit (N-1) is set to allow GPIO-N to be used as an | ||
162 | * (open drain) output | ||
163 | * @setup: optional callback issued once the GPIOs are valid | ||
164 | * @teardown: optional callback issued before the GPIOs are invalidated | ||
165 | * @context: optional parameter passed to setup() and teardown() | ||
166 | * | ||
167 | * Board data may be used to package the GPIO (and LED) lines for use | ||
168 | * in by the generic GPIO and LED frameworks. The first four GPIOs | ||
169 | * starting at gpio_base are GPIO1..GPIO4. The next two are LED1/nPG | ||
170 | * and LED2 (with hardware blinking capability, not currently exposed). | ||
171 | * | ||
172 | * The @setup callback may be used with the kind of board-specific glue | ||
173 | * which hands the (now-valid) GPIOs to other drivers, or which puts | ||
174 | * devices in their initial states using these GPIOs. | ||
175 | */ | ||
176 | struct tps65010_board { | ||
177 | int base; | ||
178 | unsigned outmask; | ||
179 | |||
180 | int (*setup)(struct i2c_client *client, void *context); | ||
181 | int (*teardown)(struct i2c_client *client, void *context); | ||
182 | void *context; | ||
183 | }; | ||
184 | |||
155 | #endif /* __LINUX_I2C_TPS65010_H */ | 185 | #endif /* __LINUX_I2C_TPS65010_H */ |
156 | 186 | ||