mfd: stmpe: add optional regulators

The STMPE has VCC and VIO supply lines, and sometimes (as on
Ux500) this comes from a software-controlled regulator. Make
it possible to supply the STMPE with power from these
regulators.

Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
This commit is contained in:
Linus Walleij 2014-05-08 23:16:35 +02:00 committed by Lee Jones
parent 5a826feedc
commit 9c9e321455
2 changed files with 23 additions and 0 deletions

View file

@ -11,6 +11,7 @@
#include <linux/mutex.h>
struct device;
struct regulator;
enum stmpe_block {
STMPE_BLOCK_GPIO = 1 << 0,
@ -62,6 +63,8 @@ struct stmpe_client_info;
/**
* struct stmpe - STMPE MFD structure
* @vcc: optional VCC regulator
* @vio: optional VIO regulator
* @lock: lock protecting I/O operations
* @irq_lock: IRQ bus lock
* @dev: device, mostly for dev_dbg()
@ -80,6 +83,8 @@ struct stmpe_client_info;
* @pdata: platform data
*/
struct stmpe {
struct regulator *vcc;
struct regulator *vio;
struct mutex lock;
struct mutex irq_lock;
struct device *dev;