Lines Matching defs:cdev
79 * @cdev: LED class device for this LED device
85 struct led_classdev cdev;
107 static int mt6323_led_hw_brightness(struct led_classdev *cdev,
110 struct mt6323_led *led = container_of(cdev, struct mt6323_led, cdev);
132 static int mt6323_led_hw_off(struct led_classdev *cdev)
134 struct mt6323_led *led = container_of(cdev, struct mt6323_led, cdev);
157 mt6323_get_led_hw_brightness(struct led_classdev *cdev)
159 struct mt6323_led *led = container_of(cdev, struct mt6323_led, cdev);
187 static int mt6323_led_hw_on(struct led_classdev *cdev,
190 struct mt6323_led *led = container_of(cdev, struct mt6323_led, cdev);
221 ret = mt6323_led_hw_brightness(cdev, brightness);
240 static int mt6323_led_set_blink(struct led_classdev *cdev,
244 struct mt6323_led *led = container_of(cdev, struct mt6323_led, cdev);
287 ret = mt6323_led_hw_on(cdev, cdev->max_brightness);
290 led->current_brightness = cdev->max_brightness;
308 static int mt6323_led_set_brightness(struct led_classdev *cdev,
311 struct mt6323_led *led = container_of(cdev, struct mt6323_led, cdev);
318 ret = mt6323_led_hw_on(cdev, brightness);
322 ret = mt6323_led_hw_brightness(cdev, brightness);
326 ret = mt6323_led_hw_off(cdev);
338 static int mt6323_led_set_dt_default(struct led_classdev *cdev,
341 struct mt6323_led *led = container_of(cdev, struct mt6323_led, cdev);
348 ret = mt6323_get_led_hw_brightness(cdev);
355 mt6323_led_set_brightness(cdev, cdev->max_brightness);
357 ret = mt6323_led_set_brightness(cdev, LED_OFF);
422 leds->led[reg]->cdev.max_brightness = MT6323_MAX_BRIGHTNESS;
423 leds->led[reg]->cdev.brightness_set_blocking =
425 leds->led[reg]->cdev.blink_set = mt6323_led_set_blink;
426 leds->led[reg]->cdev.brightness_get =
430 ret = mt6323_led_set_dt_default(&leds->led[reg]->cdev, child);
439 ret = devm_led_classdev_register_ext(dev, &leds->led[reg]->cdev,
461 mt6323_led_hw_off(&leds->led[i]->cdev);