if (!group)
                return NULL;
 
-       return group->name;
+       if (group->name)
+               return group->name;
+
+       return group->grp.name;
 }
 EXPORT_SYMBOL_GPL(pinctrl_generic_get_group_name);
 
                return -EINVAL;
        }
 
-       *pins = group->pins;
-       *num_pins = group->num_pins;
+       if (group->pins) {
+               *pins = group->pins;
+               *num_pins = group->num_pins;
+               return 0;
+       }
+
+       *pins = group->grp.pins;
+       *num_pins = group->grp.npins;
 
        return 0;
 }
 
 
 #ifdef CONFIG_GENERIC_PINCTRL_GROUPS
 
+#include <linux/pinctrl/pinctrl.h>
+
 /**
  * struct group_desc - generic pin group descriptor
+ * @grp: generic data of the pin group (name and pins)
  * @name: name of the pin group
  * @pins: array of pins that belong to the group
  * @num_pins: number of pins in the group
  * @data: pin controller driver specific data
  */
 struct group_desc {
+       struct pingroup grp;
        const char *name;
        const unsigned int *pins;
        int num_pins;
 /* Convenience macro to define a generic pin group descriptor */
 #define PINCTRL_GROUP_DESC(_name, _pins, _num_pins, _data)     \
 (struct group_desc) {                                          \
+       .grp = PINCTRL_PINGROUP(_name, _pins, _num_pins),       \
        .name = _name,                                          \
        .pins = _pins,                                          \
        .num_pins = _num_pins,                                  \