aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/mfd
diff options
context:
space:
mode:
authorViresh Kumar <viresh.kumar@st.com>2011-11-17 00:32:20 -0500
committerSamuel Ortiz <sameo@linux.intel.com>2012-01-08 18:37:42 -0500
commit1a6e4b7415339e3b11a87cff0d701b8a2e55f062 (patch)
treefbd5151ac34bf908826f4bbf8b298404660a8de1 /include/linux/mfd
parent71e58782d2e054798f91473f5452ffe65e2a5ff8 (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/linux/mfd')
-rw-r--r--include/linux/mfd/stmpe.h7
1 files changed, 5 insertions, 2 deletions
diff --git a/include/linux/mfd/stmpe.h b/include/linux/mfd/stmpe.h
index 270d6613aadf..babc6b2857d3 100644
--- a/include/linux/mfd/stmpe.h
+++ b/include/linux/mfd/stmpe.h
@@ -50,13 +50,15 @@ enum {
50 50
51 51
52struct stmpe_variant_info; 52struct stmpe_variant_info;
53struct stmpe_client_info;
53 54
54/** 55/**
55 * struct stmpe - STMPE MFD structure 56 * struct stmpe - STMPE MFD structure
56 * @lock: lock protecting I/O operations 57 * @lock: lock protecting I/O operations
57 * @irq_lock: IRQ bus lock 58 * @irq_lock: IRQ bus lock
58 * @dev: device, mostly for dev_dbg() 59 * @dev: device, mostly for dev_dbg()
59 * @i2c: i2c client 60 * @client: client - i2c or spi
61 * @ci: client specific information
60 * @partnum: part number 62 * @partnum: part number
61 * @variant: the detected STMPE model number 63 * @variant: the detected STMPE model number
62 * @regs: list of addresses of registers which are at different addresses on 64 * @regs: list of addresses of registers which are at different addresses on
@@ -72,7 +74,8 @@ struct stmpe {
72 struct mutex lock; 74 struct mutex lock;
73 struct mutex irq_lock; 75 struct mutex irq_lock;
74 struct device *dev; 76 struct device *dev;
75 struct i2c_client *i2c; 77 void *client;
78 struct stmpe_client_info *ci;
76 enum stmpe_partnum partnum; 79 enum stmpe_partnum partnum;
77 struct stmpe_variant_info *variant; 80 struct stmpe_variant_info *variant;
78 const u8 *regs; 81 const u8 *regs;