# Re: \[PATCH v4 02/15\] gpio: regmap: set gpio\_chip of\_node

- From: Andy Shevchenko \<hidden\>
- Date: 2021-03-04 16:48:21 
- List: linux-devicetree
- Page: https://ratatoskr.run/linux-devicetree/2021/03/6288536
- Thread: https://ratatoskr.run/linux-gpio/2021/03/6287993/t.md

```text
On Thu, Mar 4, 2021 at 6:33 PM Andy Shevchenko
[ref] wrote:
> On Thu, Mar 4, 2021 at 5:44 PM Álvaro Fernández Rojas [ref] wrote:

Let me summarize what we can do this independently on any of my
patches and be okay with.

In the regmap GPIO configuration you supply struct fwnode_handle *fwnode.
You can you fwnode API in the actual GPIO controller driver.
Inside gpio-regmap simply do this for now

gc->of_node = to_of_node(config->fwnode);

The last part is an amendment I have told about, but it can be done
later on by switching the entire GPIO chip to use fwnode instead of
of_node.

-- 
With Best Regards,
Andy Shevchenko
```
