Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

overlays: gpio-led: new overlay #4206

Merged
merged 1 commit into from
Mar 15, 2021
Merged

Conversation

agordon
Copy link

@agordon agordon commented Mar 12, 2021

Add generic connection between the kernel's LED framework and
RPI's GPIO pins.

Signed-off-by: Assaf Gordon [email protected]

@agordon
Copy link
Author

agordon commented Mar 12, 2021

Hello RPI developers,

I'd like to suggest the following small addition to the RPI's overlays: the ability to connect a LED to any output GPIO. Similar to gpio-key in nature, with the advantage of using the kernel's LED system, so able to connect a LED to a kernel trigger (e.g. cpu load / heartbeat / panic / etc ).
(I'm not a kernel developer, and I'm happy to adjust if needed to suit the coding style - let me know.)

Copy link
Contributor

@pelwell pelwell left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What a coincidence - I was thinking about adding a similar overlay only yesterday in response to a Forum post: https://www.raspberrypi.org/forums/viewtopic.php?f=107&t=306585

This is basically fine as is - I just have a few suggestions and requests - but it does need an entry in the Makefile otherwise it won't get built (alphabetical order applies there as well).

arch/arm/boot/dts/overlays/README Show resolved Hide resolved
arch/arm/boot/dts/overlays/gpio-led-overlay.dts Outdated Show resolved Hide resolved
label = "myled1";
gpios = <&gpio 19 0>;

linux,default-trigger = "none";
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wouldn't default-on be a more useful default?

@agordon
Copy link
Author

agordon commented Mar 14, 2021

Hi,
Thanks for the feedback, I updated the PR, except changing the default trigger to 'default-on' - I'm not sure about that - do we want to force users to turn on LEDs as default?

@pelwell
Copy link
Contributor

pelwell commented Mar 14, 2021

It still needs a Makefile entry, but I'll accept the none trigger.

Add generic connection between the kernel's LED framework and
RPI's GPIO pins.

Signed-off-by: Assaf Gordon <[email protected]>
@pelwell pelwell merged commit ac3ead8 into raspberrypi:rpi-5.10.y Mar 15, 2021
popcornmix added a commit to raspberrypi/firmware that referenced this pull request Mar 15, 2021
kernel: drm/vc4: crtc: Reduce PV fifo threshold on hvs4
See: raspberrypi/linux#4207

kernel: vc4/drm: Adjustments to hdmi audio dma to reduce glitches
See: raspberrypi/linux#4208

kernel: overlays: gpio-led: new overlay
See: raspberrypi/linux#4206

kernel: bcm2835-codec tweaks
See: raspberrypi/linux#4113

kernel: Assign crypto aliases to different AES implementation modules
See: raspberrypi/linux#4198

kernel: media: bcm2835-unicam: Fix bug in buffer swapping logic
See: raspberrypi/linux#4189

kernel: configs: Add CONFIG_RTS_HCTOSYS=y
See: raspberrypi/linux#4205

kernel: overlays: Improve the i2c-rtc,i2c_csi_dsi option

firmware: video_decode: For VC1/WMV with no signalled header bytes, use start of 1st buffer
See: raspberrypi/linux#4113
popcornmix added a commit to Hexxeh/rpi-firmware that referenced this pull request Mar 15, 2021
kernel: drm/vc4: crtc: Reduce PV fifo threshold on hvs4
See: raspberrypi/linux#4207

kernel: vc4/drm: Adjustments to hdmi audio dma to reduce glitches
See: raspberrypi/linux#4208

kernel: overlays: gpio-led: new overlay
See: raspberrypi/linux#4206

kernel: bcm2835-codec tweaks
See: raspberrypi/linux#4113

kernel: Assign crypto aliases to different AES implementation modules
See: raspberrypi/linux#4198

kernel: media: bcm2835-unicam: Fix bug in buffer swapping logic
See: raspberrypi/linux#4189

kernel: configs: Add CONFIG_RTS_HCTOSYS=y
See: raspberrypi/linux#4205

kernel: overlays: Improve the i2c-rtc,i2c_csi_dsi option

firmware: video_decode: For VC1/WMV with no signalled header bytes, use start of 1st buffer
See: raspberrypi/linux#4113
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants