Lines Matching refs:template
74 static int create_gpio_led(const struct gpio_led *template, in create_gpio_led() argument
81 led_dat->cdev.default_trigger = template->default_trigger; in create_gpio_led()
92 if (template->default_state == LEDS_GPIO_DEFSTATE_KEEP) { in create_gpio_led()
97 state = (template->default_state == LEDS_GPIO_DEFSTATE_ON); in create_gpio_led()
100 if (!template->retain_state_suspended) in create_gpio_led()
102 if (template->panic_indicator) in create_gpio_led()
104 if (template->retain_state_shutdown) in create_gpio_led()
111 if (template->name) { in create_gpio_led()
112 led_dat->cdev.name = template->name; in create_gpio_led()
202 const struct gpio_led *template) in gpio_led_get_gpiod() argument
216 gpiod_set_consumer_name(gpiod, template->name); in gpio_led_get_gpiod()
229 if (!gpio_is_valid(template->gpio)) in gpio_led_get_gpiod()
232 if (template->active_low) in gpio_led_get_gpiod()
235 ret = devm_gpio_request_one(dev, template->gpio, flags, in gpio_led_get_gpiod()
236 template->name); in gpio_led_get_gpiod()
240 gpiod = gpio_to_desc(template->gpio); in gpio_led_get_gpiod()
261 const struct gpio_led *template = &pdata->leds[i]; in gpio_led_probe() local
264 if (template->gpiod) in gpio_led_probe()
265 led_dat->gpiod = template->gpiod; in gpio_led_probe()
269 i, template); in gpio_led_probe()
272 template->gpio, template->name); in gpio_led_probe()
276 ret = create_gpio_led(template, led_dat, in gpio_led_probe()