Re: gpiolib of_node removal

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

 



On 3/9/23 4:42 AM, Linus Walleij wrote:
> On Thu, Mar 9, 2023 at 2:17 AM Dipen Patel <dipenp@xxxxxxxxxx> wrote:
> 
>> Should I revert that patch and add it in my next patch series or is there any other way to retrieve gpio_chip?
> 
> So what you want is a function to pass to gpiochip_find() to match
> the chip corresponding to a certain OF node. You have this:
> 
> static int tegra_get_gpiochip_from_of_node(struct gpio_chip *chip, void *data)
> {
>     return chip->of_node == data;
> }
> 
> 1) Rename this function tegra_gpiochip_match() as that is what it does.
> 
> 2) Do something like:
> 
> static int tegra_gpiochip_match(struct gpio_chip *chip, void *data)
> {
>     return chip->fwnode == of_node_to_fwnode(data);
> }
> 
> I think that should work?
> 
> Yours,
> Linus Walleij

Thanks, I believe this will work.



[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