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