[PATCH 2/5] hwmon: (cros_ec) Prepare the addition of custom groups
From: Thomas Weißschuh
Date: Fri May 29 2026 - 16:32:15 EST
An upcoming change will add a custom sysfs attribute group.
Set up the scaffolding for that.
Signed-off-by: Thomas Weißschuh <linux@xxxxxxxxxxxxxx>
---
drivers/hwmon/cros_ec_hwmon.c | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/drivers/hwmon/cros_ec_hwmon.c b/drivers/hwmon/cros_ec_hwmon.c
index f1b6c9c2d2a3..932e45caba9c 100644
--- a/drivers/hwmon/cros_ec_hwmon.c
+++ b/drivers/hwmon/cros_ec_hwmon.c
@@ -402,6 +402,10 @@ static const struct hwmon_channel_info * const cros_ec_hwmon_info[] = {
NULL
};
+static const struct attribute_group *cros_ec_hwmon_groups[] = {
+ NULL
+};
+
static int cros_ec_hwmon_cooling_get_max_state(struct thermal_cooling_device *cdev,
unsigned long *val)
{
@@ -588,7 +592,8 @@ static int cros_ec_hwmon_probe(struct platform_device *pdev)
cros_ec_hwmon_register_fan_cooling_devices(dev, priv);
hwmon_dev = devm_hwmon_device_register_with_info(dev, "cros_ec", priv,
- &cros_ec_hwmon_chip_info, NULL);
+ &cros_ec_hwmon_chip_info,
+ cros_ec_hwmon_groups);
platform_set_drvdata(pdev, priv);
return PTR_ERR_OR_ZERO(hwmon_dev);
--
2.54.0