On Fri, Sep 16, 2022 at 04:43:43PM +0800, Jianqun Xu wrote: > Currently the pinctrl device acts as parent for the gpio devices for > rockchip platform, the pinctrl driver probes first and then populate the > gpio platform lastly. > > This patch makes the pinctrl to populate gpio platform firstly and then > do probe after gpio probed successfully. And get gpiochips througth a > find function by the gpio label. > +static int gpiochip_match_name(struct gpio_chip *gc, void *data) > +{ > + const char *name = data; > + > + return !strcmp(gc->label, name); > +} > + gc = gpiochip_find((void *)ctrl->pin_banks[i].name, gpiochip_match_name); > + if (!gc) { > + dev_err(dev, "fail to find gpiochip\n"); > + return ret; > + } NIH find_chip_by_name() -- With Best Regards, Andy Shevchenko -- With Best Regards, Andy Shevchenko