Lines Matching +full:ch +full:- +full:func

29 	int ch;  member
35 struct nvkm_device *device = aux->base.pad->i2c->subdev.device; in g94_i2c_aux_fini()
36 nvkm_mask(device, 0x00e4e4 + (aux->ch * 0x50), 0x00310000, 0x00000000); in g94_i2c_aux_fini()
42 struct nvkm_device *device = aux->base.pad->i2c->subdev.device; in g94_i2c_aux_init()
51 ctrl = nvkm_rd32(device, 0x00e4e4 + (aux->ch * 0x50)); in g94_i2c_aux_init()
53 if (!timeout--) { in g94_i2c_aux_init()
54 AUX_ERR(&aux->base, "begin idle timeout %08x", ctrl); in g94_i2c_aux_init()
55 return -EBUSY; in g94_i2c_aux_init()
60 nvkm_mask(device, 0x00e4e4 + (aux->ch * 0x50), 0x00300000, ureq); in g94_i2c_aux_init()
63 ctrl = nvkm_rd32(device, 0x00e4e4 + (aux->ch * 0x50)); in g94_i2c_aux_init()
65 if (!timeout--) { in g94_i2c_aux_init()
66 AUX_ERR(&aux->base, "magic wait %08x", ctrl); in g94_i2c_aux_init()
68 return -EBUSY; in g94_i2c_aux_init()
80 struct nvkm_i2c *i2c = aux->base.pad->i2c; in g94_i2c_aux_xfer()
81 struct nvkm_device *device = i2c->subdev.device; in g94_i2c_aux_xfer()
82 const u32 base = aux->ch * 0x50; in g94_i2c_aux_xfer()
87 AUX_TRACE(&aux->base, "%d: %08x %d", type, addr, *size); in g94_i2c_aux_xfer()
95 AUX_TRACE(&aux->base, "sink not detected"); in g94_i2c_aux_xfer()
96 ret = -ENXIO; in g94_i2c_aux_xfer()
100 nvkm_i2c_aux_autodpcd(i2c, aux->ch, false); in g94_i2c_aux_xfer()
105 AUX_TRACE(&aux->base, "wr %08x", xbuf[i / 4]); in g94_i2c_aux_xfer()
113 ctrl |= (*size ? (*size - 1) : 0x00000100); in g94_i2c_aux_xfer()
131 if (!timeout--) { in g94_i2c_aux_xfer()
132 AUX_ERR(&aux->base, "timeout %08x", ctrl); in g94_i2c_aux_xfer()
133 ret = -EIO; in g94_i2c_aux_xfer()
145 ret = -ETIMEDOUT; in g94_i2c_aux_xfer()
147 ret = -EIO; in g94_i2c_aux_xfer()
149 AUX_TRACE(&aux->base, "%02d %08x %08x", retries, ctrl, stat); in g94_i2c_aux_xfer()
155 AUX_TRACE(&aux->base, "rd %08x", xbuf[i / 4]); in g94_i2c_aux_xfer()
161 nvkm_i2c_aux_autodpcd(i2c, aux->ch, true); in g94_i2c_aux_xfer()
168 g94_i2c_aux_new_(const struct nvkm_i2c_aux_func *func, in g94_i2c_aux_new_() argument
175 return -ENOMEM; in g94_i2c_aux_new_()
176 *paux = &aux->base; in g94_i2c_aux_new_()
178 nvkm_i2c_aux_ctor(func, pad, index, &aux->base); in g94_i2c_aux_new_()
179 aux->ch = drive; in g94_i2c_aux_new_()
180 aux->base.intr = 1 << aux->ch; in g94_i2c_aux_new_()