diff options
Diffstat (limited to 'drivers/hwmon/pmbus')
-rw-r--r-- | drivers/hwmon/pmbus/Kconfig | 6 | ||||
-rw-r--r-- | drivers/hwmon/pmbus/pmbus.c | 20 | ||||
-rw-r--r-- | drivers/hwmon/pmbus/ucd9000.c | 3 |
3 files changed, 23 insertions, 6 deletions
diff --git a/drivers/hwmon/pmbus/Kconfig b/drivers/hwmon/pmbus/Kconfig index 054d3d863802..cad1229b7e17 100644 --- a/drivers/hwmon/pmbus/Kconfig +++ b/drivers/hwmon/pmbus/Kconfig @@ -126,12 +126,12 @@ config SENSORS_TPS40422 be called tps40422. config SENSORS_UCD9000 - tristate "TI UCD90120, UCD90124, UCD9090, UCD90910" + tristate "TI UCD90120, UCD90124, UCD90160, UCD9090, UCD90910" default n help If you say yes here you get hardware monitoring support for TI - UCD90120, UCD90124, UCD9090, UCD90910 Sequencer and System Health - Controllers. + UCD90120, UCD90124, UCD90160, UCD9090, UCD90910, Sequencer and System + Health Controllers. This driver can also be built as a module. If so, the module will be called ucd9000. diff --git a/drivers/hwmon/pmbus/pmbus.c b/drivers/hwmon/pmbus/pmbus.c index 0a74991a60f0..44ca8a94873d 100644 --- a/drivers/hwmon/pmbus/pmbus.c +++ b/drivers/hwmon/pmbus/pmbus.c @@ -25,6 +25,7 @@ #include <linux/slab.h> #include <linux/mutex.h> #include <linux/i2c.h> +#include <linux/i2c/pmbus.h> #include "pmbus.h" /* @@ -167,14 +168,26 @@ static int pmbus_probe(struct i2c_client *client, const struct i2c_device_id *id) { struct pmbus_driver_info *info; + struct pmbus_platform_data *pdata = NULL; + struct device *dev = &client->dev; - info = devm_kzalloc(&client->dev, sizeof(struct pmbus_driver_info), - GFP_KERNEL); + info = devm_kzalloc(dev, sizeof(struct pmbus_driver_info), GFP_KERNEL); if (!info) return -ENOMEM; + if (!strcmp(id->name, "dps460") || !strcmp(id->name, "dps800") || + !strcmp(id->name, "sgd009")) { + pdata = devm_kzalloc(dev, sizeof(struct pmbus_platform_data), + GFP_KERNEL); + if (!pdata) + return -ENOMEM; + + pdata->flags = PMBUS_SKIP_STATUS_CHECK; + } + info->pages = id->driver_data; info->identify = pmbus_identify; + dev->platform_data = pdata; return pmbus_do_probe(client, id, info); } @@ -186,6 +199,8 @@ static const struct i2c_device_id pmbus_id[] = { {"adp4000", 1}, {"bmr453", 1}, {"bmr454", 1}, + {"dps460", 1}, + {"dps800", 1}, {"mdt040", 1}, {"ncp4200", 1}, {"ncp4208", 1}, @@ -193,6 +208,7 @@ static const struct i2c_device_id pmbus_id[] = { {"pdt006", 1}, {"pdt012", 1}, {"pmbus", 0}, + {"sgd009", 1}, {"tps40400", 1}, {"tps544b20", 1}, {"tps544b25", 1}, diff --git a/drivers/hwmon/pmbus/ucd9000.c b/drivers/hwmon/pmbus/ucd9000.c index fbb1479d3ad4..3e3aa950277f 100644 --- a/drivers/hwmon/pmbus/ucd9000.c +++ b/drivers/hwmon/pmbus/ucd9000.c @@ -28,7 +28,7 @@ #include <linux/i2c/pmbus.h> #include "pmbus.h" -enum chips { ucd9000, ucd90120, ucd90124, ucd9090, ucd90910 }; +enum chips { ucd9000, ucd90120, ucd90124, ucd90160, ucd9090, ucd90910 }; #define UCD9000_MONITOR_CONFIG 0xd5 #define UCD9000_NUM_PAGES 0xd6 @@ -112,6 +112,7 @@ static const struct i2c_device_id ucd9000_id[] = { {"ucd9000", ucd9000}, {"ucd90120", ucd90120}, {"ucd90124", ucd90124}, + {"ucd90160", ucd90160}, {"ucd9090", ucd9090}, {"ucd90910", ucd90910}, {} |