search for: nvkm_iccsense_ina209_read

Displaying 11 results from an estimated 11 matches for "nvkm_iccsense_ina209_read".

2016 Jun 12
1
[PATCH] drm/nouveau/iccsense: fix memory leak
...b/drivers/gpu/drm/nouveau/nvkm/subdev/iccsense/base.c @@ -290,21 +290,28 @@ nvkm_iccsense_oneinit(struct nvkm_subdev *subdev) switch (sensor->type) { case NVBIOS_EXTDEV_INA209: - if (r->rail != 0) + if (r->rail != 0) { + kfree(rail); continue; + } rail->read = nvkm_iccsense_ina209_read; break; case NVBIOS_EXTDEV_INA219: - if (r->rail != 0) + if (r->rail != 0) { + kfree(rail); continue; + } rail->read = nvkm_iccsense_ina219_read; break; case NVBIOS_EXTDEV_INA3221: - if (r->rail >= 3) + if (r->rail >= 3) { + kfree(rail);...
2016 Jul 27
0
[PATCH] nvkm/iccsense: Parse the resistors and config the right way
...nt) continue; - sensor = nvkm_iccsense_get_sensor(iccsense, r->extdev_id); + sensor = nvkm_iccsense_get_sensor(iccsense, pwr_rail->extdev_id); if (!sensor) continue; - switch (sensor->type) { - case NVBIOS_EXTDEV_INA209: - if (r->rail != 0) - continue; - read = nvkm_iccsense_ina209_read; - break; - case NVBIOS_EXTDEV_INA219: - if (r->rail != 0) + if (!sensor->config) + sensor->config = pwr_rail->config; + else if (sensor->config != pwr_rail->config) + nvkm_error(subdev, "config mismatch found for extdev %i\n", pwr_rail->extdev_id); + + fo...
2016 Mar 25
7
[PATCH 0/4] Configure Power Sensors
The power sensors can be configured to sample the readout values over time. Nvidia does this too, so nouveau should probably do that too. Karol Herbst (4): iccsense: remove read function iccsense: convert to linked list iccsense: split sensor into own struct iccsense: configure sensors like nvidia does drm/nouveau/include/nvkm/subdev/iccsense.h | 6 +- drm/nouveau/nouveau_hwmon.c
2016 Feb 20
0
[PATCH v4 3/6] iccsense: implement for ina209, ina219 and ina3221
...int +nvkm_iccsense_ina2x9_read(struct nvkm_iccsense *iccsense, + struct nvkm_iccsense_rail *rail, + u8 shunt_reg, u8 bus_reg) +{ + return nvkm_iccsense_poll_lane(rail->i2c, rail->addr, shunt_reg, 0, + bus_reg, 3, rail->mohm, 10 * 4); +} + +static int +nvkm_iccsense_ina209_read(struct nvkm_iccsense *iccsense, + struct nvkm_iccsense_rail *rail) +{ + return nvkm_iccsense_ina2x9_read(iccsense, rail, 3, 4); +} + +static int +nvkm_iccsense_ina219_read(struct nvkm_iccsense *iccsense, + struct nvkm_iccsense_rail *rail) +{ + return nvkm_iccsense_ina2x9_read(iccsense, rail...
2016 Mar 25
0
[PATCH 2/4] iccsense: convert to linked list
...+176,10 @@ nvkm_iccsense_oneinit(struct nvkm_subdev *subdev) continue; } - rail = &iccsense->rails[iccsense->rail_count]; + rail = kmalloc(sizeof(*rail), GFP_KERNEL); + if (!rail) + return -ENOMEM; + switch (extdev.type) { case NVBIOS_EXTDEV_INA209: rail->read = nvkm_iccsense_ina209_read; @@ -201,7 +196,7 @@ nvkm_iccsense_oneinit(struct nvkm_subdev *subdev) rail->rail = r->rail; rail->mohm = r->resistor_mohm; rail->i2c = &i2c_bus->i2c; - ++iccsense->rail_count; + list_add_tail(&rail->head, &iccsense->rails); } return 0; } @@ -2...
2016 Mar 28
4
[PATCH v2 0/4] Configure Power Sensors
The power sensors can be configured to sample the readout values over time. Nvidia does this too, so nouveau should probably do that too. v2: use list_del and rework an error message Karol Herbst (4): iccsense: remove read function iccsense: convert to linked list iccsense: split sensor into own struct iccsense: configure sensors like nvidia does
2016 Mar 25
0
[PATCH 3/4] iccsense: split sensor into own struct
..." invalid\n", extdev.type, r->rail); - continue; - } - rail = kmalloc(sizeof(*rail), GFP_KERNEL); if (!rail) return -ENOMEM; - switch (extdev.type) { + switch (sensor->type) { case NVBIOS_EXTDEV_INA209: + if (r->rail != 0) + continue; rail->read = nvkm_iccsense_ina209_read; break; case NVBIOS_EXTDEV_INA219: + if (r->rail != 0) + continue; rail->read = nvkm_iccsense_ina219_read; break; case NVBIOS_EXTDEV_INA3221: + if (r->rail >= 3) + continue; rail->read = nvkm_iccsense_ina3221_read; break; + default: + continue;...
2016 Feb 20
12
[PATCH v4 0/6] Suppor for various power sensors on GF100+
This is a complete rework from the first version I sent out. Now the implementation is more centered around the power_rails we find in the SENSE table instead of extdev centered. This makes the implementation a lot easier and straightforward. I've added support for the INA219, INA209 and INA3221 sensors found on multiple Fermi and Kepler cards. The power consumption is also exported via
2016 Feb 20
4
[PATCH v3 0/4] Suppor for various power sensors on GF100+
This is a complete rework from the first version I sent out. Now the implementation is more centered around the power_rails we find in the SENSE table instead of extdev centered. This makes the implementation a lot easier and straightforward. I've added support for the INA219, INA209 and INA3221 sensors found on multiple Fermi and Kepler cards. The power consumption is also exported via
2016 Feb 19
4
[PATCH v2 0/4] Suppor for various power sensors on GF100+
This is a complete rework from the last version I sent out. Now the implementation is more centered around the power_rails we find in the SENSE table instead of extdev centered. This makes the implementation a lot easier and straightforward. I've added support for the INA219, INA209 and INA3221 sensors found on multiple Fermi and Kepler cards, but only the INA3221 bits are tested so far.
2016 Feb 24
7
[PATCH v5 0/6] Suppor for various power sensors on GF100+
This is a complete rework from the first version I sent out. Now the implementation is more centered around the power_rails we find in the SENSE table instead of extdev centered. This makes the implementation a lot easier and straightforward. I've added support for the INA219, INA209 and INA3221 sensors found on multiple Fermi and Kepler cards. The power consumption is also exported via