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()
187 handle_speaker_battery_locked(struct light_device_t* dev) in handle_speaker_battery_locked() argument
190 set_speaker_light_locked(dev, &g_battery); in handle_speaker_battery_locked()
192 set_speaker_light_locked(dev, &g_notification); in handle_speaker_battery_locked()
197 set_light_notifications(struct light_device_t* dev, in set_light_notifications() argument
202 handle_speaker_battery_locked(dev); in set_light_notifications()
208 set_light_attention(struct light_device_t* dev, in set_light_attention() argument
217 handle_speaker_battery_locked(dev); in set_light_attention()
223 set_light_buttons(struct light_device_t* dev, in set_light_buttons() argument
227 if(!dev) { in set_light_buttons()
238 close_lights(struct light_device_t *dev) in close_lights() argument
240 if (dev) { in close_lights()
241 free(dev); in close_lights()
257 int (*set_light)(struct light_device_t* dev, in open_lights()
273 struct light_device_t *dev = malloc(sizeof(struct light_device_t)); in open_lights() local
274 memset(dev, 0, sizeof(*dev)); in open_lights()
276 dev->common.tag = HARDWARE_DEVICE_TAG; in open_lights()
277 dev->common.version = 0; in open_lights()
278 dev->common.module = (struct hw_module_t*)module; in open_lights()
279 dev->common.close = (int (*)(struct hw_device_t*))close_lights; in open_lights()
280 dev->set_light = set_light; in open_lights()
282 *device = (struct hw_device_t*)dev; in open_lights()