Lines Matching refs:led
577 struct cpld_led *led = container_of(cdev, struct cpld_led, cdev); in cpld_led_set() local
581 reg &= ~led->mask; in cpld_led_set()
583 reg |= led->mask; in cpld_led_set()
589 struct cpld_led *led = container_of(cdev, struct cpld_led, cdev); in cpld_led_get() local
592 return (reg & led->mask) ? LED_OFF : LED_FULL; in cpld_led_get()
605 struct cpld_led *led; in cpld_leds_init() local
607 led = kzalloc(sizeof(*led), GFP_KERNEL); in cpld_leds_init()
608 if (!led) in cpld_leds_init()
611 led->cdev.name = cpld_leds[i].name; in cpld_leds_init()
612 led->cdev.brightness_set = cpld_led_set; in cpld_leds_init()
613 led->cdev.brightness_get = cpld_led_get; in cpld_leds_init()
614 led->cdev.default_trigger = cpld_leds[i].trigger; in cpld_leds_init()
615 led->mask = BIT(i); in cpld_leds_init()
617 if (led_classdev_register(NULL, &led->cdev) < 0) { in cpld_leds_init()
618 kfree(led); in cpld_leds_init()