Lines Matching refs:led
588 struct lubbock_led *led = container_of(cdev, in lubbock_led_set() local
593 reg |= led->mask; in lubbock_led_set()
595 reg &= ~led->mask; in lubbock_led_set()
602 struct lubbock_led *led = container_of(cdev, in lubbock_led_get() local
606 return (reg & led->mask) ? LED_FULL : LED_OFF; in lubbock_led_get()
619 struct lubbock_led *led; in lubbock_leds_init() local
621 led = kzalloc(sizeof(*led), GFP_KERNEL); in lubbock_leds_init()
622 if (!led) in lubbock_leds_init()
625 led->cdev.name = lubbock_leds[i].name; in lubbock_leds_init()
626 led->cdev.brightness_set = lubbock_led_set; in lubbock_leds_init()
627 led->cdev.brightness_get = lubbock_led_get; in lubbock_leds_init()
628 led->cdev.default_trigger = lubbock_leds[i].trigger; in lubbock_leds_init()
629 led->mask = BIT(i); in lubbock_leds_init()
631 if (led_classdev_register(NULL, &led->cdev) < 0) { in lubbock_leds_init()
632 kfree(led); in lubbock_leds_init()