Quantcast
Channel: Raspberry Pi Forums
Viewing all articles
Browse latest Browse all 4896

Device Tree • Re: Basic guidance needed to inform Linux kernel of hardware connected to GPIO

$
0
0
I am familair with the pinout and understand how to manipulate GPIO in userspace. What I'm asking is, for example, to inform Linux subsystems thats GPIO X is connected to an LED, GPIO Y is connected to an active low button, etc.
Very helpful link! Thank you!
The gpio-key overlay in the standard Raspberry Pi kernel
https://github.com/raspberrypi/linux/bl ... 1517-L1535

Code:

Info:   This is a generic overlay for activating GPIO keypresses using        the gpio-keys library and this dtoverlay. Multiple keys can be        set up using multiple calls to the overlay for configuring        additional buttons or joysticks. You can see available keycodes        at https://github.com/torvalds/linux/blob/v4.12/include/uapi/        linux/input-event-codes.h#L64
Thanks, there's a lot of documention in this repo to review. A tangent question: is config.txt unique to Debian-based OSes ?

Statistics: Posted by rapwiyeko — Tue May 07, 2024 3:37 pm



Viewing all articles
Browse latest Browse all 4896

Trending Articles