priv.h 1.1 KB

1234567891011121314151617181920212223242526272829303132
  1. #ifndef __NVKM_I2C_PRIV_H__
  2. #define __NVKM_I2C_PRIV_H__
  3. #define nvkm_i2c(p) container_of((p), struct nvkm_i2c, subdev)
  4. #include <subdev/i2c.h>
  5. int nvkm_i2c_new_(const struct nvkm_i2c_func *, struct nvkm_device *,
  6. int index, struct nvkm_i2c **);
  7. struct nvkm_i2c_func {
  8. int (*pad_x_new)(struct nvkm_i2c *, int id, struct nvkm_i2c_pad **);
  9. int (*pad_s_new)(struct nvkm_i2c *, int id, struct nvkm_i2c_pad **);
  10. /* number of native dp aux channels present */
  11. int aux;
  12. /* read and ack pending interrupts, returning only data
  13. * for ports that have not been masked off, while still
  14. * performing the ack for anything that was pending.
  15. */
  16. void (*aux_stat)(struct nvkm_i2c *, u32 *, u32 *, u32 *, u32 *);
  17. /* mask on/off interrupt types for a given set of auxch
  18. */
  19. void (*aux_mask)(struct nvkm_i2c *, u32, u32, u32);
  20. };
  21. void g94_aux_stat(struct nvkm_i2c *, u32 *, u32 *, u32 *, u32 *);
  22. void g94_aux_mask(struct nvkm_i2c *, u32, u32, u32);
  23. void gk104_aux_stat(struct nvkm_i2c *, u32 *, u32 *, u32 *, u32 *);
  24. void gk104_aux_mask(struct nvkm_i2c *, u32, u32, u32);
  25. #endif