On Thu, Apr 04, 2024 at 10:16:35AM +0200, Linus Walleij wrote: > On Tue, Mar 26, 2024 at 3:11 PM Charles Keepax > <ckeepax@xxxxxxxxxxxxxxxxxxxxx> wrote: > > +const struct software_node swnode_gpio_undefined = { > > + .name = "gpio-internal-undefined", > > +}; > > +EXPORT_SYMBOL_GPL(swnode_gpio_undefined); > > This needs a comment in the code telling exactly why this is here. > It is also taking up space and code here on systems that have no use > for it, so I wonder if it is possible to make this optional. > Happy to add the comment, less sure about how to make it optional. I could ifdef it based the SPI config, but whilst that is the current user the mechanism feels like it is more generic than that and could be used in other bindings as well. > > + if (!strcmp(gdev_node->name, "gpio-internal-undefined")) > > + return ERR_PTR(-ENOENT); > > This needs a comment stating why this check is here, it's not > obvious. Happy to add a comment here as well. Thanks, Charles