diff options
author | Edward A. James <eajames@us.ibm.com> | 2017-12-12 00:32:49 +0300 |
---|---|---|
committer | Joel Stanley <joel@jms.id.au> | 2018-01-16 20:54:27 +0300 |
commit | e151e191cdba5114b877dd5789e9580313b85e1c (patch) | |
tree | cac3284e5963c0a182ceaa93bbd4caa986c01ccc | |
parent | 3339bdef88d3d546bca653c6e6fa101283c252ff (diff) | |
download | linux-e151e191cdba5114b877dd5789e9580313b85e1c.tar.xz |
hwmon: (pmbus) Export pmbus device debugfs directory entry
Pmbus client drivers, if they want to use debugfs, should use the same
root directory as the pmbus debugfs entries are using. Therefore, export
the device dentry for the pmbus client.
OpenBMC-Staging-Count: 1
Signed-off-by: Edward A. James <eajames@us.ibm.com>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Joel Stanley <joel@jms.id.au>
-rw-r--r-- | drivers/hwmon/pmbus/pmbus.h | 1 | ||||
-rw-r--r-- | drivers/hwmon/pmbus/pmbus_core.c | 8 |
2 files changed, 9 insertions, 0 deletions
diff --git a/drivers/hwmon/pmbus/pmbus.h b/drivers/hwmon/pmbus/pmbus.h index c028d31e793a..e32de81d915e 100644 --- a/drivers/hwmon/pmbus/pmbus.h +++ b/drivers/hwmon/pmbus/pmbus.h @@ -452,5 +452,6 @@ int pmbus_do_probe(struct i2c_client *client, const struct i2c_device_id *id, int pmbus_do_remove(struct i2c_client *client); const struct pmbus_driver_info *pmbus_get_driver_info(struct i2c_client *client); +struct dentry *pmbus_get_debugfs_dir(struct i2c_client *client); #endif /* PMBUS_H */ diff --git a/drivers/hwmon/pmbus/pmbus_core.c b/drivers/hwmon/pmbus/pmbus_core.c index 37ab366611b7..cf528205a66e 100644 --- a/drivers/hwmon/pmbus/pmbus_core.c +++ b/drivers/hwmon/pmbus/pmbus_core.c @@ -2368,6 +2368,14 @@ int pmbus_do_remove(struct i2c_client *client) } EXPORT_SYMBOL_GPL(pmbus_do_remove); +struct dentry *pmbus_get_debugfs_dir(struct i2c_client *client) +{ + struct pmbus_data *data = i2c_get_clientdata(client); + + return data->debugfs; +} +EXPORT_SYMBOL_GPL(pmbus_get_debugfs_dir); + static int __init pmbus_core_init(void) { pmbus_debugfs_dir = debugfs_create_dir("pmbus", NULL); |