Lines Matching full:rail
67 struct nvkm_iccsense_rail *rail, in nvkm_iccsense_ina2x9_read() argument
70 return nvkm_iccsense_poll_lane(rail->sensor->i2c, rail->sensor->addr, in nvkm_iccsense_ina2x9_read()
71 shunt_reg, 0, bus_reg, 3, rail->mohm, in nvkm_iccsense_ina2x9_read()
77 struct nvkm_iccsense_rail *rail) in nvkm_iccsense_ina209_read() argument
79 return nvkm_iccsense_ina2x9_read(iccsense, rail, 3, 4); in nvkm_iccsense_ina209_read()
84 struct nvkm_iccsense_rail *rail) in nvkm_iccsense_ina219_read() argument
86 return nvkm_iccsense_ina2x9_read(iccsense, rail, 1, 2); in nvkm_iccsense_ina219_read()
91 struct nvkm_iccsense_rail *rail) in nvkm_iccsense_ina3221_read() argument
93 return nvkm_iccsense_poll_lane(rail->sensor->i2c, rail->sensor->addr, in nvkm_iccsense_ina3221_read()
94 1 + (rail->idx * 2), 3, in nvkm_iccsense_ina3221_read()
95 2 + (rail->idx * 2), 3, rail->mohm, in nvkm_iccsense_ina3221_read()
112 struct nvkm_iccsense_rail *rail; in nvkm_iccsense_read_all() local
117 list_for_each_entry(rail, &iccsense->rails, head) { in nvkm_iccsense_read_all()
119 if (!rail->read) in nvkm_iccsense_read_all()
122 res = rail->read(iccsense, rail); in nvkm_iccsense_read_all()
135 struct nvkm_iccsense_rail *rail, *tmpr; in nvkm_iccsense_dtor() local
141 list_for_each_entry_safe(rail, tmpr, &iccsense->rails, head) { in nvkm_iccsense_dtor()
142 list_del(&rail->head); in nvkm_iccsense_dtor()
143 kfree(rail); in nvkm_iccsense_dtor()
243 struct pwr_rail_t *pwr_rail = &stbl.rail[i]; in nvkm_iccsense_oneinit()
260 struct nvkm_iccsense_rail *rail; in nvkm_iccsense_oneinit() local
282 rail = kmalloc(sizeof(*rail), GFP_KERNEL); in nvkm_iccsense_oneinit()
283 if (!rail) in nvkm_iccsense_oneinit()
286 rail->read = read; in nvkm_iccsense_oneinit()
287 rail->sensor = sensor; in nvkm_iccsense_oneinit()
288 rail->idx = r; in nvkm_iccsense_oneinit()
289 rail->mohm = res->mohm; in nvkm_iccsense_oneinit()
290 …nvkm_debug(subdev, "create rail for extdev %i: { idx: %i, mohm: %i }\n", pwr_rail->extdev_id, r, r… in nvkm_iccsense_oneinit()
291 list_add_tail(&rail->head, &iccsense->rails); in nvkm_iccsense_oneinit()