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>
This commit is contained in:
krzysztof.adamski@nokia.com
2019-04-15 14:44:05 -07:00
committed by Guenter Roeck
szülő 9f00995e4e
commit 991d679951
2 fájl változott, egészen pontosan 15 új sor hozzáadva és 1 régi sor törölve

Fájl megtekintése

@@ -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 */