1 /* $NetBSD: priv.h,v 1.3 2021/12/18 23:45:40 riastradh Exp $ */ 2 3 /* SPDX-License-Identifier: MIT */ 4 #ifndef __NVKM_I2C_PRIV_H__ 5 #define __NVKM_I2C_PRIV_H__ 6 #define nvkm_i2c(p) container_of((p), struct nvkm_i2c, subdev) 7 #include <subdev/i2c.h> 8 9 int nvkm_i2c_new_(const struct nvkm_i2c_func *, struct nvkm_device *, 10 int index, struct nvkm_i2c **); 11 12 struct nvkm_i2c_func { 13 int (*pad_x_new)(struct nvkm_i2c *, int id, struct nvkm_i2c_pad **); 14 int (*pad_s_new)(struct nvkm_i2c *, int id, struct nvkm_i2c_pad **); 15 16 /* number of native dp aux channels present */ 17 int aux; 18 19 /* read and ack pending interrupts, returning only data 20 * for ports that have not been masked off, while still 21 * performing the ack for anything that was pending. 22 */ 23 void (*aux_stat)(struct nvkm_i2c *, u32 *, u32 *, u32 *, u32 *); 24 25 /* mask on/off interrupt types for a given set of auxch 26 */ 27 void (*aux_mask)(struct nvkm_i2c *, u32, u32, u32); 28 }; 29 30 void g94_aux_stat(struct nvkm_i2c *, u32 *, u32 *, u32 *, u32 *); 31 void g94_aux_mask(struct nvkm_i2c *, u32, u32, u32); 32 33 void gk104_aux_stat(struct nvkm_i2c *, u32 *, u32 *, u32 *, u32 *); 34 void gk104_aux_mask(struct nvkm_i2c *, u32, u32, u32); 35 #endif 36