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