/* * Copyright 2012-15 Advanced Micro Devices, Inc. * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the "Software"), * to deal in the Software without restriction, including without limitation * the rights to use, copy, modify, merge, publish, distribute, sublicense, * and/or sell copies of the Software, and to permit persons to whom the * Software is furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in * all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL * THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR * OTHER DEALINGS IN THE SOFTWARE. * * Authors: AMD * */ #ifndef __DAL_GPIO_TYPES_H__ #define __DAL_GPIO_TYPES_H__ #define BUNDLE_A_MASK … #define BUNDLE_B_MASK … /* * gpio_result * * @brief * The possible return codes that the GPIO object can return. * These return codes can be generated * directly by the GPIO object or from the GPIOPin object. */ enum gpio_result { … }; /* * @brief * Used to identify the specific GPIO device * * @notes * These constants are used as indices in a vector. * Thus they should start from zero and be contiguous. */ enum gpio_id { … }; #define GPIO_ENUM_UNKNOWN … struct gpio_pin_info { … }; enum gpio_pin_output_state { … }; enum gpio_generic { … }; enum gpio_hpd { … }; enum gpio_gpio_pad { … }; enum gpio_vip_pad { … }; enum gpio_sync { … }; enum gpio_gsl { … }; /* * @brief * Unique Id for DDC handle. * Values are meaningful (used as indexes to array) */ enum gpio_ddc_line { … }; /* * @brief * Identifies the mode of operation to open a GPIO device. * A GPIO device (pin) can be programmed in only one of these modes at a time. */ enum gpio_mode { … }; /* * @brief * Identifies the source of the signal when GPIO is in HW mode. * get_signal_source() will return GPIO_SYGNAL_SOURCE__UNKNOWN * when one of the following holds: * 1. GPIO is input GPIO * 2. GPIO is not opened in HW mode * 3. GPIO does not have fixed signal source * (like DC_GenericA have mux instead fixed) */ enum gpio_signal_source { … }; enum gpio_stereo_source { … }; /* * GPIO config */ enum gpio_config_type { … }; /* DDC configuration */ enum gpio_ddc_config_type { … }; struct gpio_ddc_config { … }; /* HPD configuration */ struct gpio_hpd_config { … }; struct gpio_generic_mux_config { … }; enum gpio_gsl_mux_config_type { … }; struct gpio_gsl_mux_config { … }; struct gpio_config_data { … }; #endif