Lines Matching refs:dev
115 set_light_backlight(struct light_device_t* dev, in set_light_backlight() argument
120 if(!dev) { in set_light_backlight()
130 set_speaker_light_locked(struct light_device_t* dev, in set_speaker_light_locked() argument
138 if(!dev) { in set_speaker_light_locked()
194 handle_speaker_battery_locked(struct light_device_t* dev) in handle_speaker_battery_locked() argument
197 set_speaker_light_locked(dev, &g_battery); in handle_speaker_battery_locked()
199 set_speaker_light_locked(dev, &g_notification); in handle_speaker_battery_locked()
204 set_light_battery(struct light_device_t* dev, in set_light_battery() argument
209 handle_speaker_battery_locked(dev); in set_light_battery()
215 set_light_notifications(struct light_device_t* dev, in set_light_notifications() argument
220 handle_speaker_battery_locked(dev); in set_light_notifications()
226 set_light_attention(struct light_device_t* dev, in set_light_attention() argument
235 handle_speaker_battery_locked(dev); in set_light_attention()
241 set_light_buttons(struct light_device_t* dev, in set_light_buttons() argument
245 if(!dev) { in set_light_buttons()
256 close_lights(struct light_device_t *dev) in close_lights() argument
258 if (dev) { in close_lights()
259 free(dev); in close_lights()
275 int (*set_light)(struct light_device_t* dev, in open_lights()
293 struct light_device_t *dev = malloc(sizeof(struct light_device_t)); in open_lights() local
295 if(!dev) in open_lights()
298 memset(dev, 0, sizeof(*dev)); in open_lights()
300 dev->common.tag = HARDWARE_DEVICE_TAG; in open_lights()
301 dev->common.version = 0; in open_lights()
302 dev->common.module = (struct hw_module_t*)module; in open_lights()
303 dev->common.close = (int (*)(struct hw_device_t*))close_lights; in open_lights()
304 dev->set_light = set_light; in open_lights()
306 *device = (struct hw_device_t*)dev; in open_lights()