Lines Matching refs:dev

177 set_light_backlight(struct light_device_t* dev,  in set_light_backlight()  argument
183 if(!dev) { in set_light_backlight()
210 set_speaker_light_locked(struct light_device_t* dev, in set_speaker_light_locked() argument
217 if(!dev) { in set_speaker_light_locked()
260 handle_speaker_battery_locked(struct light_device_t* dev) in handle_speaker_battery_locked() argument
263 set_speaker_light_locked(dev, &g_battery); in handle_speaker_battery_locked()
265 set_speaker_light_locked(dev, &g_notification); in handle_speaker_battery_locked()
271 set_light_battery(struct light_device_t* dev, in set_light_battery() argument
276 handle_speaker_battery_locked(dev); in set_light_battery()
283 set_light_notifications(struct light_device_t* dev, in set_light_notifications() argument
288 handle_speaker_battery_locked(dev); in set_light_notifications()
294 set_light_attention(struct light_device_t* dev, in set_light_attention() argument
303 handle_speaker_battery_locked(dev); in set_light_attention()
310 close_lights(struct light_device_t *dev) in close_lights() argument
312 if (dev) { in close_lights()
313 free(dev); in close_lights()
329 int (*set_light)(struct light_device_t* dev, in open_lights()
347 struct light_device_t *dev = malloc(sizeof(struct light_device_t)); in open_lights() local
349 if(!dev) in open_lights()
352 memset(dev, 0, sizeof(*dev)); in open_lights()
354 dev->common.tag = HARDWARE_DEVICE_TAG; in open_lights()
355 dev->common.version = LIGHTS_DEVICE_API_VERSION_2_0; in open_lights()
356 dev->common.module = (struct hw_module_t*)module; in open_lights()
357 dev->common.close = (int (*)(struct hw_device_t*))close_lights; in open_lights()
358 dev->set_light = set_light; in open_lights()
360 *device = (struct hw_device_t*)dev; in open_lights()