diff options
author | krzysztof.adamski@nokia.com <krzysztof.adamski@nokia.com> | 2019-04-18 07:36:04 -0700 |
---|---|---|
committer | Andrew Jeffery <andrew@aj.id.au> | 2019-04-19 11:57:48 +0930 |
commit | d7e7edaf5887c6c01c44d1c18609705847965e06 (patch) | |
tree | cfc697834210d0db1aa0fe8322beb2096926c4f5 /drivers/hwmon/pmbus/pmbus.h | |
parent | 9cd6f6c377d4eb61293f0385e2ffbcb2c731dbed (diff) | |
download | blackbird-obmc-linux-d7e7edaf5887c6c01c44d1c18609705847965e06.tar.gz blackbird-obmc-linux-d7e7edaf5887c6c01c44d1c18609705847965e06.zip |
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>
Signed-off-by: Andrew Jeffery <andrew@aj.id.au>
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 1d24397d36ec..fb267ec11623 100644 --- a/drivers/hwmon/pmbus/pmbus.h +++ b/drivers/hwmon/pmbus/pmbus.h @@ -417,6 +417,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 */ |