aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/amd/display/include/gpio_interface.h
diff options
context:
space:
mode:
authorHarry Wentland <harry.wentland@amd.com>2017-09-12 15:58:20 -0400
committerAlex Deucher <alexander.deucher@amd.com>2017-09-26 17:01:32 -0400
commit4562236b3bc0a28aeb6ee93b2d8a849a4c4e1c7c (patch)
tree84301c04dcaaa05c3318a8fe62cf62ab52ecc162 /drivers/gpu/drm/amd/display/include/gpio_interface.h
parent9c5b2b0d409304c2e3c1f4d1c9bb4958e1d46f8f (diff)
drm/amd/dc: Add dc display driver (v2)
Supported DCE versions: 8.0, 10.0, 11.0, 11.2 v2: rebase against 4.11 Signed-off-by: Harry Wentland <harry.wentland@amd.com> Acked-by: Alex Deucher <alexander.deucher@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu/drm/amd/display/include/gpio_interface.h')
-rw-r--r--drivers/gpu/drm/amd/display/include/gpio_interface.h92
1 files changed, 92 insertions, 0 deletions
diff --git a/drivers/gpu/drm/amd/display/include/gpio_interface.h b/drivers/gpu/drm/amd/display/include/gpio_interface.h
new file mode 100644
index 000000000000..e4fd31024b92
--- /dev/null
+++ b/drivers/gpu/drm/amd/display/include/gpio_interface.h
@@ -0,0 +1,92 @@
1/*
2 * Copyright 2012-15 Advanced Micro Devices, Inc.
3 *
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:
10 *
11 * The above copyright notice and this permission notice shall be included in
12 * all copies or substantial portions of the Software.
13 *
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.
21 *
22 * Authors: AMD
23 *
24 */
25
26#ifndef __DAL_GPIO_INTERFACE_H__
27#define __DAL_GPIO_INTERFACE_H__
28
29#include "gpio_types.h"
30#include "grph_object_defs.h"
31
32struct gpio;
33
34/* Open the handle for future use */
35enum gpio_result dal_gpio_open(
36 struct gpio *gpio,
37 enum gpio_mode mode);
38
39enum gpio_result dal_gpio_open_ex(
40 struct gpio *gpio,
41 enum gpio_mode mode);
42
43/* Get high or low from the pin */
44enum gpio_result dal_gpio_get_value(
45 const struct gpio *gpio,
46 uint32_t *value);
47
48/* Set pin high or low */
49enum gpio_result dal_gpio_set_value(
50 const struct gpio *gpio,
51 uint32_t value);
52
53/* Get current mode */
54enum gpio_mode dal_gpio_get_mode(
55 const struct gpio *gpio);
56
57/* Change mode of the handle */
58enum gpio_result dal_gpio_change_mode(
59 struct gpio *gpio,
60 enum gpio_mode mode);
61
62/* Get the GPIO id */
63enum gpio_id dal_gpio_get_id(
64 const struct gpio *gpio);
65
66/* Get the GPIO enum */
67uint32_t dal_gpio_get_enum(
68 const struct gpio *gpio);
69
70/* Set the GPIO pin configuration */
71enum gpio_result dal_gpio_set_config(
72 struct gpio *gpio,
73 const struct gpio_config_data *config_data);
74
75/* Obtain GPIO pin info */
76enum gpio_result dal_gpio_get_pin_info(
77 const struct gpio *gpio,
78 struct gpio_pin_info *pin_info);
79
80/* Obtain GPIO sync source */
81enum sync_source dal_gpio_get_sync_source(
82 const struct gpio *gpio);
83
84/* Obtain GPIO pin output state (active low or active high) */
85enum gpio_pin_output_state dal_gpio_get_output_state(
86 const struct gpio *gpio);
87
88/* Close the handle */
89void dal_gpio_close(
90 struct gpio *gpio);
91
92#endif