1d38ceaf9SAlex Deucher /*
2d38ceaf9SAlex Deucher  * Copyright 2014 Advanced Micro Devices, Inc.
3d38ceaf9SAlex Deucher  *
4d38ceaf9SAlex Deucher  * Permission is hereby granted, free of charge, to any person obtaining a
5d38ceaf9SAlex Deucher  * copy of this software and associated documentation files (the "Software"),
6d38ceaf9SAlex Deucher  * to deal in the Software without restriction, including without limitation
7d38ceaf9SAlex Deucher  * the rights to use, copy, modify, merge, publish, distribute, sublicense,
8d38ceaf9SAlex Deucher  * and/or sell copies of the Software, and to permit persons to whom the
9d38ceaf9SAlex Deucher  * Software is furnished to do so, subject to the following conditions:
10d38ceaf9SAlex Deucher  *
11d38ceaf9SAlex Deucher  * The above copyright notice and this permission notice shall be included in
12d38ceaf9SAlex Deucher  * all copies or substantial portions of the Software.
13d38ceaf9SAlex Deucher  *
14d38ceaf9SAlex Deucher  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15d38ceaf9SAlex Deucher  * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16d38ceaf9SAlex Deucher  * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
17d38ceaf9SAlex Deucher  * THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR
18d38ceaf9SAlex Deucher  * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
19d38ceaf9SAlex Deucher  * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
20d38ceaf9SAlex Deucher  * OTHER DEALINGS IN THE SOFTWARE.
21d38ceaf9SAlex Deucher  *
22d38ceaf9SAlex Deucher  */
23d38ceaf9SAlex Deucher 
24d38ceaf9SAlex Deucher #ifndef __AMDGPU_I2C_H__
25d38ceaf9SAlex Deucher #define __AMDGPU_I2C_H__
26d38ceaf9SAlex Deucher 
27d38ceaf9SAlex Deucher struct amdgpu_i2c_chan *amdgpu_i2c_create(struct drm_device *dev,
2844f9d7b3SGrazvydas Ignotas 					  const struct amdgpu_i2c_bus_rec *rec,
29d38ceaf9SAlex Deucher 					  const char *name);
30d38ceaf9SAlex Deucher void amdgpu_i2c_destroy(struct amdgpu_i2c_chan *i2c);
31d38ceaf9SAlex Deucher void amdgpu_i2c_init(struct amdgpu_device *adev);
32d38ceaf9SAlex Deucher void amdgpu_i2c_fini(struct amdgpu_device *adev);
33d38ceaf9SAlex Deucher void amdgpu_i2c_add(struct amdgpu_device *adev,
3444f9d7b3SGrazvydas Ignotas 		    const struct amdgpu_i2c_bus_rec *rec,
35d38ceaf9SAlex Deucher 		    const char *name);
36d38ceaf9SAlex Deucher struct amdgpu_i2c_chan *
37d38ceaf9SAlex Deucher amdgpu_i2c_lookup(struct amdgpu_device *adev,
3844f9d7b3SGrazvydas Ignotas 		  const struct amdgpu_i2c_bus_rec *i2c_bus);
39d38ceaf9SAlex Deucher void
4044f9d7b3SGrazvydas Ignotas amdgpu_i2c_router_select_ddc_port(const struct amdgpu_connector *connector);
41d38ceaf9SAlex Deucher void
4244f9d7b3SGrazvydas Ignotas amdgpu_i2c_router_select_cd_port(const struct amdgpu_connector *connector);
43d38ceaf9SAlex Deucher 
44d38ceaf9SAlex Deucher #endif
45