summaryrefslogtreecommitdiff
path: root/drivers/mfd
diff options
context:
space:
mode:
authorLaxman Dewangan <ldewangan@nvidia.com>2011-06-29 10:10:53 +0530
committerDan Willemsen <dwillemsen@nvidia.com>2011-11-30 21:47:27 -0800
commite77321bf7fb2e7ea74cd21ae82ef7f8d3622c32e (patch)
tree9ae10b81cf1d70b28d8db04406d8815c5636b554 /drivers/mfd
parent27ad502db3f5187b442c4077090b63af7b2fcfb6 (diff)
mfd: tps80031: Support for 80032 chip
Creating framework so that tps80031 driver can be instantiated with the name of tps80032 also and it can provide the device/chip info to its client. bug 820885 Original-Change-Id: I1c40b7c6bec1f4abbc670aaa4317fad49e5d308a Reviewed-on: http://git-master/r/38859 Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com> Tested-by: Laxman Dewangan <ldewangan@nvidia.com> Reviewed-by: Bitan Biswas <bbiswas@nvidia.com> Rebase-Id: R4953c404fb2af827b53a0173ac6a06806d2f2112
Diffstat (limited to 'drivers/mfd')
-rw-r--r--drivers/mfd/tps80031.c13
1 files changed, 11 insertions, 2 deletions
diff --git a/drivers/mfd/tps80031.c b/drivers/mfd/tps80031.c
index 90ffc82504ea..a1d50fcad8a2 100644
--- a/drivers/mfd/tps80031.c
+++ b/drivers/mfd/tps80031.c
@@ -184,6 +184,7 @@ struct tps80031_client {
struct tps80031 {
struct device *dev;
+ unsigned long chip_info;
struct gpio_chip gpio;
struct irq_chip irq_chip;
@@ -400,6 +401,13 @@ out:
}
EXPORT_SYMBOL_GPL(tps80031_force_update);
+unsigned long tps80031_get_chip_info(struct device *dev)
+{
+ struct tps80031 *tps80031 = dev_get_drvdata(dev);
+ return tps80031->chip_info;
+}
+EXPORT_SYMBOL_GPL(tps80031_get_chip_info);
+
static struct tps80031 *tps80031_dev;
int tps80031_power_off(void)
{
@@ -957,6 +965,7 @@ static int __devinit tps80031_i2c_probe(struct i2c_client *client,
tps80031->dev = &client->dev;
i2c_set_clientdata(client, tps80031);
+ tps80031->chip_info = id->driver_data;
/* Set up slaves */
tps80031->tps_clients[SLAVE_ID0].addr = I2C_ID0_ADDR;
@@ -1027,8 +1036,8 @@ static int tps80031_i2c_resume(struct i2c_client *client)
static const struct i2c_device_id tps80031_id_table[] = {
- { "tps80031", 0 },
- { },
+ { "tps80031", TPS80031 },
+ { "tps80032", TPS80032 },
};
MODULE_DEVICE_TABLE(i2c, tps80031_id_table);