linux-acpi.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Andy Shevchenko <andy.shevchenko@gmail.com>
To: Asmaa Mnebhi <asmaa@nvidia.com>
Cc: "linus.walleij@linaro.org" <linus.walleij@linaro.org>,
	"bgolaszewski@baylibre.com" <bgolaszewski@baylibre.com>,
	"niyas.sait@linaro.org" <niyas.sait@linaro.org>,
	"linux-gpio@vger.kernel.org" <linux-gpio@vger.kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"linux-acpi@vger.kernel.org" <linux-acpi@vger.kernel.org>
Subject: Re: [PATCH v4 2/2] pinctrl: pinctrl-mlxbf: Add pinctrl driver support
Date: Fri, 24 Feb 2023 11:44:07 +0200	[thread overview]
Message-ID: <CAHp75VdFsxPPnNES0KS2koUGZz1C9dbNZbRtCRQBsFb1csqL7A@mail.gmail.com> (raw)
In-Reply-To: <CH2PR12MB38959833A5A4073F8B2A84FDD7AB9@CH2PR12MB3895.namprd12.prod.outlook.com>

On Thu, Feb 23, 2023 at 11:07 PM Asmaa Mnebhi <asmaa@nvidia.com> wrote:
>
> > > +static const struct {
> > > +       const char *name;
> > > +       const char * const *group_names;
> >
> > Use this instead
> > https://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-
> > pinctrl.git/tree/include/linux/pinctrl/pinctrl.h?h=devel#n215
> > and this
> > https://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-
> > pinctrl.git/tree/include/linux/pinctrl/pinctrl.h?h=devel#n222
> >
> > > +} mlxbf_pmx_funcs[] = {
> >
> > > +};
>
> so copy that struct definition and macro to my driver? (I don’t see these code changes in master)

Which master?

First of all, you should do your development based on the "for-next"
of the respective subsystem (okay, for pin control Linus Walleij
called his published branch "devel"). So, the above mentioned
functionality was there a while ago.

Second, a couple of days ago Linus Torvalds pulled PR, so it's part of
upstream now.

TL;DR: just use those types and macros in your code.

> > > +       /* This resource is shared so use devm_ioremap */
> >
> > Can you elaborate on who actually requests the region? And why is it not
> > _this_ driver?
>
> This resource is shared with the gpio-mlxbf3.c driver. The gpio-mlxbf3.c driver does not access the same offsets as the pinctrl-mlxbf3.c driver, but it accesses several other registers offsets in between.

Okay, so in such a case you need a common denominator that actually
does this all for you via, for example, regmap. If the region is not
requested, bad things may happen.

-- 
With Best Regards,
Andy Shevchenko

  reply	other threads:[~2023-02-24  9:44 UTC|newest]

Thread overview: 35+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-02-10 15:39 [PATCH v3 0/2] Add NVIDIA BlueField-3 GPIO driver and pin controller Asmaa Mnebhi
2023-02-10 15:39 ` [PATCH v3 1/2] Support NVIDIA BlueField-3 GPIO controller Asmaa Mnebhi
2023-02-11  7:37   ` kernel test robot
2023-02-11 11:51   ` Andy Shevchenko
2023-02-13 23:14     ` Asmaa Mnebhi
2023-02-13 23:39       ` andy.shevchenko
2023-02-10 15:39 ` [PATCH v3 2/2] Support NVIDIA BlueField-3 pinctrl driver Asmaa Mnebhi
2023-02-11 11:55   ` Andy Shevchenko
2023-02-16 17:50     ` Asmaa Mnebhi
2023-02-16 18:38       ` Andy Shevchenko
2023-02-16 18:44         ` Asmaa Mnebhi
2023-02-16 18:53           ` Andy Shevchenko
2023-02-16 19:26             ` Asmaa Mnebhi
2023-02-11 11:58 ` [PATCH v3 0/2] Add NVIDIA BlueField-3 GPIO driver and pin controller Andy Shevchenko
2023-02-17 21:26 ` [PATCH v4 0/2] Support Nvidia " Asmaa Mnebhi
2023-02-17 21:26   ` [PATCH v4 1/2] gpio: gpio-mlxbf3: Add gpio driver support Asmaa Mnebhi
2023-02-17 23:07     ` Andy Shevchenko
2023-02-22 18:40       ` Asmaa Mnebhi
2023-02-23 11:06         ` Andy Shevchenko
2023-02-23 19:08           ` Asmaa Mnebhi
2023-02-23 19:58             ` Andy Shevchenko
2023-02-23 22:51               ` Asmaa Mnebhi
2023-02-24  9:47                 ` Andy Shevchenko
2023-02-24 14:42                   ` Asmaa Mnebhi
2023-02-24 15:12                     ` Andy Shevchenko
2023-02-24 15:59                       ` Asmaa Mnebhi
2023-02-24 15:13                     ` Andy Shevchenko
2023-02-24 15:14                       ` Andy Shevchenko
2023-02-18  1:05     ` kernel test robot
2023-02-23 12:29     ` Linus Walleij
2023-02-17 21:26   ` [PATCH v4 2/2] pinctrl: pinctrl-mlxbf: Add pinctrl " Asmaa Mnebhi
2023-02-17 23:24     ` Andy Shevchenko
2023-02-23 21:07       ` Asmaa Mnebhi
2023-02-24  9:44         ` Andy Shevchenko [this message]
2023-03-14 20:30           ` Asmaa Mnebhi

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=CAHp75VdFsxPPnNES0KS2koUGZz1C9dbNZbRtCRQBsFb1csqL7A@mail.gmail.com \
    --to=andy.shevchenko@gmail.com \
    --cc=asmaa@nvidia.com \
    --cc=bgolaszewski@baylibre.com \
    --cc=linus.walleij@linaro.org \
    --cc=linux-acpi@vger.kernel.org \
    --cc=linux-gpio@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=niyas.sait@linaro.org \
    /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).