Re: [PATCH 1/3] gpio: swnode: Add ability to specify native chip selects for SPI

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

 



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




[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