All of lore.kernel.org
 help / color / mirror / Atom feed
* I2C, SPI, etc for libgpiod
@ 2023-01-31 16:47 Hank Barta
  2023-01-31 17:59 ` Bartosz Golaszewski
  0 siblings, 1 reply; 3+ messages in thread
From: Hank Barta @ 2023-01-31 16:47 UTC (permalink / raw)
  To: linux-gpio

Hi all,
I've been fooling around with libgpiod on Debian (not R-Pi OS) and am
fairly comfortable using the APIs it provides. I haven't finished that
exploration yet, but looking ahead, I'm curious about usage of some of
the alternate GPIO capabilities aside from reading and setting inputs
and outputs. I haven't seen anything about those in the information I
find for https://libgpiod.readthedocs.io or
https://git.kernel.org/pub/scm/libs/libgpiod/libgpiod.git/.

Is there support for these alternate functions or is that something on
someone's TODO list? Are there other libraries or APIs that I can use?

I've used WiringPi on R-Pi OS but that project seems to be foundering.

Thanks!

NB: I'm stupidly/bravely sharing my efforts in this direction at
https://github.com/HankB/GPIOD_Debian_Raspberry_Pi

-- 
Beautiful Sunny Winfield

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

* Re: I2C, SPI, etc for libgpiod
  2023-01-31 16:47 I2C, SPI, etc for libgpiod Hank Barta
@ 2023-01-31 17:59 ` Bartosz Golaszewski
       [not found]   ` <CABTDG8-5Cch9vS6kWqQp+RGV082CfMT7gv1QiO1n9y6YzSR4Eg@mail.gmail.com>
  0 siblings, 1 reply; 3+ messages in thread
From: Bartosz Golaszewski @ 2023-01-31 17:59 UTC (permalink / raw)
  To: Hank Barta; +Cc: linux-gpio

On Tue, Jan 31, 2023 at 5:47 PM Hank Barta <hbarta@gmail.com> wrote:
>
> Hi all,
> I've been fooling around with libgpiod on Debian (not R-Pi OS) and am
> fairly comfortable using the APIs it provides. I haven't finished that
> exploration yet, but looking ahead, I'm curious about usage of some of
> the alternate GPIO capabilities aside from reading and setting inputs
> and outputs. I haven't seen anything about those in the information I
> find for https://libgpiod.readthedocs.io or
> https://git.kernel.org/pub/scm/libs/libgpiod/libgpiod.git/.
>
> Is there support for these alternate functions or is that something on
> someone's TODO list? Are there other libraries or APIs that I can use?
>
> I've used WiringPi on R-Pi OS but that project seems to be foundering.
>
> Thanks!
>
> NB: I'm stupidly/bravely sharing my efforts in this direction at
> https://github.com/HankB/GPIOD_Debian_Raspberry_Pi
>
> --
> Beautiful Sunny Winfield

Is your question: will libgpiod support other pin functions for GPIOs?
If so then: no, it will not. It's not a tool that allows you to change
pin settings - it merely wraps the linux character device uAPI in a
set of functions.

It's the kernel's job to do pin control and there are other user-space
tools for I2C and SPI available, libgpiod is only for GPIOs.

Bart

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

* Re: I2C, SPI, etc for libgpiod
       [not found]   ` <CABTDG8-5Cch9vS6kWqQp+RGV082CfMT7gv1QiO1n9y6YzSR4Eg@mail.gmail.com>
@ 2023-01-31 19:52     ` Bartosz Golaszewski
  0 siblings, 0 replies; 3+ messages in thread
From: Bartosz Golaszewski @ 2023-01-31 19:52 UTC (permalink / raw)
  To: Hank Barta, open list:GPIO SUBSYSTEM

On Tue, Jan 31, 2023 at 8:32 PM Hank Barta <hbarta@gmail.com> wrote:
>
> Thank you for clarifying.
>
> Can you point me to the other user-space tools or help with search
> strings? So far I've not had any luck finding them.
>

i2c-tools is the official toolset for I2C on linux:
https://i2c.wiki.kernel.org/index.php/I2C_Tools

spi-tools seems to be the maintained package for user-space spidev:
https://github.com/cpb-/spi-tools

Personally I use the following python modules on linux:
https://pypi.org/project/smbus2/ https://pypi.org/project/spidev/

> best,
>
>
> PS: Gmail thought it best to reply directly to you but if you think
> appropriate, please share your reply with the list.
>

Yes, no harm in responding directly on the list.

Bart

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

end of thread, other threads:[~2023-01-31 19:52 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-01-31 16:47 I2C, SPI, etc for libgpiod Hank Barta
2023-01-31 17:59 ` Bartosz Golaszewski
     [not found]   ` <CABTDG8-5Cch9vS6kWqQp+RGV082CfMT7gv1QiO1n9y6YzSR4Eg@mail.gmail.com>
2023-01-31 19:52     ` Bartosz Golaszewski

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.