# GPIO LED configuration

**URL:** <https://forum.openwrt.org/t/gpio-led-configuration/42399>\
**Category:** For Developers\
**Created:** [August 9, 2019, 10:08am UTC](https://forum.openwrt.org/t/gpio-led-configuration/42399 "2019-08-09T10:08:22Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![leventelist](https://forum.openwrt.org/user_avatar/forum.openwrt.org/leventelist/32/1709_2.png) [@leventelist](https://forum.openwrt.org/u/leventelist)\
**Post date:** [August 9, 2019, 10:08am UTC](https://forum.openwrt.org/t/gpio-led-configuration/42399/1 "2019-08-09T10:08:23Z")

</div>

I want to use GPIO LEDs on the WizFi630a module. In the DTS I have this:

> gpio-leds {  
> compatible = "gpio-leds";
> 
> ```
> run {
> label = "wizfi630a::run";
> gpios = <&gpio0 21 GPIO_ACTIVE_LOW>;
> };
> 
> wifi {
> label = "wizfi630a::wifi";
> gpios = <&gpio0 18 GPIO_ACTIVE_LOW>;
> };
> 
> ```
> 
> };

But the LEDs doesn't show up in /sys/class/leds/.

I have this error message in the logs:

> leds-gpio: probe of gpio-leds failed with error -16

What do I do wrong?

Thanks,  
Levente

---

<div class="post-metadata">

**Author:** ![jeff](https://forum.openwrt.org/letter_avatar/jeff/32/5_5575768a8748004e209b776fc1b2916d.png) [@jeff](https://forum.openwrt.org/u/jeff)\
**Post date:** [August 9, 2019, 12:49pm UTC](https://forum.openwrt.org/t/gpio-led-configuration/42399/2 "2019-08-09T12:49:13Z")

</div>

Are the GPIOs themselves enabled by your DTS (or something it includes)? Often there is a driver for the GPIO subsystem that needs to b configured as well, `gpio0` in this case.

---

<div class="post-metadata">

**Author:** ![leventelist](https://forum.openwrt.org/user_avatar/forum.openwrt.org/leventelist/32/1709_2.png) [@leventelist](https://forum.openwrt.org/u/leventelist)\
**Post date:** [August 12, 2019, 11:01am UTC](https://forum.openwrt.org/t/gpio-led-configuration/42399/3 "2019-08-12T11:01:53Z")

</div>

Jeff, thank you for the reply. It turned out that there was a typo in the DTS.

---

<div class="post-metadata">

**Author:** ![system](https://forum.openwrt.org/uploads/default/original/3X/7/4/740520c71f00039bbf001045c682f0ecb25e905a.png) [@system](https://forum.openwrt.org/u/system)\
**Post date:** [August 22, 2019, 11:01am UTC](https://forum.openwrt.org/t/gpio-led-configuration/42399/4 "2019-08-22T11:01:56Z")

</div>

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.
