Lines Matching +full:led +full:-
37 nouveau_led_get_brightness(struct led_classdev *led) in nouveau_led_get_brightness() argument
39 struct drm_device *drm_dev = container_of(led, struct nouveau_led, led)->dev; in nouveau_led_get_brightness()
41 struct nvif_object *device = &drm->client.device.object; in nouveau_led_get_brightness()
54 nouveau_led_set_brightness(struct led_classdev *led, enum led_brightness value) in nouveau_led_set_brightness() argument
56 struct drm_device *drm_dev = container_of(led, struct nouveau_led, led)->dev; in nouveau_led_set_brightness()
58 struct nvif_object *device = &drm->client.device.object; in nouveau_led_set_brightness()
61 u32 freq = 100; /* this is what nvidia uses and it should be good-enough */ in nouveau_led_set_brightness()
68 * - A: nvidia never puts the logo led to any other PWM controler in nouveau_led_set_brightness()
70 * - B: nouveau does not touch these registers anywhere else in nouveau_led_set_brightness()
81 struct nvkm_gpio *gpio = nvxx_gpio(&drm->client.device); in nouveau_led_init()
88 /* check that there is a GPIO controlling the logo LED */ in nouveau_led_init()
92 drm->led = kzalloc(sizeof(*drm->led), GFP_KERNEL); in nouveau_led_init()
93 if (!drm->led) in nouveau_led_init()
94 return -ENOMEM; in nouveau_led_init()
95 drm->led->dev = dev; in nouveau_led_init()
97 drm->led->led.name = "nvidia-logo"; in nouveau_led_init()
98 drm->led->led.max_brightness = 255; in nouveau_led_init()
99 drm->led->led.brightness_get = nouveau_led_get_brightness; in nouveau_led_init()
100 drm->led->led.brightness_set = nouveau_led_set_brightness; in nouveau_led_init()
102 ret = led_classdev_register(dev->dev, &drm->led->led); in nouveau_led_init()
104 kfree(drm->led); in nouveau_led_init()
105 drm->led = NULL; in nouveau_led_init()
117 if (drm->led) in nouveau_led_suspend()
118 led_classdev_suspend(&drm->led->led); in nouveau_led_suspend()
126 if (drm->led) in nouveau_led_resume()
127 led_classdev_resume(&drm->led->led); in nouveau_led_resume()
135 if (drm->led) { in nouveau_led_fini()
136 led_classdev_unregister(&drm->led->led); in nouveau_led_fini()
137 kfree(drm->led); in nouveau_led_fini()
138 drm->led = NULL; in nouveau_led_fini()