GPIO LED configuration

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

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.

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

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