diff options
author | krzysztof.adamski@nokia.com <krzysztof.adamski@nokia.com> | 2019-04-15 14:44:05 -0700 |
---|---|---|
committer | Guenter Roeck <linux@roeck-us.net> | 2019-04-15 17:19:53 -0700 |
commit | 991d679951f0df27db170036080746b84115e1e7 (patch) | |
tree | 016b3b1a16908fa445c5ff6dd31240c216d0ac68 /drivers/hwmon/pmbus/pmbus.h | |
parent | 9f00995e4eb293679597d76462fec2ce152e3500 (diff) | |
download | linux-991d679951f0df27db170036080746b84115e1e7.tar.bz2 |
pmbus: support for custom sysfs attributes
This patch makes it possible to pass custom struct attribute_group array
via the pmbus_driver_info struct so that those can be added to the
attribute groups passed to hwmon_device_register_with_groups().
This makes it possible to register custom sysfs attributes by PMBUS
drivers similar to how you can do this with most other busses/classes.
Signed-off-by: Krzysztof Adamski <krzysztof.adamski@nokia.com>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Diffstat (limited to 'drivers/hwmon/pmbus/pmbus.h')
-rw-r--r-- | drivers/hwmon/pmbus/pmbus.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/hwmon/pmbus/pmbus.h b/drivers/hwmon/pmbus/pmbus.h index e73289cc867d..59f85658313c 100644 --- a/drivers/hwmon/pmbus/pmbus.h +++ b/drivers/hwmon/pmbus/pmbus.h @@ -432,6 +432,9 @@ struct pmbus_driver_info { /* Regulator functionality, if supported by this chip driver. */ int num_regulators; const struct regulator_desc *reg_desc; + + /* custom attributes */ + const struct attribute_group **groups; }; /* Regulator ops */ |