Lines Matching refs:led
85 struct dbg_led *led = container_of(cdev, struct dbg_led, cdev); in dbg_led_set() local
90 reg |= led->mask; in dbg_led_set()
92 reg &= ~led->mask; in dbg_led_set()
98 struct dbg_led *led = container_of(cdev, struct dbg_led, cdev); in dbg_led_get() local
102 return (reg & led->mask) ? LED_FULL : LED_OFF; in dbg_led_get()
118 struct dbg_led *led; in fpga_probe() local
120 led = kzalloc(sizeof(*led), GFP_KERNEL); in fpga_probe()
121 if (!led) in fpga_probe()
124 led->cdev.name = dbg_leds[i].name; in fpga_probe()
125 led->cdev.brightness_set = dbg_led_set; in fpga_probe()
126 led->cdev.brightness_get = dbg_led_get; in fpga_probe()
127 led->cdev.default_trigger = dbg_leds[i].trigger; in fpga_probe()
128 led->mask = BIT(i); in fpga_probe()
130 if (led_classdev_register(NULL, &led->cdev) < 0) { in fpga_probe()
131 kfree(led); in fpga_probe()