2 * Copyright 2012-15 Advanced Micro Devices, Inc.
4 * Permission is hereby granted, free of charge, to any person obtaining a
5 * copy of this software and associated documentation files (the "Software"),
6 * to deal in the Software without restriction, including without limitation
7 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
8 * and/or sell copies of the Software, and to permit persons to whom the
9 * Software is furnished to do so, subject to the following conditions:
11 * The above copyright notice and this permission notice shall be included in
12 * all copies or substantial portions of the Software.
14 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
17 * THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR
18 * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
19 * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
20 * OTHER DEALINGS IN THE SOFTWARE.
26 #ifndef __DAL_GPIO_SERVICE_INTERFACE_H__
27 #define __DAL_GPIO_SERVICE_INTERFACE_H__
29 #include "gpio_types.h"
30 #include "gpio_interface.h"
35 struct gpio *dal_gpio_create(
36 struct gpio_service *service,
39 enum gpio_pin_output_state output_state);
41 void dal_gpio_destroy(
44 struct gpio_service *dal_gpio_service_create(
45 enum dce_version dce_version,
46 enum dce_environment dce_environment,
47 struct dc_context *ctx);
49 struct gpio *dal_gpio_service_create_irq(
50 struct gpio_service *service,
54 struct ddc *dal_gpio_create_ddc(
55 struct gpio_service *service,
58 struct gpio_ddc_hw_info *info);
61 void dal_gpio_destroy_ddc(
64 void dal_gpio_service_destroy(
65 struct gpio_service **ptr);
67 enum dc_irq_source dal_irq_get_source(
68 const struct gpio *irq);
70 enum dc_irq_source dal_irq_get_rx_source(
71 const struct gpio *irq);
73 enum gpio_result dal_irq_setup_hpd_filter(
75 struct gpio_hpd_config *config);
77 struct gpio *dal_gpio_create_irq(
78 struct gpio_service *service,
82 void dal_gpio_destroy_irq(
86 enum gpio_result dal_ddc_open(
89 enum gpio_ddc_config_type config_type);
91 enum gpio_result dal_ddc_change_mode(
95 enum gpio_ddc_line dal_ddc_get_line(
96 const struct ddc *ddc);
98 enum gpio_result dal_ddc_set_config(
100 enum gpio_ddc_config_type config_type);