linux-gpio.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Andy Shevchenko <andy.shevchenko@gmail.com>
To: Charles Keepax <ckeepax@opensource.cirrus.com>
Cc: broonie@kernel.org, linus.walleij@linaro.org, brgl@bgdev.pl,
	 bard.liao@intel.com, linux-gpio@vger.kernel.org,
	linux-spi@vger.kernel.org,  patches@opensource.cirrus.com
Subject: Re: [PATCH v5 1/4] gpio: swnode: Add ability to specify native chip selects for SPI
Date: Thu, 11 Apr 2024 19:50:46 +0300	[thread overview]
Message-ID: <CAHp75Vdb7Op-ddo5RxZuMYLFBjGbGxtQaZA0yE8pfXQBcLH5GA@mail.gmail.com> (raw)
In-Reply-To: <ZhgTeE1JKAJ4Jhbv@ediswmail9.ad.cirrus.com>

On Thu, Apr 11, 2024 at 7:44 PM Charles Keepax
<ckeepax@opensource.cirrus.com> wrote:
> On Thu, Apr 11, 2024 at 04:25:25PM +0300, Andy Shevchenko wrote:
> > On Thu, Apr 11, 2024 at 12:06 PM Charles Keepax
> > <ckeepax@opensource.cirrus.com> wrote:

...

> > > +config GPIO_SWNODE_UNDEFINED
> > > +       bool
> >
> > But why did you remove the help? Please, put it back.
>
> Sorry didn't realise you still wanted it will pop it back.

No, I don't want it to be user-selectable.

This is defined by a non-empty summary near to the type of the option
(bool, tristate). The help text is orthogonal to this.

...

> > > +       if (!strcmp(gdev_node->name, GPIOLIB_SWNODE_UNDEFINED_NAME))
> > > +               return ERR_PTR(-ENOENT);
> >
> > This is a dead code when the respective config option is not selected.
> > Or actually a potential flaw if somebody else names their swnode like
> > this.
>
> Can add a check for the config.

Maybe something like

    if (IS_ENABLED(...) &&
        !strcmp(...))

...

> > > +       ret = software_node_register(&swnode_gpio_undefined);
> > > +       if (ret < 0)
> > > +               pr_err("gpiolib: failed to register swnode: %d\n", ret);
> >
> > Instead of this prefix, define pr_fmt()
>
> Little iffy on this, there are other prints in gpiolib that do it
> this way as well, I guess I could add a patch to convert
> everything but its starting to get a little out of the thrust of
> what I am doing here.

That's why I'm talking only about this (gpiolib-swnode) module where
you can have it as

  "gpiolib: swnode: " fmt

or alike

-- 
With Best Regards,
Andy Shevchenko

  reply	other threads:[~2024-04-11 16:51 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-04-11  9:06 [PATCH 0/4] Add bridged amplifiers to cs42l43 Charles Keepax
2024-04-11  9:06 ` [PATCH v5 1/4] gpio: swnode: Add ability to specify native chip selects for SPI Charles Keepax
2024-04-11 13:25   ` Andy Shevchenko
2024-04-11 16:44     ` Charles Keepax
2024-04-11 16:50       ` Andy Shevchenko [this message]
2024-04-11 16:58         ` Charles Keepax
2024-04-11  9:06 ` [PATCH v5 2/4] spi: Switch to using is_acpi_device_node() in spi_dev_set_name() Charles Keepax
2024-04-11 13:30   ` Andy Shevchenko
2024-04-11 16:56     ` Charles Keepax
2024-04-11 18:09       ` Andy Shevchenko
2024-04-11  9:06 ` [PATCH v5 3/4] spi: Update swnode based SPI devices to use the fwnode name Charles Keepax
2024-04-11 13:33   ` Andy Shevchenko
2024-04-11 17:04     ` Charles Keepax
2024-04-11 18:07       ` Andy Shevchenko
2024-04-11  9:06 ` [PATCH v5 4/4] spi: cs42l43: Add bridged cs35l56 amplifiers Charles Keepax
2024-04-11 14:04   ` Andy Shevchenko
2024-04-11 14:06     ` Andy Shevchenko
2024-04-11 14:07       ` Andy Shevchenko
2024-04-11 17:13     ` Charles Keepax
2024-04-11 18:17       ` Andy Shevchenko
2024-04-15 13:39         ` Charles Keepax
2024-04-15 16:03           ` Andy Shevchenko
2024-04-11 11:46 ` [PATCH 0/4] Add bridged amplifiers to cs42l43 Andy Shevchenko

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAHp75Vdb7Op-ddo5RxZuMYLFBjGbGxtQaZA0yE8pfXQBcLH5GA@mail.gmail.com \
    --to=andy.shevchenko@gmail.com \
    --cc=bard.liao@intel.com \
    --cc=brgl@bgdev.pl \
    --cc=broonie@kernel.org \
    --cc=ckeepax@opensource.cirrus.com \
    --cc=linus.walleij@linaro.org \
    --cc=linux-gpio@vger.kernel.org \
    --cc=linux-spi@vger.kernel.org \
    --cc=patches@opensource.cirrus.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).