Lines Matching +full:gpio +full:- +full:leds
1 // SPDX-License-Identifier: GPL-2.0-only
3 * Shared helpers to register GPIO-connected buttons and LEDs
8 #include <linux/gpio/machine.h>
9 #include <linux/gpio/property.h>
11 #include <linux/leds.h>
15 #include "geode-common.h"
18 .name = "cs5535-gpio",
22 PROPERTY_ENTRY_U32("poll-interval", 20),
27 .name = "geode-gpio-keys",
32 { /* Placeholder for GPIO property */ },
35 PROPERTY_ENTRY_U32("debounce-interval", 100),
52 * Creates gpio-keys-polled device for the restart key.
55 * because it registers gpiochip software node used by both gpio-keys and
56 * leds-gpio devices.
61 .name = "gpio-keys-polled", in geode_create_restart_key()
73 pr_err("failed to register gpio-keys software nodes: %d\n", err); in geode_create_restart_key()
82 pr_err("failed to create gpio-keys device: %d\n", err); in geode_create_restart_key()
91 .name = "geode-leds",
96 int __init geode_create_leds(const char *label, const struct geode_led *leds, in geode_create_leds() argument
103 .name = "leds-gpio", in geode_create_leds()
112 pr_err("%s: too many LEDs\n", __func__); in geode_create_leds()
113 return -EINVAL; in geode_create_leds()
118 return -ENOMEM; in geode_create_leds()
122 * "linux,default-trigger", and am empty terminator. in geode_create_leds()
126 err = -ENOMEM; in geode_create_leds()
134 err = -ENOMEM; in geode_create_leds()
140 leds[i].pin, GPIO_ACTIVE_LOW); in geode_create_leds()
142 PROPERTY_ENTRY_STRING("linux,default-trigger", in geode_create_leds()
143 leds[i].default_on ? in geode_create_leds()
144 "default-on" : "default-off"); in geode_create_leds()
172 while (--i >= 0) in geode_create_leds()