Re: [PATCH] pinctrl: rockchip: find gpiochip by name from gpio module

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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





[Index of Archives]     [Linux SPI]     [Linux Kernel]     [Linux ARM (vger)]     [Linux ARM MSM]     [Linux Omap]     [Linux Arm]     [Linux Tegra]     [Fedora ARM]     [Linux for Samsung SOC]     [eCos]     [Linux Fastboot]     [Gcc Help]     [Git]     [DCCP]     [IETF Announce]     [Security]     [Linux MIPS]     [Yosemite Campsites]

  Powered by Linux