All of lore.kernel.org
 help / color / mirror / Atom feed
* Getting gpios from user space based on gpio-line-names
@ 2017-07-03 13:01 Michal Simek
  2017-07-03 13:06 ` Bartosz Golaszewski
  2017-07-09  7:59 ` Linus Walleij
  0 siblings, 2 replies; 5+ messages in thread
From: Michal Simek @ 2017-07-03 13:01 UTC (permalink / raw)
  To: linux-gpio; +Cc: Linus Walleij


[-- Attachment #1.1: Type: text/plain, Size: 659 bytes --]

Hi,

I am trying to find some docs about how to ask for gpio line
based on gpio-line-names in DT. I see line names available via debugfs
which is not suitable for production.
And also I didn't find a way how to ask for gpio Linux number from user
space to start to work with them.
This is for gpio mraa integration which depends on Linux gpio line numbers.

Thanks,
Michal

-- 
Michal Simek, Ing. (M.Eng), OpenPGP -> KeyID: FE3D1F91
w: www.monstr.eu p: +42-0-721842854
Maintainer of Linux kernel - Xilinx Microblaze
Maintainer of Linux kernel - Xilinx Zynq ARM and ZynqMP ARM64 SoCs
U-Boot custodian - Xilinx Microblaze/Zynq/ZynqMP SoCs



[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 198 bytes --]

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Getting gpios from user space based on gpio-line-names
  2017-07-03 13:01 Getting gpios from user space based on gpio-line-names Michal Simek
@ 2017-07-03 13:06 ` Bartosz Golaszewski
  2017-07-04 10:57   ` Michal Simek
  2017-07-09  7:59 ` Linus Walleij
  1 sibling, 1 reply; 5+ messages in thread
From: Bartosz Golaszewski @ 2017-07-03 13:06 UTC (permalink / raw)
  To: monstr; +Cc: linux-gpio, Linus Walleij

2017-07-03 15:01 GMT+02:00 Michal Simek <monstr@monstr.eu>:
> Hi,
>
> I am trying to find some docs about how to ask for gpio line
> based on gpio-line-names in DT. I see line names available via debugfs
> which is not suitable for production.
> And also I didn't find a way how to ask for gpio Linux number from user
> space to start to work with them.
> This is for gpio mraa integration which depends on Linux gpio line numbers.
>
> Thanks,
> Michal
>
> --
> Michal Simek, Ing. (M.Eng), OpenPGP -> KeyID: FE3D1F91
> w: www.monstr.eu p: +42-0-721842854
> Maintainer of Linux kernel - Xilinx Microblaze
> Maintainer of Linux kernel - Xilinx Zynq ARM and ZynqMP ARM64 SoCs
> U-Boot custodian - Xilinx Microblaze/Zynq/ZynqMP SoCs
>
>

Hi Michal,

you can try libgpiod[1] and specifically the gpiofind tool included in
the repository. Buildroot has this package should you need to build a
rootfs for some specific target.

Best regards,
Bartosz Golaszewski

[1] https://github.com/brgl/libgpiod

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Getting gpios from user space based on gpio-line-names
  2017-07-03 13:06 ` Bartosz Golaszewski
@ 2017-07-04 10:57   ` Michal Simek
  0 siblings, 0 replies; 5+ messages in thread
From: Michal Simek @ 2017-07-04 10:57 UTC (permalink / raw)
  To: Bartosz Golaszewski; +Cc: linux-gpio, Linus Walleij


[-- Attachment #1.1: Type: text/plain, Size: 1521 bytes --]

On 3.7.2017 15:06, Bartosz Golaszewski wrote:
> 2017-07-03 15:01 GMT+02:00 Michal Simek <monstr@monstr.eu>:
>> Hi,
>>
>> I am trying to find some docs about how to ask for gpio line
>> based on gpio-line-names in DT. I see line names available via debugfs
>> which is not suitable for production.
>> And also I didn't find a way how to ask for gpio Linux number from user
>> space to start to work with them.
>> This is for gpio mraa integration which depends on Linux gpio line numbers.
>>
>> Thanks,
>> Michal
>>
>> --
>> Michal Simek, Ing. (M.Eng), OpenPGP -> KeyID: FE3D1F91
>> w: www.monstr.eu p: +42-0-721842854
>> Maintainer of Linux kernel - Xilinx Microblaze
>> Maintainer of Linux kernel - Xilinx Zynq ARM and ZynqMP ARM64 SoCs
>> U-Boot custodian - Xilinx Microblaze/Zynq/ZynqMP SoCs
>>
>>
> 
> Hi Michal,
> 
> you can try libgpiod[1] and specifically the gpiofind tool included in
> the repository. Buildroot has this package should you need to build a
> rootfs for some specific target.
> 
> Best regards,
> Bartosz Golaszewski
> 
> [1] https://github.com/brgl/libgpiod
> 

Thanks. That's what I was looking for. I knew that there is new
interface but didn't have this link.

Thanks,
Michal


-- 
Michal Simek, Ing. (M.Eng), OpenPGP -> KeyID: FE3D1F91
w: www.monstr.eu p: +42-0-721842854
Maintainer of Linux kernel - Xilinx Microblaze
Maintainer of Linux kernel - Xilinx Zynq ARM and ZynqMP ARM64 SoCs
U-Boot custodian - Xilinx Microblaze/Zynq/ZynqMP SoCs



[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 198 bytes --]

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Getting gpios from user space based on gpio-line-names
  2017-07-03 13:01 Getting gpios from user space based on gpio-line-names Michal Simek
  2017-07-03 13:06 ` Bartosz Golaszewski
@ 2017-07-09  7:59 ` Linus Walleij
  2017-07-10  6:45   ` Michal Simek
  1 sibling, 1 reply; 5+ messages in thread
From: Linus Walleij @ 2017-07-09  7:59 UTC (permalink / raw)
  To: monstr; +Cc: linux-gpio

On Mon, Jul 3, 2017 at 3:01 PM, Michal Simek <monstr@monstr.eu> wrote:

> I am trying to find some docs about how to ask for gpio line
> based on gpio-line-names in DT. I see line names available via debugfs
> which is not suitable for production.

Bartosz library is the thing to use. There are simple examples in
tools/gpio as well.

> And also I didn't find a way how to ask for gpio Linux number from user
> space to start to work with them.
> This is for gpio mraa integration which depends on Linux gpio line numbers.

Hopefully it should not need specific numbers but instead go by name.
It'd be interesting to see how mraa properly uses this new ABI.

Yours,
Linus Walleij

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Getting gpios from user space based on gpio-line-names
  2017-07-09  7:59 ` Linus Walleij
@ 2017-07-10  6:45   ` Michal Simek
  0 siblings, 0 replies; 5+ messages in thread
From: Michal Simek @ 2017-07-10  6:45 UTC (permalink / raw)
  To: Linus Walleij; +Cc: linux-gpio, Manivannan Sadhasivam


[-- Attachment #1.1: Type: text/plain, Size: 1129 bytes --]

+Mani

On 9.7.2017 09:59, Linus Walleij wrote:
> On Mon, Jul 3, 2017 at 3:01 PM, Michal Simek <monstr@monstr.eu> wrote:
> 
>> I am trying to find some docs about how to ask for gpio line
>> based on gpio-line-names in DT. I see line names available via debugfs
>> which is not suitable for production.
> 
> Bartosz library is the thing to use. There are simple examples in
> tools/gpio as well.

Will look.

> 
>> And also I didn't find a way how to ask for gpio Linux number from user
>> space to start to work with them.
>> This is for gpio mraa integration which depends on Linux gpio line numbers.
> 
> Hopefully it should not need specific numbers but instead go by name.
> It'd be interesting to see how mraa properly uses this new ABI.

I was in touch with Mani and he is saying to send it within 2 days.

Thanks,
Michal

-- 
Michal Simek, Ing. (M.Eng), OpenPGP -> KeyID: FE3D1F91
w: www.monstr.eu p: +42-0-721842854
Maintainer of Linux kernel - Xilinx Microblaze
Maintainer of Linux kernel - Xilinx Zynq ARM and ZynqMP ARM64 SoCs
U-Boot custodian - Xilinx Microblaze/Zynq/ZynqMP SoCs



[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 198 bytes --]

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2017-07-10  6:45 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-07-03 13:01 Getting gpios from user space based on gpio-line-names Michal Simek
2017-07-03 13:06 ` Bartosz Golaszewski
2017-07-04 10:57   ` Michal Simek
2017-07-09  7:59 ` Linus Walleij
2017-07-10  6:45   ` Michal Simek

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.