[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <AM0PR04MB4001E8E8DA1DF5355EB96A2B90179@AM0PR04MB4001.eurprd04.prod.outlook.com>
Date: Tue, 22 Mar 2022 10:16:37 +0000
From: Bough Chen <haibo.chen@....com>
To: Andy Shevchenko <andy.shevchenko@...il.com>
CC: Linus Walleij <linus.walleij@...aro.org>,
Bartosz Golaszewski <brgl@...ev.pl>,
"open list:GPIO SUBSYSTEM" <linux-gpio@...r.kernel.org>,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
dl-linux-imx <linux-imx@....com>
Subject: RE: [PATCH v2] gpio: Allow setting gpio device id via device tree
alias
> -----Original Message-----
> From: Andy Shevchenko [mailto:andy.shevchenko@...il.com]
> Sent: 2022年3月22日 16:45
> To: Bough Chen <haibo.chen@....com>
> Cc: Linus Walleij <linus.walleij@...aro.org>; Bartosz Golaszewski
> <brgl@...ev.pl>; open list:GPIO SUBSYSTEM <linux-gpio@...r.kernel.org>;
> Linux Kernel Mailing List <linux-kernel@...r.kernel.org>; dl-linux-imx
> <linux-imx@....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@....com> wrote:
> >
> > From: Haibo Chen <haibo.chen@....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
Download attachment "smime.p7s" of type "application/pkcs7-signature" (9551 bytes)
Powered by blists - more mailing lists