Lines Matching refs:dev
114 set_light_backlight(struct light_device_t* dev, in set_light_backlight() argument
119 if(!dev) { in set_light_backlight()
129 set_speaker_light_locked(struct light_device_t* dev, in set_speaker_light_locked() argument
137 if(!dev) { in set_speaker_light_locked()
193 handle_speaker_battery_locked(struct light_device_t* dev) in handle_speaker_battery_locked() argument
196 set_speaker_light_locked(dev, &g_battery); in handle_speaker_battery_locked()
198 set_speaker_light_locked(dev, &g_notification); in handle_speaker_battery_locked()
203 set_light_battery(struct light_device_t* dev, in set_light_battery() argument
208 handle_speaker_battery_locked(dev); in set_light_battery()
214 set_light_notifications(struct light_device_t* dev, in set_light_notifications() argument
219 handle_speaker_battery_locked(dev); in set_light_notifications()
225 set_light_attention(struct light_device_t* dev, in set_light_attention() argument
234 handle_speaker_battery_locked(dev); in set_light_attention()
240 set_light_buttons(struct light_device_t* dev, in set_light_buttons() argument
244 if(!dev) { in set_light_buttons()
255 close_lights(struct light_device_t *dev) in close_lights() argument
257 if (dev) { in close_lights()
258 free(dev); in close_lights()
274 int (*set_light)(struct light_device_t* dev, in open_lights()
292 struct light_device_t *dev = malloc(sizeof(struct light_device_t)); in open_lights() local
294 if(!dev) in open_lights()
297 memset(dev, 0, sizeof(*dev)); in open_lights()
299 dev->common.tag = HARDWARE_DEVICE_TAG; in open_lights()
300 dev->common.version = 0; in open_lights()
301 dev->common.module = (struct hw_module_t*)module; in open_lights()
302 dev->common.close = (int (*)(struct hw_device_t*))close_lights; in open_lights()
303 dev->set_light = set_light; in open_lights()
305 *device = (struct hw_device_t*)dev; in open_lights()