Lines Matching refs:aux

30 	struct nvkm_i2c_aux *aux = container_of(adap, typeof(*aux), i2c);  in nvkm_i2c_aux_i2c_xfer()  local
34 ret = nvkm_i2c_aux_acquire(aux); in nvkm_i2c_aux_i2c_xfer()
57 ret = aux->func->xfer(aux, true, cmd, in nvkm_i2c_aux_i2c_xfer()
63 AUX_TRACE(aux, "no data after 32 retries"); in nvkm_i2c_aux_i2c_xfer()
77 nvkm_i2c_aux_release(aux); in nvkm_i2c_aux_i2c_xfer()
94 nvkm_i2c_aux_monitor(struct nvkm_i2c_aux *aux, bool monitor) in nvkm_i2c_aux_monitor() argument
96 struct nvkm_i2c_pad *pad = aux->pad; in nvkm_i2c_aux_monitor()
97 AUX_TRACE(aux, "monitor: %s", monitor ? "yes" : "no"); in nvkm_i2c_aux_monitor()
105 nvkm_i2c_aux_release(struct nvkm_i2c_aux *aux) in nvkm_i2c_aux_release() argument
107 struct nvkm_i2c_pad *pad = aux->pad; in nvkm_i2c_aux_release()
108 AUX_TRACE(aux, "release"); in nvkm_i2c_aux_release()
110 mutex_unlock(&aux->mutex); in nvkm_i2c_aux_release()
114 nvkm_i2c_aux_acquire(struct nvkm_i2c_aux *aux) in nvkm_i2c_aux_acquire() argument
116 struct nvkm_i2c_pad *pad = aux->pad; in nvkm_i2c_aux_acquire()
119 AUX_TRACE(aux, "acquire"); in nvkm_i2c_aux_acquire()
120 mutex_lock(&aux->mutex); in nvkm_i2c_aux_acquire()
122 if (aux->enabled) in nvkm_i2c_aux_acquire()
128 mutex_unlock(&aux->mutex); in nvkm_i2c_aux_acquire()
133 nvkm_i2c_aux_xfer(struct nvkm_i2c_aux *aux, bool retry, u8 type, in nvkm_i2c_aux_xfer() argument
136 if (!*size && !aux->func->address_only) { in nvkm_i2c_aux_xfer()
137 AUX_ERR(aux, "address-only transaction dropped"); in nvkm_i2c_aux_xfer()
140 return aux->func->xfer(aux, retry, type, addr, data, size); in nvkm_i2c_aux_xfer()
144 nvkm_i2c_aux_lnk_ctl(struct nvkm_i2c_aux *aux, int nr, int bw, bool ef) in nvkm_i2c_aux_lnk_ctl() argument
146 if (aux->func->lnk_ctl) in nvkm_i2c_aux_lnk_ctl()
147 return aux->func->lnk_ctl(aux, nr, bw, ef); in nvkm_i2c_aux_lnk_ctl()
154 struct nvkm_i2c_aux *aux = *paux; in nvkm_i2c_aux_del() local
155 if (aux && !WARN_ON(!aux->func)) { in nvkm_i2c_aux_del()
156 AUX_TRACE(aux, "dtor"); in nvkm_i2c_aux_del()
157 list_del(&aux->head); in nvkm_i2c_aux_del()
158 i2c_del_adapter(&aux->i2c); in nvkm_i2c_aux_del()
165 nvkm_i2c_aux_init(struct nvkm_i2c_aux *aux) in nvkm_i2c_aux_init() argument
167 AUX_TRACE(aux, "init"); in nvkm_i2c_aux_init()
168 mutex_lock(&aux->mutex); in nvkm_i2c_aux_init()
169 aux->enabled = true; in nvkm_i2c_aux_init()
170 mutex_unlock(&aux->mutex); in nvkm_i2c_aux_init()
174 nvkm_i2c_aux_fini(struct nvkm_i2c_aux *aux) in nvkm_i2c_aux_fini() argument
176 AUX_TRACE(aux, "fini"); in nvkm_i2c_aux_fini()
177 mutex_lock(&aux->mutex); in nvkm_i2c_aux_fini()
178 aux->enabled = false; in nvkm_i2c_aux_fini()
179 mutex_unlock(&aux->mutex); in nvkm_i2c_aux_fini()
185 struct nvkm_i2c_aux *aux) in nvkm_i2c_aux_ctor() argument
189 aux->func = func; in nvkm_i2c_aux_ctor()
190 aux->pad = pad; in nvkm_i2c_aux_ctor()
191 aux->id = id; in nvkm_i2c_aux_ctor()
192 mutex_init(&aux->mutex); in nvkm_i2c_aux_ctor()
193 list_add_tail(&aux->head, &pad->i2c->aux); in nvkm_i2c_aux_ctor()
194 AUX_TRACE(aux, "ctor"); in nvkm_i2c_aux_ctor()
196 snprintf(aux->i2c.name, sizeof(aux->i2c.name), "nvkm-%s-aux-%04x", in nvkm_i2c_aux_ctor()
198 aux->i2c.owner = THIS_MODULE; in nvkm_i2c_aux_ctor()
199 aux->i2c.dev.parent = device->dev; in nvkm_i2c_aux_ctor()
200 aux->i2c.algo = &nvkm_i2c_aux_i2c_algo; in nvkm_i2c_aux_ctor()
201 return i2c_add_adapter(&aux->i2c); in nvkm_i2c_aux_ctor()