Re: [PATCH v4 02/15] gpio: regmap: set gpio_chip of_node

From
Andy Shevchenko <hidden>
Date
2021-03-04 15:19:31
Also in
linux-devicetree, linux-gpio, lkml
Reply to
Álvaro Fernández Rojas, 2021-03-04
On Thu, Mar 4, 2021 at 5:06 PM Álvaro Fernández Rojas [off-list ref] wrote:
quoted
El 4 mar 2021, a las 11:35, Andy Shevchenko [off-list ref] escribió:
On Thu, Mar 4, 2021 at 10:57 AM Álvaro Fernández Rojas
[off-list ref] wrote:
quoted
quoted
+ * @of_node:           (Optional) The device node
quoted
+       struct device_node *of_node;
Can we use fwnode from day 1, please?
Could you explain this? I haven’t dealt with fwnode never :$
BTW, this is done to fix this check when parsing gpio ranges:
https://github.com/torvalds/linux/blob/f69d02e37a85645aa90d18cacfff36dba370f797/drivers/gpio/gpiolib-of.c#L933-L934
Use struct fwnode_handle pointer instead of OF-specific one.

Also here is the question, why do you need to have that field in the
regmap config structure and can't simply use the parent's fwnode?
Also I'm puzzled why it's not working w/o this patch: GPIO library
effectively assigns parent's fwnode (okay, of_node right now).

-- 
With Best Regards,
Andy Shevchenko

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
Thread (44 messages) 44 messages, 4 authors, last reply 2021-03-09
Keyboard shortcuts
hback out one level
jnext message in thread / next series-diff position
kprevious message in thread / previous series-diff position
ldrill in
Escclose help / fold thread tree
?toggle this help