Lines Matching +full:gpio +full:- +full:leds
3 * Uwe Kleine-Koenig <u.kleine-koenig@pengutronix.de>
10 #include <linux/leds.h>
15 * gpio_led_register_device - register a gpio-led device
18 * Makes a copy of pdata and pdata->leds and registers a new leds-gpio device
19 * with the result. This allows to have pdata and pdata-leds in .init.rodata
31 if (!pdata->num_leds) in gpio_led_register_device()
32 return ERR_PTR(-EINVAL); in gpio_led_register_device()
34 _pdata.leds = kmemdup(pdata->leds, in gpio_led_register_device()
35 pdata->num_leds * sizeof(*pdata->leds), GFP_KERNEL); in gpio_led_register_device()
36 if (!_pdata.leds) in gpio_led_register_device()
37 return ERR_PTR(-ENOMEM); in gpio_led_register_device()
39 ret = platform_device_register_resndata(NULL, "leds-gpio", id, in gpio_led_register_device()
42 kfree(_pdata.leds); in gpio_led_register_device()