Lines Matching full:service

58 	struct gpio_service *service;  in dal_gpio_service_create()  local
61 service = kzalloc(sizeof(struct gpio_service), GFP_KERNEL); in dal_gpio_service_create()
63 if (!service) { in dal_gpio_service_create()
68 if (!dal_hw_translate_init(&service->translate, dce_version, in dal_gpio_service_create()
74 if (!dal_hw_factory_init(&service->factory, dce_version, in dal_gpio_service_create()
83 service->ctx = ctx; in dal_gpio_service_create()
87 service->factory.number_of_pins[index_of_id]; in dal_gpio_service_create()
91 service->busyness[index_of_id] = in dal_gpio_service_create()
95 if (!service->busyness[index_of_id]) { in dal_gpio_service_create()
101 service->busyness[index_of_id][i] = 0; in dal_gpio_service_create()
105 service->busyness[index_of_id] = NULL; in dal_gpio_service_create()
112 return service; in dal_gpio_service_create()
117 kfree(service->busyness[index_of_id]); in dal_gpio_service_create()
121 kfree(service); in dal_gpio_service_create()
127 struct gpio_service *service, in dal_gpio_service_create_irq() argument
134 if (!service->translate.funcs->offset_to_id(offset, mask, &id, &en)) { in dal_gpio_service_create_irq()
139 return dal_gpio_create_irq(service, id, en); in dal_gpio_service_create_irq()
143 struct gpio_service *service, in dal_gpio_service_create_generic_mux() argument
151 if (!service->translate.funcs->offset_to_id(offset, mask, &id, &en)) { in dal_gpio_service_create_generic_mux()
157 service, id, en, GPIO_PIN_OUTPUT_STATE_DEFAULT); in dal_gpio_service_create_generic_mux()
177 struct gpio_service *service, in dal_gpio_get_generic_pin_info() argument
183 if (service->translate.funcs->id_to_offset) { in dal_gpio_get_generic_pin_info()
184 service->translate.funcs->id_to_offset(id, en, &pin); in dal_gpio_get_generic_pin_info()
238 const struct gpio_service *service, in is_pin_busy() argument
245 return service->busyness[id][en]; in is_pin_busy()
249 struct gpio_service *service, in set_pin_busy() argument
256 service->busyness[id][en] = true; in set_pin_busy()
260 struct gpio_service *service, in set_pin_free() argument
267 service->busyness[id][en] = false; in set_pin_free()
271 struct gpio_service *service, in dal_gpio_service_lock() argument
275 if (id != GPIO_ID_UNKNOWN && !service->busyness[id]) { in dal_gpio_service_lock()
280 set_pin_busy(service, id, en); in dal_gpio_service_lock()
285 struct gpio_service *service, in dal_gpio_service_unlock() argument
289 if (id != GPIO_ID_UNKNOWN && !service->busyness[id]) { in dal_gpio_service_unlock()
294 set_pin_free(service, id, en); in dal_gpio_service_unlock()
301 struct gpio_service *service = gpio->service; in dal_gpio_service_open() local
309 if (!service->busyness[id]) { in dal_gpio_service_open()
314 if (is_pin_busy(service, id, en)) { in dal_gpio_service_open()
321 *pin = service->factory.funcs->get_ddc_pin(gpio); in dal_gpio_service_open()
322 service->factory.funcs->define_ddc_registers(*pin, en); in dal_gpio_service_open()
325 *pin = service->factory.funcs->get_ddc_pin(gpio); in dal_gpio_service_open()
326 service->factory.funcs->define_ddc_registers(*pin, en); in dal_gpio_service_open()
329 *pin = service->factory.funcs->get_generic_pin(gpio); in dal_gpio_service_open()
330 service->factory.funcs->define_generic_registers(*pin, en); in dal_gpio_service_open()
333 *pin = service->factory.funcs->get_hpd_pin(gpio); in dal_gpio_service_open()
334 service->factory.funcs->define_hpd_registers(*pin, en); in dal_gpio_service_open()
353 dal_gpio_service_close(service, pin); in dal_gpio_service_open()
357 set_pin_busy(service, id, en); in dal_gpio_service_open()
362 struct gpio_service *service, in dal_gpio_service_close() argument
375 set_pin_free(service, pin->id, pin->en); in dal_gpio_service_close()
435 struct gpio_service *service, in dal_gpio_create_irq() argument
452 service, id, en, GPIO_PIN_OUTPUT_STATE_DEFAULT); in dal_gpio_create_irq()
476 struct gpio_service *service, in dal_gpio_create_ddc() argument
485 if (!service->translate.funcs->offset_to_id(offset, mask, &id, &en)) in dal_gpio_create_ddc()
496 service, GPIO_ID_DDC_DATA, en, GPIO_PIN_OUTPUT_STATE_DEFAULT); in dal_gpio_create_ddc()
504 service, GPIO_ID_DDC_CLOCK, en, GPIO_PIN_OUTPUT_STATE_DEFAULT); in dal_gpio_create_ddc()
513 ddc->ctx = service->ctx; in dal_gpio_create_ddc()