Lines Matching refs:led
690 struct netwinder_led *led = container_of(cdev, in netwinder_led_set() local
698 reg &= ~led->mask; in netwinder_led_set()
700 reg |= led->mask; in netwinder_led_set()
701 nw_gpio_modify_op(led->mask, reg); in netwinder_led_set()
707 struct netwinder_led *led = container_of(cdev, in netwinder_led_get() local
716 return (reg & led->mask) ? LED_OFF : LED_FULL; in netwinder_led_get()
727 struct netwinder_led *led; in netwinder_leds_init() local
729 led = kzalloc(sizeof(*led), GFP_KERNEL); in netwinder_leds_init()
730 if (!led) in netwinder_leds_init()
733 led->cdev.name = netwinder_leds[i].name; in netwinder_leds_init()
734 led->cdev.brightness_set = netwinder_led_set; in netwinder_leds_init()
735 led->cdev.brightness_get = netwinder_led_get; in netwinder_leds_init()
736 led->cdev.default_trigger = netwinder_leds[i].trigger; in netwinder_leds_init()
739 led->mask = GPIO_GREEN_LED; in netwinder_leds_init()
741 led->mask = GPIO_RED_LED; in netwinder_leds_init()
743 if (led_classdev_register(NULL, &led->cdev) < 0) { in netwinder_leds_init()
744 kfree(led); in netwinder_leds_init()