Lines Matching refs:iccsense
66 nvkm_iccsense_ina2x9_read(struct nvkm_iccsense *iccsense, in nvkm_iccsense_ina2x9_read() argument
76 nvkm_iccsense_ina209_read(struct nvkm_iccsense *iccsense, in nvkm_iccsense_ina209_read() argument
79 return nvkm_iccsense_ina2x9_read(iccsense, rail, 3, 4); in nvkm_iccsense_ina209_read()
83 nvkm_iccsense_ina219_read(struct nvkm_iccsense *iccsense, in nvkm_iccsense_ina219_read() argument
86 return nvkm_iccsense_ina2x9_read(iccsense, rail, 1, 2); in nvkm_iccsense_ina219_read()
90 nvkm_iccsense_ina3221_read(struct nvkm_iccsense *iccsense, in nvkm_iccsense_ina3221_read() argument
100 nvkm_iccsense_sensor_config(struct nvkm_iccsense *iccsense, in nvkm_iccsense_sensor_config() argument
103 struct nvkm_subdev *subdev = &iccsense->subdev; in nvkm_iccsense_sensor_config()
109 nvkm_iccsense_read_all(struct nvkm_iccsense *iccsense) in nvkm_iccsense_read_all() argument
114 if (!iccsense) in nvkm_iccsense_read_all()
117 list_for_each_entry(rail, &iccsense->rails, head) { in nvkm_iccsense_read_all()
122 res = rail->read(iccsense, rail); in nvkm_iccsense_read_all()
133 struct nvkm_iccsense *iccsense = nvkm_iccsense(subdev); in nvkm_iccsense_dtor() local
137 list_for_each_entry_safe(sensor, tmps, &iccsense->sensors, head) { in nvkm_iccsense_dtor()
141 list_for_each_entry_safe(rail, tmpr, &iccsense->rails, head) { in nvkm_iccsense_dtor()
146 return iccsense; in nvkm_iccsense_dtor()
150 nvkm_iccsense_create_sensor(struct nvkm_iccsense *iccsense, u8 id) in nvkm_iccsense_create_sensor() argument
152 struct nvkm_subdev *subdev = &iccsense->subdev; in nvkm_iccsense_create_sensor()
169 iccsense->data_valid = false; in nvkm_iccsense_create_sensor()
185 iccsense->data_valid = false; in nvkm_iccsense_create_sensor()
195 list_add_tail(&sensor->head, &iccsense->sensors); in nvkm_iccsense_create_sensor()
205 nvkm_iccsense_get_sensor(struct nvkm_iccsense *iccsense, u8 id) in nvkm_iccsense_get_sensor() argument
208 list_for_each_entry(sensor, &iccsense->sensors, head) { in nvkm_iccsense_get_sensor()
212 return nvkm_iccsense_create_sensor(iccsense, id); in nvkm_iccsense_get_sensor()
218 struct nvkm_iccsense *iccsense = nvkm_iccsense(subdev); in nvkm_iccsense_oneinit() local
233 iccsense->power_w_max = entry.avg_w; in nvkm_iccsense_oneinit()
234 iccsense->power_w_crit = entry.max_w; in nvkm_iccsense_oneinit()
241 iccsense->data_valid = true; in nvkm_iccsense_oneinit()
250 sensor = nvkm_iccsense_get_sensor(iccsense, pwr_rail->extdev_id); in nvkm_iccsense_oneinit()
291 list_add_tail(&rail->head, &iccsense->rails); in nvkm_iccsense_oneinit()
300 struct nvkm_iccsense *iccsense = nvkm_iccsense(subdev); in nvkm_iccsense_init() local
302 list_for_each_entry(sensor, &iccsense->sensors, head) in nvkm_iccsense_init()
303 nvkm_iccsense_sensor_config(iccsense, sensor); in nvkm_iccsense_init()
316 struct nvkm_iccsense *iccsense) in nvkm_iccsense_ctor() argument
318 nvkm_subdev_ctor(&iccsense_func, device, type, inst, &iccsense->subdev); in nvkm_iccsense_ctor()
323 struct nvkm_iccsense **iccsense) in nvkm_iccsense_new_() argument
325 if (!(*iccsense = kzalloc(sizeof(**iccsense), GFP_KERNEL))) in nvkm_iccsense_new_()
327 INIT_LIST_HEAD(&(*iccsense)->sensors); in nvkm_iccsense_new_()
328 INIT_LIST_HEAD(&(*iccsense)->rails); in nvkm_iccsense_new_()
329 nvkm_iccsense_ctor(device, type, inst, *iccsense); in nvkm_iccsense_new_()