xref: /linux/drivers/gpu/drm/nouveau/nvkm/subdev/i2c/auxgf119.c (revision cf40a76e7d5874bb25f4404eecc58a2e033af885)
1*13a86519SBen Skeggs /*
2*13a86519SBen Skeggs  * Copyright 2017 Red Hat Inc.
3*13a86519SBen Skeggs  *
4*13a86519SBen Skeggs  * Permission is hereby granted, free of charge, to any person obtaining a
5*13a86519SBen Skeggs  * copy of this software and associated documentation files (the "Software"),
6*13a86519SBen Skeggs  * to deal in the Software without restriction, including without limitation
7*13a86519SBen Skeggs  * the rights to use, copy, modify, merge, publish, distribute, sublicense,
8*13a86519SBen Skeggs  * and/or sell copies of the Software, and to permit persons to whom the
9*13a86519SBen Skeggs  * Software is furnished to do so, subject to the following conditions:
10*13a86519SBen Skeggs  *
11*13a86519SBen Skeggs  * The above copyright notice and this permission notice shall be included in
12*13a86519SBen Skeggs  * all copies or substantial portions of the Software.
13*13a86519SBen Skeggs  *
14*13a86519SBen Skeggs  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15*13a86519SBen Skeggs  * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16*13a86519SBen Skeggs  * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
17*13a86519SBen Skeggs  * THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR
18*13a86519SBen Skeggs  * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
19*13a86519SBen Skeggs  * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
20*13a86519SBen Skeggs  * OTHER DEALINGS IN THE SOFTWARE.
21*13a86519SBen Skeggs  */
22*13a86519SBen Skeggs #include "aux.h"
23*13a86519SBen Skeggs 
24*13a86519SBen Skeggs static const struct nvkm_i2c_aux_func
25*13a86519SBen Skeggs gf119_i2c_aux = {
26*13a86519SBen Skeggs 	.address_only = true,
27*13a86519SBen Skeggs 	.xfer = g94_i2c_aux_xfer,
28*13a86519SBen Skeggs };
29*13a86519SBen Skeggs 
30*13a86519SBen Skeggs int
gf119_i2c_aux_new(struct nvkm_i2c_pad * pad,int index,u8 drive,struct nvkm_i2c_aux ** paux)31*13a86519SBen Skeggs gf119_i2c_aux_new(struct nvkm_i2c_pad *pad, int index, u8 drive,
32*13a86519SBen Skeggs 		  struct nvkm_i2c_aux **paux)
33*13a86519SBen Skeggs {
34*13a86519SBen Skeggs 	return g94_i2c_aux_new_(&gf119_i2c_aux, pad, index, drive, paux);
35*13a86519SBen Skeggs }
36