&hycon_hy46xx_attr_bootloader_version.dattr.attr,
        NULL
 };
-
-static const struct attribute_group hycon_hy46xx_attr_group = {
-       .attrs = hycon_hy46xx_attrs,
-};
+ATTRIBUTE_GROUPS(hycon_hy46xx);
 
 static void hycon_hy46xx_get_defaults(struct device *dev, struct hycon_hy46xx_data *tsdata)
 {
                return error;
        }
 
-       error = devm_device_add_group(&client->dev, &hycon_hy46xx_attr_group);
-       if (error)
-               return error;
-
        error = input_register_device(input);
        if (error)
                return error;
 static struct i2c_driver hycon_hy46xx_driver = {
        .driver = {
                .name = "hycon_hy46xx",
+               .dev_groups = hycon_hy46xx_groups,
                .of_match_table = hycon_hy46xx_of_match,
                .probe_type = PROBE_PREFER_ASYNCHRONOUS,
        },