From: Bough Chen <haibo.chen@nxp.com>
To: Andy Shevchenko <andy.shevchenko@gmail.com>
Cc: Linus Walleij <linus.walleij@linaro.org>,
Bartosz Golaszewski <brgl@bgdev.pl>,
"open list:GPIO SUBSYSTEM" <linux-gpio@vger.kernel.org>,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
dl-linux-imx <linux-imx@nxp.com>
Subject: RE: [PATCH v2] gpio: Allow setting gpio device id via device tree alias
Date: Tue, 22 Mar 2022 10:16:37 +0000 [thread overview]
Message-ID: <AM0PR04MB4001E8E8DA1DF5355EB96A2B90179@AM0PR04MB4001.eurprd04.prod.outlook.com> (raw)
In-Reply-To: <CAHp75VdZ9RVuMrgWXOWqCrmvHBtkz+S=dxXhR44Ri3p6Pj5LMA@mail.gmail.com>
[-- Attachment #1: Type: text/plain, Size: 1844 bytes --]
> -----Original Message-----
> From: Andy Shevchenko [mailto:andy.shevchenko@gmail.com]
> Sent: 2022年3月22日 16:45
> To: Bough Chen <haibo.chen@nxp.com>
> Cc: Linus Walleij <linus.walleij@linaro.org>; Bartosz Golaszewski
> <brgl@bgdev.pl>; open list:GPIO SUBSYSTEM <linux-gpio@vger.kernel.org>;
> Linux Kernel Mailing List <linux-kernel@vger.kernel.org>; dl-linux-imx
> <linux-imx@nxp.com>
> Subject: Re: [PATCH v2] gpio: Allow setting gpio device id via device tree alias
>
> On Tue, Mar 22, 2022 at 7:52 AM <haibo.chen@nxp.com> wrote:
> >
> > From: Haibo Chen <haibo.chen@nxp.com>
> >
> > For some SoCs which contain different cores, like few ARM A cores and
> > few ARM M cores. Some GPIO controllers like GPIO3/GPIO4/GPIO5 belong
> > to A core domain, some GPIO controllers like GPIO1/GPIO2 belong to M
> > core domain. Linux only cover A cores, without gpio alias, we can get
> > gpiochip0/gpiochip1/gpiochip2 to map the real GPIO3/GPIO4/GPIO5, it's
> > difficult for users to identify this map relation, and hardcode the
> > gpio device index. With gpio alias,
>
> With the GPIO
>
> > we can easily make gpiochip3 map to GPIO3, gpiochip4 map to GPIO4.
> > For GPIO controllers do not claim the alias, it will get one id
>
> If GPIO
>
> > which larger than all the claimed aliases.
>
> which is
>
> ...
>
> I'm not sure I understand the issue. The other GPIO drivers and hence user
> space (which is already quite a question why user space needs
> this) may distinguish the GPIO chips by labels and device names.
> What's wrong with that approach?
For users, usually, they will open /dev/gpiochipx to handle gpio related option.
By the way, how can user get the labels and device names of GPIO chips?
Best Regards
Haibo Chen
>
> --
> With Best Regards,
> Andy Shevchenko
[-- Attachment #2: smime.p7s --]
[-- Type: application/pkcs7-signature, Size: 9551 bytes --]
next prev parent reply other threads:[~2022-03-22 10:16 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-03-22 5:40 haibo.chen
2022-03-22 8:45 ` Andy Shevchenko
2022-03-22 10:16 ` Bough Chen [this message]
2022-03-27 23:07 ` Linus Walleij
2022-03-27 23:03 ` Linus Walleij
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=AM0PR04MB4001E8E8DA1DF5355EB96A2B90179@AM0PR04MB4001.eurprd04.prod.outlook.com \
--to=haibo.chen@nxp.com \
--cc=andy.shevchenko@gmail.com \
--cc=brgl@bgdev.pl \
--cc=linus.walleij@linaro.org \
--cc=linux-gpio@vger.kernel.org \
--cc=linux-imx@nxp.com \
--cc=linux-kernel@vger.kernel.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
all inboxes | Powered by JetHome®