Lines Matching refs:cdev

78 	struct led_classdev	cdev;  member
152 static int mt6323_led_hw_brightness(struct led_classdev *cdev, in mt6323_led_hw_brightness() argument
155 struct mt6323_led *led = container_of(cdev, struct mt6323_led, cdev); in mt6323_led_hw_brightness()
178 static int mt6323_led_hw_off(struct led_classdev *cdev) in mt6323_led_hw_off() argument
180 struct mt6323_led *led = container_of(cdev, struct mt6323_led, cdev); in mt6323_led_hw_off()
204 mt6323_get_led_hw_brightness(struct led_classdev *cdev) in mt6323_get_led_hw_brightness() argument
206 struct mt6323_led *led = container_of(cdev, struct mt6323_led, cdev); in mt6323_get_led_hw_brightness()
235 static int mt6323_led_hw_on(struct led_classdev *cdev, in mt6323_led_hw_on() argument
238 struct mt6323_led *led = container_of(cdev, struct mt6323_led, cdev); in mt6323_led_hw_on()
270 ret = mt6323_led_hw_brightness(cdev, brightness); in mt6323_led_hw_on()
289 static int mt6323_led_set_blink(struct led_classdev *cdev, in mt6323_led_set_blink() argument
293 struct mt6323_led *led = container_of(cdev, struct mt6323_led, cdev); in mt6323_led_set_blink()
338 ret = mt6323_led_hw_on(cdev, cdev->max_brightness); in mt6323_led_set_blink()
341 led->current_brightness = cdev->max_brightness; in mt6323_led_set_blink()
359 static int mt6323_led_set_brightness(struct led_classdev *cdev, in mt6323_led_set_brightness() argument
362 struct mt6323_led *led = container_of(cdev, struct mt6323_led, cdev); in mt6323_led_set_brightness()
369 ret = mt6323_led_hw_on(cdev, brightness); in mt6323_led_set_brightness()
373 ret = mt6323_led_hw_brightness(cdev, brightness); in mt6323_led_set_brightness()
377 ret = mt6323_led_hw_off(cdev); in mt6323_led_set_brightness()
389 static int mtk_wled_hw_on(struct led_classdev *cdev) in mtk_wled_hw_on() argument
391 struct mt6323_led *led = container_of(cdev, struct mt6323_led, cdev); in mtk_wled_hw_on()
423 static int mtk_wled_hw_off(struct led_classdev *cdev) in mtk_wled_hw_off() argument
425 struct mt6323_led *led = container_of(cdev, struct mt6323_led, cdev); in mtk_wled_hw_off()
454 static enum led_brightness mt6323_get_wled_brightness(struct led_classdev *cdev) in mt6323_get_wled_brightness() argument
456 struct mt6323_led *led = container_of(cdev, struct mt6323_led, cdev); in mt6323_get_wled_brightness()
473 static int mt6323_wled_set_brightness(struct led_classdev *cdev, in mt6323_wled_set_brightness() argument
476 struct mt6323_led *led = container_of(cdev, struct mt6323_led, cdev); in mt6323_wled_set_brightness()
484 ret = mtk_wled_hw_on(cdev); in mt6323_wled_set_brightness()
488 ret = mtk_wled_hw_off(cdev); in mt6323_wled_set_brightness()
500 static int mt6323_led_set_dt_default(struct led_classdev *cdev, in mt6323_led_set_dt_default() argument
503 struct mt6323_led *led = container_of(cdev, struct mt6323_led, cdev); in mt6323_led_set_dt_default()
510 ret = mt6323_led_set_brightness(cdev, cdev->max_brightness); in mt6323_led_set_dt_default()
513 ret = mt6323_get_led_hw_brightness(cdev); in mt6323_led_set_dt_default()
520 ret = mt6323_led_set_brightness(cdev, LED_OFF); in mt6323_led_set_dt_default()
591 leds->led[reg]->cdev.max_brightness = spec->max_brightness; in mt6323_led_probe()
594 leds->led[reg]->cdev.brightness_set_blocking = in mt6323_led_probe()
596 leds->led[reg]->cdev.brightness_get = in mt6323_led_probe()
599 leds->led[reg]->cdev.brightness_set_blocking = in mt6323_led_probe()
601 leds->led[reg]->cdev.blink_set = mt6323_led_set_blink; in mt6323_led_probe()
602 leds->led[reg]->cdev.brightness_get = in mt6323_led_probe()
607 ret = mt6323_led_set_dt_default(&leds->led[reg]->cdev, child); in mt6323_led_probe()
616 ret = devm_led_classdev_register_ext(dev, &leds->led[reg]->cdev, in mt6323_led_probe()
635 mt6323_led_hw_off(&leds->led[i]->cdev); in mt6323_led_remove()