Lines Matching refs:dev
129 set_light_backlight(struct light_device_t* dev, in set_light_backlight() argument
136 if(!dev) { in set_light_backlight()
169 set_light_backlight_ext(struct light_device_t* dev, in set_light_backlight_ext() argument
174 if(!dev) { in set_light_backlight_ext()
191 set_speaker_light_locked(struct light_device_t* dev, in set_speaker_light_locked() argument
199 if(!dev) { in set_speaker_light_locked()
264 handle_speaker_battery_locked(struct light_device_t* dev) in handle_speaker_battery_locked() argument
267 set_speaker_light_locked(dev, &g_battery); in handle_speaker_battery_locked()
269 set_speaker_light_locked(dev, &g_notification); in handle_speaker_battery_locked()
274 set_light_battery(struct light_device_t* dev, in set_light_battery() argument
279 handle_speaker_battery_locked(dev); in set_light_battery()
285 set_light_notifications(struct light_device_t* dev, in set_light_notifications() argument
290 handle_speaker_battery_locked(dev); in set_light_notifications()
296 set_light_attention(struct light_device_t* dev, in set_light_attention() argument
305 handle_speaker_battery_locked(dev); in set_light_attention()
311 set_light_buttons(struct light_device_t* dev, in set_light_buttons() argument
315 if(!dev) { in set_light_buttons()
326 close_lights(struct light_device_t *dev) in close_lights() argument
328 if (dev) { in close_lights()
329 free(dev); in close_lights()
345 int (*set_light)(struct light_device_t* dev, in open_lights()
373 struct light_device_t *dev = malloc(sizeof(struct light_device_t)); in open_lights() local
375 if(!dev) in open_lights()
378 memset(dev, 0, sizeof(*dev)); in open_lights()
380 dev->common.tag = HARDWARE_DEVICE_TAG; in open_lights()
381 dev->common.version = LIGHTS_DEVICE_API_VERSION_2_0; in open_lights()
382 dev->common.module = (struct hw_module_t*)module; in open_lights()
383 dev->common.close = (int (*)(struct hw_device_t*))close_lights; in open_lights()
384 dev->set_light = set_light; in open_lights()
386 *device = (struct hw_device_t*)dev; in open_lights()