diff options
author | Viresh Kumar <viresh.kumar@st.com> | 2011-11-17 11:02:20 +0530 |
---|---|---|
committer | Samuel Ortiz <sameo@linux.intel.com> | 2012-01-09 00:37:42 +0100 |
commit | 1a6e4b7415339e3b11a87cff0d701b8a2e55f062 (patch) | |
tree | fbd5151ac34bf908826f4bbf8b298404660a8de1 /include | |
parent | 71e58782d2e054798f91473f5452ffe65e2a5ff8 (diff) |
mfd: Separate out STMPE controller and interface specific code
Few STMPE controller can have register interface over SPI or I2C. Current
implementation only supports I2C and all code is present in a single file
stmpe.c. It would be better to separate out I2C interface specific code from
controller specific code. Later SPI specific code can be added in a separate
file.
This patch separates out I2C and controller specific code into separate files,
making stmpe.c independent of I2C.
Signed-off-by: Viresh Kumar <viresh.kumar@st.com>
Acked-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/mfd/stmpe.h | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/include/linux/mfd/stmpe.h b/include/linux/mfd/stmpe.h index 270d6613aad..babc6b2857d 100644 --- a/include/linux/mfd/stmpe.h +++ b/include/linux/mfd/stmpe.h @@ -50,13 +50,15 @@ enum { struct stmpe_variant_info; +struct stmpe_client_info; /** * struct stmpe - STMPE MFD structure * @lock: lock protecting I/O operations * @irq_lock: IRQ bus lock * @dev: device, mostly for dev_dbg() - * @i2c: i2c client + * @client: client - i2c or spi + * @ci: client specific information * @partnum: part number * @variant: the detected STMPE model number * @regs: list of addresses of registers which are at different addresses on @@ -72,7 +74,8 @@ struct stmpe { struct mutex lock; struct mutex irq_lock; struct device *dev; - struct i2c_client *i2c; + void *client; + struct stmpe_client_info *ci; enum stmpe_partnum partnum; struct stmpe_variant_info *variant; const u8 *regs; |