summaryrefslogtreecommitdiff
path: root/include/linux/mfd/tps6507x.h
diff options
context:
space:
mode:
authorTodd Fischer <todd.fischer@ridgerun.com>2010-04-08 11:04:55 +0400
committerSamuel Ortiz <sameo@linux.intel.com>2010-05-28 03:37:38 +0400
commit31dd6a2672e337f5de188df3e5169ee732798236 (patch)
treed0a12a6622d9a32a107267a4479f6e12a495dbd3 /include/linux/mfd/tps6507x.h
parent4ce5ba5ba2dfc8186bf31fe7f2d23ff6b5384124 (diff)
downloadlinux-31dd6a2672e337f5de188df3e5169ee732798236.tar.xz
mfd: Add TPS6507x support
TPS6507x are multi function (PM, touchscreen) chipsets from TI. This commit also changes the corresponding regulator driver from being standalone to an MFD subdevice. Signed-off-by: Todd Fischer <todd.fischer@ridgerun.com> Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
Diffstat (limited to 'include/linux/mfd/tps6507x.h')
-rw-r--r--include/linux/mfd/tps6507x.h22
1 files changed, 22 insertions, 0 deletions
diff --git a/include/linux/mfd/tps6507x.h b/include/linux/mfd/tps6507x.h
index fd73af5fb95a..9543cb716428 100644
--- a/include/linux/mfd/tps6507x.h
+++ b/include/linux/mfd/tps6507x.h
@@ -131,6 +131,8 @@
/* VDCDC MASK */
#define TPS6507X_DEFDCDCX_DCDC_MASK 0X3F
+#define TPS6507X_MAX_REGISTER 0X19
+
/**
* struct tps6507x_board - packages regulator and touchscreen init data
* @tps6507x_regulator_data: regulator initialization values
@@ -142,4 +144,24 @@ struct tps6507x_board {
struct regulator_init_data *tps6507x_pmic_init_data;
};
+/**
+ * struct tps6507x_dev - tps6507x sub-driver chip access routines
+ * @read_dev() - I2C register read function
+ * @write_dev() - I2C register write function
+ *
+ * Device data may be used to access the TPS6507x chip
+ */
+
+struct tps6507x_dev {
+ struct device *dev;
+ struct i2c_client *i2c_client;
+ int (*read_dev)(struct tps6507x_dev *tps6507x, char reg, int size,
+ void *dest);
+ int (*write_dev)(struct tps6507x_dev *tps6507x, char reg, int size,
+ void *src);
+
+ /* Client devices */
+ struct tps6507x_pmic *pmic;
+};
+
#endif /* __LINUX_MFD_TPS6507X_H */