Lines Matching defs:state
79 int ret, state;
93 state = gpiod_get_value_cansleep(led_dat->gpiod);
94 if (state < 0)
95 return state;
97 state = (template->default_state == LEDS_GPIO_DEFSTATE_ON);
99 led_dat->cdev.brightness = state ? LED_FULL : LED_OFF;
107 ret = gpiod_direction_output(led_dat->gpiod, state);
146 const char *state = NULL;
163 if (!fwnode_property_read_string(child, "default-state",
164 &state)) {
165 if (!strcmp(state, "keep"))
167 else if (!strcmp(state, "on"))
173 if (fwnode_property_present(child, "retain-state-suspended"))
175 if (fwnode_property_present(child, "retain-state-shutdown"))